# Coding Agent delivery evaluation kit

本入口先校准“什么补丁可以合并”，再决定是否调用真实模型。评分器校准结果不能写成模型成功率；历史 Runner 只有在运行身份完全匹配时才允许启动模型。

## 两层合同

| 层              | 入口                                            | 可移植验证                                 | 作用                                                       |
| --------------- | ----------------------------------------------- | ------------------------------------------ | ---------------------------------------------------------- |
| 微任务评分器    | `labs/coding-agent-delivery-eval/README.md`     | `npm run lab:coding-agent:test`            | 验证 visible、hidden、scope、apply 和 evidence 门          |
| 历史仓库 Runner | `labs/coding-agent-historical-replay/README.md` | `npm run lab:coding-agent:historical:test` | 固定 commit、输入哈希、权限 profile、运行身份和独立 scorer |

## 带参数命令

以下命令必须显式提供新的仓库外输出目录；裸命令会 fail closed：

```bash
npm run lab:coding-agent:historical:matrix -- --out "$HOME/.local/share/younis-ai-lab/runs/profile-matrix-$(date +%Y%m%dT%H%M%S)"
npm run lab:coding-agent:historical:smoke -- --out "$HOME/.local/share/younis-ai-lab/runs/non-model-smoke-$(date +%Y%m%dT%H%M%S)"
```

`lab:coding-agent:historical:run` 还要求固定 Codex/Ollama/Node/Git/tar identity、匹配模型 digest、macOS 权限 profile 和零重试 run contract。任一 precondition 不匹配时，`modelStarted` 必须保持 false。

## 迁移步骤

替换任务说明、允许路径、固定 base/reference commit 与私有 scorer，重新生成 fixture 和所有输入哈希；不要复用已经公开的 holdout。决定性输出是 patch、独立 TAP、边界检查、authority 分类和清理证明，不是 Agent 自报“测试通过”。
