Skip to content

chore(openspec): rebind the Phase 4 ledger row to its landed squash commit - #477

Merged
monkey1sai merged 1 commit into
mainfrom
fix/rebind-phase4-ledger-subject
Aug 9, 2026
Merged

chore(openspec): rebind the Phase 4 ledger row to its landed squash commit#477
monkey1sai merged 1 commit into
mainfrom
fix/rebind-phase4-ledger-subject

Conversation

@monkey1sai

Copy link
Copy Markdown
Owner

What

One-line unblock: rebinds the introduce-executable-architecture-contracts ledger row's subject_commit from the squash-discarded pre-merge commit 7c5dd98 to e7bb0b9 — the #475 squash that carries the final Phase 4 tasks.md and is permanently reachable main history.

This follows the Phase 3 convention (its row binds c5b9089, the #464 squash). Without it, machine-truth test 25 (current ledger keeps reconciled source snapshots clean) fails subject_unavailable on every subsequent PR: that call path passes no base commit, so the #474 watermark derivation's trusted-base ancestry defence correctly refuses to run, and a fresh CI clone cannot resolve the discarded branch commit. PR #476's agent-governance is currently red for exactly this reason.

Verified locally after the rebind: node scripts/tests/test-openspec-machine-truth.mjs24 pass / 0 fail.

Item Result
Change lane B
Behavior contract changed no
Linked issue none - post-merge ledger rebind per the Phase 3 convention; unblocks #476
Requirement source existing contract: scripts/tests/verify-openspec-machine-truth.mjs subject reachability
CODEOWNERS / owner review requested
GitNexus evidence not needed: one-line JSON data change; no code symbol modified
Browser E2E evidence not user-facing
Agent workflow changed? no
Required checks expected CI / Agent Governance / PR Metadata Contract
Self-referential bootstrap no
Bootstrap ledger entry not applicable
Bootstrap reason not applicable
Item Result
Affects runtime / docker / Kit / viewer / ports / env? no
Canonical deploy path updated? not needed
New root script added? no
Deploy dry-run command not applicable
Full deploy tested not applicable
Verify command node scripts/tests/test-openspec-machine-truth.mjs
Frontend URL verified not applicable

Known Risks

🤖 Generated with Claude Code

https://claude.ai/code/session_015QTVFY89rS2xRwRB2TpFP6

…ommit

Follows the Phase 3 convention (its row binds c5b9089, the #464 squash):
after #475 squashed, the pre-merge branch commit 7c5dd98 stopped being
reachable from any fresh clone, which fails machine-truth test 25
(subject_unavailable - the no-base call path cannot run the #474
watermark derivation) on every subsequent PR. The row now binds
e7bb0b9, the #475 squash that carries the final Phase 4 tasks.md, which
is permanently reachable main history.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QTVFY89rS2xRwRB2TpFP6
Copilot AI balanced review requested due to automatic review settings August 9, 2026 14:35
@monkey1sai
monkey1sai enabled auto-merge (squash) August 9, 2026 14:35
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@monkey1sai, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 38b1bc23-7cc4-41d8-ac97-30dbf46c27b4

📥 Commits

Reviewing files that changed from the base of the PR and between e7bb0b9 and aaeb83a.

📒 Files selected for processing (1)
  • openspec/lifecycle-ledger.json

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebinds the subject_commit for the introduce-executable-architecture-contracts row in openspec/lifecycle-ledger.json from the squash-discarded pre-merge commit 7c5dd98 to the reachable squash merge commit e7bb0b9 (PR #475). Without this, the machine-truth reconciliation cannot resolve the recorded subject on call paths that carry no base commit, turning the required Agent Governance check red on every subsequent PR (e.g. #476). It follows the same post-squash rebind convention already applied in Phase 3 (#464).

Changes:

  • Repoint the Phase 4 ledger row's subject_commit to the permanently reachable #475 squash commit, unblocking machine-truth subject reachability on downstream PRs.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@monkey1sai-blip monkey1sai-blip left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by monkey1sai-blip (the reviewer account pinned by the repo's merge governance).

Submitted through scripts/blip_review.py — a scripted approval carrying the operator's authority, pinned to head aaeb83a3a3985387c95d4a7488afc59a87a0a5bc. This is the mechanism the GitHub App cannot satisfy: an App's approving review does not count toward required_approving_review_count.

@monkey1sai
monkey1sai merged commit bdc863a into main Aug 9, 2026
21 checks passed
@monkey1sai
monkey1sai deleted the fix/rebind-phase4-ledger-subject branch August 9, 2026 14:43
monkey1sai added a commit that referenced this pull request Aug 10, 2026
…480)

All 26 tasks across five phases delivered and merged (#459-era proposal
through #479). The change moves to
openspec/changes/archive/2026-08-10-introduce-executable-architecture-contracts,
its ten requirements land in openspec/specs/executable-architecture-contracts,
and the ledger row is archived with subject_commit rebound to the #479
squash (d0125cc, permanently reachable main history - the #477
convention).


Claude-Session: https://claude.ai/code/session_015QTVFY89rS2xRwRB2TpFP6

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
monkey1sai added a commit that referenced this pull request Aug 10, 2026
… NOW.md evidence moved

docs/plans/NOW.md is that row's evidence file; dropping the archived
projection row changed it, so the row rebinds to the commit carrying
the change (post-merge it rebinds to the squash per the #477
convention).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QTVFY89rS2xRwRB2TpFP6
monkey1sai added a commit that referenced this pull request Aug 10, 2026
…, projection) (#481)

* chore(openspec): archive closeout follow-up for executable-architecture-contracts

Adopts the #480 review findings: the canonical spec prose is now
Traditional Chinese per openspec/AGENTS.md (parser headings and SHALL
protocol identifiers preserved), the ledger row's evidence_refs point at
the dated archive directory, subject_commit rebinds to the landed
archive snapshot (#480 squash c41e29d - sources unchanged since), and
the NOW projection drops the archived row per the ledger-first rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QTVFY89rS2xRwRB2TpFP6

* chore(openspec): re-reconcile the isolated-branch-stack row after its NOW.md evidence moved

docs/plans/NOW.md is that row's evidence file; dropping the archived
projection row changed it, so the row rebinds to the commit carrying
the change (post-merge it rebinds to the squash per the #477
convention).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QTVFY89rS2xRwRB2TpFP6

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
monkey1sai added a commit that referenced this pull request Aug 10, 2026
 squash (#482)

The #477 convention's second half: the row bound its evidence-carrying
branch commit inside #481 so the pre-merge gate could verify it; the
squash landed, so the row now binds the permanently reachable trusted
snapshot.


Claude-Session: https://claude.ai/code/session_015QTVFY89rS2xRwRB2TpFP6

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
monkey1sai added a commit that referenced this pull request Aug 10, 2026
…achine truth (#485)

* fix(governance): gate the real repository against its own lifecycle machine truth

scripts/lib/openspec-machine-truth.mjs already owns a complete lifecycle
comparator, but its CLI needs a GitHub observation and a pinned openspec
binary, so CI could only ever exercise it against synthetic temporary
fixtures. The one assertion that touched the real tree was a hand-written
regex for a single change id, so drift between openspec/changes, the
machine ledger and the NOW projection was corrected by hand after landing
(#477, #481, #482) instead of being refused at PR time.

This adds the repository-local subset of that comparison as a gate that
needs no network, git or external binary, and wires it into the already
required agent-governance check. It compares the change directories and
their proposal markers, openspec/lifecycle-ledger.json, and the NOW
projection, reports disagreement rather than resolving it, and fails
closed on any input it cannot read as declared.

Proven on a real historical commit: run against main at c41e29d the gate
reports now_unexpected_change for introduce-executable-architecture-contracts,
drift that existed on main and was only fixed later by #481.

Claude-Session: cowork scheduled task ai-bim-geo

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* fix(governance): close the ship-gate survivors on the lifecycle parity gate

Codex tri-adversarial gate on PR #485 returned SHIP with five non-blocking
survivors. Four are closed here; the fifth is disclosed.

- L1-1: the current-change cap counted the mandatory archive namespace, so
  the filesystem observation could not represent the same 512-row boundary
  the NOW parser accepts. One raw slot is now reserved and the filtered set
  is bounded instead.
- SEC-001: path-derived values reached the text renderers verbatim, so a
  directory name carrying a newline or ESC byte could forge extra report
  lines. Values with control characters are now JSON-quoted; JSON output is
  unchanged.
- TG-001: the input_too_large budgets had no coverage. Added the accepted
  boundary and one past it for change directories, NOW rows, ledger rows and
  file bytes.
- TG-003: the non-regular proposal.md predicate was only reachable through a
  skippable symlink fixture. Added a portable directory-named-proposal.md
  case.

Not closed: SEC-002 (readdirSync materialises the full Dirent list before the
entry cap is applied). Rated low by the apex; incremental opendirSync
iteration is a larger refactor and is left as disclosed follow-up.

Claude-Session: cowork scheduled task ai-bim-geo

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* fix(governance): close the marker fail-open pair found by the second gate run

Second Codex tri-adversarial run on head 40d93c6 returned SHIP with four
survivors; the two medium ones were real fail-open defects in the marker
parser, which this gate promotes to merge-blocking authority.

- L1-1: the canonical marker regex had no trailing token boundary, so
  `> **Status: active123**` captured `active` and read as a clean active
  row. The status token must now end at `**`, whitespace or end of line;
  anything else is reported as an unreadable marker.
- L1-2: near-miss detection ran only when no canonical marker was found, so a
  proposal carrying two disagreeing declarations resolved silently to the
  canonical one. Every bolded status-like line in the prologue is now
  inventoried and an unconsumed one is reported even beside a canonical marker.
- L1-3: the raw namespace budget is now separate from the canonical change
  budget, so one stray entry beside a full change set stays a targeted
  `change_entry_not_a_directory` mismatch instead of a generic budget error.
- TG-1: added a control-character assertion for the text input-error path.

Verified against all 120 real proposals: the ten current ones are unchanged;
only one archived proposal reads `invalid` (`Status: closeout reconciled`),
and archived markers are outside this gate's scope.

Claude-Session: cowork scheduled task ai-bim-geo

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* fix(governance): correct the orphan-directory record and per-declaration marker counting

Both from PR #485 review threads.

- The `directory_without_ledger_row` record had its observations reversed: the
  directory is present in `openspec/changes` and absent from the ledger, so
  the record now names the directory as the observed value and `absent` as
  what the ledger was expected to carry.
- Status-like declarations are now counted per declaration rather than per
  line, so `> **Status: active** **Status: deferred**` on a single blockquote
  line is reported as an unreadable marker instead of resolving to `active`.

Claude-Session: cowork scheduled task ai-bim-geo

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

3 participants