AI 安全栈: types、contracts、property tests 与 mutation gates
如果你想让 AI-generated code 能在生产环境里站得住,光靠 code review 不够。你需要一套从 type constraints 到 mutation testing 与 runtime containment 的分层安全栈。
AI-generated code 最大的危险,不是它总是错的。 真正危险的是,它经常“看起来已经对得足够可以 merge”。 这正是风险所在。明显有问题的 code 往往会被挡住。真正会进生产的是那种看起来合理、能过几个 happy-path tests、却悄悄削弱关键 boundary 的实现。…