fix(cli): tree-canonical range hash for CI verify - #9
Conversation
Make pass-time trailers match merge-base..HEAD after commit, pin PR tip checkout, and document the verify contract with a CI-shaped smoke. Know-Code-Verified: 75e9159d5acf07be52dcd1e647fd611694690b3bc833db8c67fe110ac778e58b
PR SummaryMedium Risk Overview CI and onboarding check out the PR tip ( Docs: new Verification design page ( Reviewed by Cursor Bugbot for commit 9e1f785. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9e1f785. Configure here.
| EMPTY_TREE; | ||
| const indexTree = | ||
| git(["write-tree"], repoRoot, { allowFail: true }) || EMPTY_TREE; | ||
| const diff = git(["diff", fromTree, indexTree], repoRoot, { |
There was a problem hiding this comment.
Range hash skips lock-safe write-tree
Medium Severity
computeRangeDiffContext now depends on write-tree for the tree-canonical tip, but calls raw git write-tree with an EMPTY_TREE fallback instead of indexTreeOid. Under pre-commit index.lock, that failure yields a wrong range hash (empty-tree material) rather than the real index tree the rest of the gate path already resolves lock-safely.
Reviewed by Cursor Bugbot for commit 9e1f785. Configure here.


Summary
fromOid^{tree}→write-tree) so pass-time trailers match CI afterknow-code commitwithout trusting gitignored seals.head.sha), writerequireTrailer: true, and addnpm run smoke:verify(CI-shaped e2e).website/docs/verify.md; tightenci.md/how-it-works.md.Closes #8
Test plan
npm testnpm run smokenpm run smoke:verifyknow-codecheck is green on this PR (tip trailer =merge-base..HEAD)