fix(openspec): rebind the architecture-contracts subject to its squashed commit - #466
monkey1sai wants to merge 1 commit into
Conversation
…hed commit Every open PR is red on `Agent Governance` with not ok - current ledger keeps reconciled source snapshots clean code: subject_not_ancestor 'Lifecycle row subject must be an ancestor of the checked-out HEAD.' The row `introduce-executable-architecture-contracts` records subject_commit 9f4a470, which is PR #464's pre-squash BRANCH head. The repo squash-merges, so what actually landed on main is c5b9089 and 9f4a470 exists only on the PR ref - it can never be an ancestor of main. A branch SHA is not a durable subject under squash-merge. Rebound to c5b9089, the squashed commit on main, which is also the last commit touching openspec/changes/introduce-executable-architecture-contracts/ - so the reconciled snapshot is clean, which is what the assertion checks. Note the gate only runs on pull_request, so main carries this silently and it surfaces on every PR opened against it rather than on the merge that caused it. Verified: node --test scripts/tests/test-openspec-machine-truth.mjs goes from 23 pass / 1 fail to 24 pass / 0 fail. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GV5yjuGdAgJ9PYPRam6biV
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Superseded by #465, which landed the identical correction ( Leaving the generalisable note here since it cost two PRs to find: a branch SHA is not a durable subject under squash-merge, so any lifecycle row written before its own PR merges has this failure mode. And because |
There was a problem hiding this comment.
Pull request overview
This PR is a one-value data correction in openspec/lifecycle-ledger.json. The row for introduce-executable-architecture-contracts recorded subject_commit = 9f4a470…, the pre-squash branch head of PR #464. Because the repo squash-merges, that SHA is unreachable from main and can never be an ancestor of HEAD, so the Agent Governance gate (assertRowSubjectAncestor → subject_not_ancestor) turned every open PR red. The value is rebound to c5b9089…, the actual squash-merge commit of #464.
I confirmed via the GitHub API that c5b9089ebf11eabe9979b8eb717270c7c7a7308e:
- is the landed squash-merge commit of #464 on
main(hence an ancestor of HEAD), - modifies the change's OpenSpec directory (
design.md,spec.md,tasks.md), and - is the most recent commit touching that change's
tasks.md, so its diff-to-HEAD leaves the change's owned source clean — precisely the "reconciled source snapshots clean" property asserted inverify-openspec-machine-truth.mjs/openspec-machine-truth.mjs.
The value is a valid lowercase 40-hex SHA, only line 1395 changes, JSON validity is preserved, the row status stays active (so no NOW.md/lifecycle-state update is required), and task_ledger is untouched.
Changes:
- Rebind
introduce-executable-architecture-contracts.subject_commitfrom the pre-squash head9f4a470…to the landed squash commitc5b9089….
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What
One-line data correction in
openspec/lifecycle-ledger.json.The row
introduce-executable-architecture-contractsrecordssubject_commit = 9f4a470bf96de2ef7d605c2e593bfae6ff96147b, which is PR #464'spre-squash branch head. This repo squash-merges, so what landed on
mainisc5b9089ebf11eabe9979b8eb717270c7c7a7308e;9f4a470lives only on the PR refand can never be an ancestor of
main.Rebound to
c5b9089…, which is also the last commit touchingopenspec/changes/introduce-executable-architecture-contracts/, so thereconciled snapshot is clean — the property the assertion actually checks.
Why it matters now
Every open PR is red on
Agent Governance:The gate runs on
pull_requestonly, somaincarries the broken row silentlyand it surfaces on every PR opened against it rather than on the merge that
introduced it.
Generalisable lesson
A branch SHA is not a durable subject under squash-merge. Any lifecycle row
written before its own PR merges has this failure mode.
node --test scripts/tests/test-openspec-machine-truth.mjsVerification run in this session (worktree at the corrected content):
node --test scripts/tests/test-openspec-machine-truth.mjsgoes from# pass 23 / # fail 1to# pass 24 / # fail 0.