Repository navigation
The back half closes its own loop - #103
Merged
Merged
Conversation
The head now rides out on every CI colour (c23a9af), so --recover-pr against a red or pending PR reached the review record with r_review = na and submitted a non-verdict the kernel refuses. Wrap the reviewer dispatch and record_review in the same *:pass|*:fail guard the runner's own loop got.
…l owes its terminal fact
…om planned, read the conflicted set
…n finished the kernel would not end
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.
What and why
Muesli #764 was implemented by a run whose model session stopped twelve minutes before CI finished red. The back half derived a terminal outcome from the red CI, recorded the run
ended, and from that moment the pipeline was blind to the pull request. Everything after it — a repair, a cross-review that read one commit of thirty-eight and passed, four review rounds each finding one real defect, the merge — was a person launching--recover-prby hand. Six times.Three properties made that possible: a run could end while its pull request was open, red CI was an outcome rather than a repair trigger, and a reviewer FAIL past the revision bound was an ending.
This branch closes the loop, implementing sections 1 to 3 of
docs/superpowers/specs/2026-09-19-back-half-closed-loop-design.md:request_repairis the only door back toplanned, carrying why (ci_red,review_fail,plan_conformance), the head it was requested against, and its evidence. A back-half verdict no longer transitions anything:accept,rejectandrequest_revisionall leave the run atreviewing, because a verdict is evidence, not a move.record_run_outcomeis refused from an active state while the run holds an implementation output and its newest pull-request observation is absent oropen. Silence counts as open.next_step(journal, ground) -> wait | review | repair | merge | park | doneis the whole policy; the runner only performs what it names and records the resulting fact.BIRCHER_MAX_REVISIONSis gone. Progress is measured by failing-job sets and finding fingerprints; three identical rounds in a row park the runno_progress, and a person repliesretryorstopin the session the notice links.Sections 4 (gate integrity) shipped in #102. Sections 5 and 6 — orphan adoption, state-derived labels, the round log, plan conformance, and the E11 live proof — are the next pull request.
Effect on the merge gate
No change to what can merge, or to the evidence it needs. Verified rather than asserted:
run_iteminto_merge_step: 26 code lines, zero differences againstmain(comments aside). The reviewed head still comes from the derivation and never from a re-fetch,_merge_gatestill fails closed without one,merge_ready_prstill pins--match-head-commit, and an unreviewed merge still downgrades the outcome._merge_stepruns only whennext_stepreturnsmerge, which happens only on a PASS verdict recorded against the head being merged, or frommerge_requested(a merge an earlier pass already authorised). The kernel's merge authorisation is untouched: it still requires anacceptbound to the exact artifact, base, context and head.acceptwas already non-transitioning; what changed is thatrequest_revisionno longer moves the run, so the only way back to implementation is an explicitrequest_repairthe journal records.Testing
bash batch/run-queue.sh --self-testpasses on LinuxBoth runs are on
omnigent-runner-bircher(Linux 6.12, bash 5.2, coreutils), against this branch, with the deployed bundle left onmainand its working tree untouched:FAIL, noSKIP;FAIL, oneSKIP.That skip is the last commit here. One derivation test makes a findings file unremovable with
chmod 500and asserts the derivation fails closed. uid 0 ignores the write bit, so the premise cannot be staged, the derivation correctly succeeds, and the assertion read that success as a failure — and because the script exits on the first failure, the runner's own self-test has been stopping at check 29 of 111 on every deploy. It fails the same way onmain(bb402d4) in the same container, so it is pre-existing rather than something this branch introduced. It is now skipped under uid 0 with a visible notice, in the convention the suite already uses for a missingtimeout(1); the hazard still binds for every non-root run, which is where the suite is developed.The macOS run skips the kill-escalation test for want of
timeout(1); the Linux run exercises it. The Python suite is 1983 passed, 3 skipped (macOS).Anything a reviewer should look at twice
budget_exhaustedpark inside the loop is owed (spec §3) and is not in this branch.run_itemstill retire a queue file without checking, which is a follow-up._resume_back_halfreads several names fromrun_itemby dynamic scope. The contract is stated in comments above both functions, andset -uwould catch an omission only on the path that reads it.