State/merge error-path remediation moves from resident contract prose into the binary's own failure output#465
Merged
clkao merged 8 commits intoJul 2, 2026
Conversation
added 6 commits
July 2, 2026 14:09
…on; ready resume prints re-boot line
…; names the startup-hook mod-pointer next step
T1: dedicated test for the no-merge-hook-registered-at-all shape (the deleted mod file was the workflow's only hook) — distinct from the existing missing-mod test, which fixtures a workflow with a DIFFERENT hook still registered. Catches a mutant that special-cases modBlockNamesMissingMergeMod on len(mergeHooks)==0. T2: pin the full remediation tail on the existing missing-mod refusal test, not just the mod-name + "is missing" fragment. Both mutants verified RED locally before landing, then reverted.
…t a JSON envelope Root cause: ghRunnerExec called `gh pr view PR --json state` and json.Unmarshal'd the result, while boot.go's already-proven PR_STATE probe uses `gh pr view PR --json state --jq .state` (bare, jq-extracted text). Against a `gh` whose output matches the latter shape — including the shared ensigncycle shallow-boot fixture's stub gh, which PR #465's codex-live scenario runs against — the JSON unmarshal fails and a working probe was counted as an error by D2's gh-unavailable classifier, making `state sweep` report UNKNOWN instead of advancing the merged entity. Fix: align ghRunnerExec with boot.go's proven invocation exactly (same flags, same leading-"#" trim, same --jq extraction). The two probes now agree on what "gh can answer" means. Reproduced offline against the exact shared fixture shape before fixing; regression tests pin both the direct probe (TestGhRunnerExecParsesJqExtractedState) and the end-to-end sweep (TestSweepWithRealGhStubDoesNotReportUnknown) using the real production GhRunnerExec. Both verified RED against the pre-fix ghRunnerExec, reverted, GREEN restored.
clkao
pushed a commit
that referenced
this pull request
Jul 2, 2026
…23.0 / v0.24.0-pre1 / HEAD) Boot-resident core -22.0% v0.23.0→HEAD; terminal/merge load -56.7% (#465); trimmed content relocates to failure-triggered deferred skills rather than deleting, so the full-surface byte sum is flat (+0.4%). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resident FO-contract prose paid boot and terminal tokens restating what shipped commands do on failure — guidance the binary can emit at fire time instead.
What changed
state commit/readyexit-3 stderr carries HALT remediation + the peer commitstate sweepdistinguishes gh-unavailable UNKNOWN from truly empty; names the mod-pointer next stepmerge guardarmed/blocked/finalized lines name the FO's next stepsEvidence
go test ./...all packages passed; contractlint anchors intacts0