Skip to content

Keep checks out of the change's reach and bind verification to content (0.3.0) - #2

Merged
davidxiaobj merged 2 commits into
mainfrom
claude/p0-verification-trust
Nov 17, 2026
Merged

davidxiaobj merged 2 commits into
mainfrom
claude/p0-verification-trust

Conversation

@davidxiaobj

Copy link
Copy Markdown
Collaborator

Summary

Closes three holes that let a change pass verification it should not (details in docs/adr/0003):

before                                   after
config read from working tree     →     config read from the base commit (--config working to opt in)
.verify/ and deleted files ignored →    config / test / lint / CI changes, deleted or skipped tests → tier 3
freshness by file mtime           →     runs, reviews and evidence bound to a working-tree hash (Tree:)
gate sees uncommitted files only  →     change = everything since merge-base; turn-start hook skips talk-only turns
evidence diffed vs upstream       →     diffed vs merge-base (pushed commits count again)

Also: gate modes UI_WORKFLOW_GATE=enforce|observe|off with .verify/gate.log; a check that rewrites source fails the run; the negative check is binary-safe.

Evidence

  • Before: a weakened .verify/config.json was used as-is and left the tier at 1; a deleted test raised nothing; committing during a turn skipped the Stop gate. Each case is now a test in test/.
  • After: npm test → 34 pass, 0 fail (Node 22, local). New CI: .github/workflows/test.yml (Node 20/22, Linux/macOS).

Merge Danger

Door: two-way (revert restores 0.2 behaviour).

Blast Radius: moderate. Reviews written under 0.2 lack Tree: and must be redone; projects whose .verify/config.json is not on the default branch yet need run-verify --config working; repos without a remote should set VERIFY_BASE. See README "从 0.2 升级".

How to revert

git revert this commit; no data or project files are migrated.


Generated by Claude Code

…t (0.3.0)

- Read .verify/config.json from the base commit; --config working to opt in.
- Changes to the checks themselves (config, test/lint/CI config, deleted
  tests, skipped or loosened tests) are merge tier 3; silenced checks tier 2.
- run-verify records a working-tree hash; reviews name it on a Tree: line;
  the Stop gate and make-evidence accept only the tree now on disk. A check
  that rewrites source fails the run.
- Measure the change from the merge-base: commits on the branch and
  deletions count (fixes the gate skipping committed work and make-evidence
  dropping pushed commits).
- UserPromptSubmit hook records the tree at turn start so talk-only turns
  pass; gate modes enforce/observe/off with .verify/gate.log.
- Negative check is binary-safe and shares base resolution.
- Tests for the scripts (node:test, fixture repos) and CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014d2MvQ5v7FCph37jwFCC7i
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014d2MvQ5v7FCph37jwFCC7i
@davidxiaobj
davidxiaobj merged commit c59ea87 into main Nov 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants