Add evidence-driven gates: facts registry, evidence tooling, provenance rules #205

Merged
weichen merged 8 commits from feature/evidence-driven-gates into main 2026-10-05 10:55:13 +00:00
Owner

落地「声明≠能力」证据门禁(对应 guidelines 0.1.0-draft.10 + Dev 仓工具化)。

目标

guidelines:证据来源三分 SELF/REPLAY/GATE(通过判定只认后两者)、证据由工具写入、审阅者重放最小重放集、外部事实零信任(登记表+TTL)、诚实出口(NOT_RUN 优于补写);任务卡/验证记录模板增证据表与来源列。
Dev 仓:AGENTS.md 新节「证据与验证门禁」;policy/facts.md(F1–F4 实测后登记);scripts/evidence.sh(CMD="…" make evidence:命令×HEAD×exit×sha256×尾部脱敏写入任务卡);scripts/facts-verify.sh(--update 刷新);task.sh precheck 增 [hooks]/[facts]、task-sync 增 [evidence] 旧证据告警、task-start 卡片带证据表;gitlink 推进至 Development-Guidelines#af199ee(PR #4)。

验证(详见任务卡 .task/feature-evidence-driven-gates.md 证据表)

  • make test 全量 PASS @6518f6e(gitlink 已含);最终 HEAD 快检(bash -n×3 + pins + boundaries)PASS;PR HEAD 全量由 CI 作 GATE。
  • 工具自举自测:脱敏(token )、负例 exit=1 行照记、引号缺陷实测发现并修复(CMD 改环境直传)。
  • facts-verify 4/4 PASS;F2 曾 FAIL——暴露登记命令与手工命令口径漂移(文件为 markdown 列表格式),修正后复验,机制按设计生效。

影响

新增 make evidence/facts-verify;precheck 新增两行(向后兼容);旧任务卡无证据表时 evidence.sh 自建段落。

剩余(后续任务)

task-close 核对 merge SHA 的 CI 状态;review 技能改双盲重放;CI-first 完成声明模板。

落地「声明≠能力」证据门禁(对应 guidelines 0.1.0-draft.10 + Dev 仓工具化)。 ## 目标 guidelines:证据来源三分 SELF/REPLAY/GATE(通过判定只认后两者)、证据由工具写入、审阅者重放最小重放集、外部事实零信任(登记表+TTL)、诚实出口(NOT_RUN 优于补写);任务卡/验证记录模板增证据表与来源列。 Dev 仓:AGENTS.md 新节「证据与验证门禁」;policy/facts.md(F1–F4 实测后登记);scripts/evidence.sh(CMD="…" make evidence:命令×HEAD×exit×sha256×尾部脱敏写入任务卡);scripts/facts-verify.sh(--update 刷新);task.sh precheck 增 [hooks]/[facts]、task-sync 增 [evidence] 旧证据告警、task-start 卡片带证据表;gitlink 推进至 Development-Guidelines#af199ee(PR #4)。 ## 验证(详见任务卡 .task/feature-evidence-driven-gates.md 证据表) - make test 全量 PASS @6518f6e(gitlink 已含);最终 HEAD 快检(bash -n×3 + pins + boundaries)PASS;PR HEAD 全量由 CI 作 GATE。 - 工具自举自测:脱敏(token <redacted>)、负例 exit=1 行照记、引号缺陷实测发现并修复(CMD 改环境直传)。 - facts-verify 4/4 PASS;F2 曾 FAIL——暴露登记命令与手工命令口径漂移(文件为 markdown 列表格式),修正后复验,机制按设计生效。 ## 影响 新增 make evidence/facts-verify;precheck 新增两行(向后兼容);旧任务卡无证据表时 evidence.sh 自建段落。 ## 剩余(后续任务) task-close 核对 merge SHA 的 CI 状态;review 技能改双盲重放;CI-first 完成声明模板。
weichen added 8 commits 2026-10-05 10:52:56 +00:00
Why: declarations were passing as capability; hand-transcribed outputs flowed
through cards and PR bodies as if they were execution evidence, and stale
external facts (e.g. the dead git-panel host) kept being trusted until burned.

Evidence: guidelines draft.10 (PR Development-Guidelines#4, merged af199ee)
pinned here; policy/facts.md F1-F4 each re-verified on 2026-10-05 before
registration (endpoint version, token HTTP 200 via header only, SSH ls-remote,
dead-host negative probe); scripts syntax-checked (bash -n); tool self-tests
and make test recorded in the task card via the new make evidence.

Impact: new AGENTS.md section (SELF/REPLAY/GATE, tool-written evidence,
replay-on-review, zero-trust facts, honest-empty); make evidence/facts-verify;
precheck gains [hooks]/[facts], task-sync gains stale-evidence-HEAD warning;
task-start cards now embed the evidence table; gitlink advances to draft.10.

Refs: task card .task/feature-evidence-driven-gates.md; guidelines CHANGELOG
0.1.0-draft.10.
Why: the make-variable pass-through re-quoted CMD and broke any command
containing quotes (caught by the redaction self-test before it could run).

Evidence: redaction self-test now records 'token <redacted> hello' with quoting
intact (row sha256 aae6a895); negative 'false' case earlier recorded exit=1
row and propagated rc — both in the task card evidence table.

Impact: CMD now travels via environment (CMD="..." make evidence); SRC/TAIL
stay make variables; usage strings updated in Makefile/AGENTS.md/task.sh
template comment.

Refs: task card evidence table; guidelines draft.10 tool-written-evidence rule.
Why: facts-verify failed closed on first run — the real token file stores keys
as markdown bullets ("- ACCESS_TOKEN=..."), so the ^-anchored sed match in the
registry never fired; the earlier manual probe had used grep (anywhere-in-line)
and passed, which is exactly the drift the registry re-verification exists to
surface.

Evidence: re-run recorded in the task card — [facts-verify] total=4 pass=4
fail=0 (sha256 919401b838d77909), after fixing the sed pattern to
"^[ -]*ACCESS_TOKEN=".

Impact: policy/facts.md F2 command now matches the actual file shape and the
fact text documents the file format; no behavior change elsewhere.

Refs: task card evidence table (failed run sha256 6c61e644395042fa, then pass).
Why: evidence rows are written before their containing card commit, so a naive
HEAD-diff would flag every task's evidence as stale and train people to ignore
the warning.

Evidence: bash -n clean; the live task-sync for this task exercises the new
path (warning fires only when a non-.task diff follows an evidence row's HEAD).

Impact: scripts/task.sh cmd_sync now excludes .task from the staleness diff;
AGENTS.md wording aligned (three-output evidence via make evidence).

Refs: task card evidence table; guidelines verification.md tool-written rule.
Record the sync checkpoint
ci / test (pull_request) Successful in 1m58s
4b58491427
weichen merged commit df26ca7199 into main 2026-10-05 10:55:13 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#205