fix(loop): wire the resume verdict dispatch — no more silent stall-resume no-ops (issue #154)#161
Merged
Merged
Conversation
…sume no-ops (issue #154) Issue #98/PR #146 added stall detection and a bounded `action=resume issue=N branch=<name>` verdict to loop-tick.sh, but loop-daemon.sh's run_once dispatch and loop-event.sh's prompt builder never recognized `resume` — every overnight stall-resume attempt silently fell through to the unrecognized-action branch and no driver ever spawned (#96, #106, #124 parked ~12h each). loop-daemon.sh: dispatch `resume issue=N` alongside advance/feedback/ comment-fix/ci-fix/rebase; give it its own distinct transient unit name (pr-loop-driver-resume-issue<N>, never reusing advance's pr-loop-driver-issue<N> shape) with an exact driver_unit_name/ verdict_from_unit_name inverse; strip the verdict's optional trailing " branch=..." before it reaches driver_unit_name/the ledger; and keep resume excluded from the advance-only debris classifier (a resume branch predates this run and may hold real half-done work that must never be misclassified as deletable debris). loop-event.sh: parse the resume verdict's issue number and optional branch name, and build a RESUME driver prompt that instructs the driver to continue the EXISTING feat/issue-N-* branch (never recreate it or re-scope from scratch), re-run the module gates, route through reviewer lenses, and publish (push + open/refresh the bot PR). Adds loop-daemon.test.sh scenarios 4e/4f (dispatch spawns + branch- suffix stripping), 10b (debris-exclusion safety), 12b (systemd unit naming), plus driver_unit_name/verdict_from_unit_name round-trip checks, and loop-event.test.sh scenarios 3e/3f (RESUME prompt contract, with and without a branch name). loop-tick.sh is untouched — it already emitted the verdict correctly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
Author
|
fix(loop): wire the resume verdict dispatch — no more silent stall-resume no-ops (issue #154) (not yet reviewed) |
robercano
approved these changes
Jul 20, 2026
This was referenced Jul 21, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
Repository owner
deleted a comment from
robercano-ghbot
Jul 23, 2026
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
Wires the
action=resume issue=Nverdict through the loop driver so bounded stall-resume actually spawns a driver instead of silently no-oping.Issue #98 (PR #146) added stall detection and a bounded
action=resume issue=N branch=<name>verdict toloop-tick.sh, butloop-daemon.sh'srun_oncedispatch only handledadvance/feedback/comment-fix/ci-fix/rebase— aresumeverdict fell through to the unrecognized-action branch (no driver, no ledger line), andloop-event.shhad no RESUME prompt variant (it hit the fallthrough andexit 1). Result: every overnightresume-attempt(issues #96, #106, #124, 2026-07-16 → 17) produced no progress; the resume half of #98 had effectively never run.Fix
loop-daemon.shdriver_unit_name(): newresume issue=Narm → distinct transient unitpr-loop-driver-resume-issue<N>(NOT the advancepr-loop-driver-issue<N>shape — a distinct name keeps a resume driver from colliding with / being reattached as an advance driver).verdict_from_unit_name(): exact inverse mapping (round-trips; provably no prefix collision with the advance shape).run_oncedispatch:resume issue=*now routes to a real driver spawn; the optionalbranch=...suffix is stripped before the bareresume issue=Nreachesrun_driver/ unit-naming / the ledger.verify_and_classify_post_exit()andreattach_orphaned_drivers()remainadvance issue=*-only, so a resume verdict is never run through the destructive branch-delete debris classifier — a resume driver continues an existingfeat/issue-N-*branch with WIP, which must never be deleted/misclassified. Documented with new comments so it isn't "fixed" away later.loop-event.shaction=resume issue=Nwith an optionalbranch=<name>suffix (both forms), threading the branch name into the prompt.feat/issue-N-*worktree/branch (never recreate / re-scope), re-run gates, route through reviewer lenses, and publish (push + open/refresh the bot PR).Tests
loop-daemon.test.sh: resume driver spawns (not the no-op fallthrough); branch-suffix stripping; resume branch never reaches the debris classifier (fixture deliberately omits thebot-gh.shstub, so the query would fail loudly if it ran);pr-loop-driver-resume-issue<N>unit naming;driver_unit_name↔verdict_from_unit_nameround-trip;verify_and_classify_post_exitpass-through for resume.loop-event.test.sh: RESUME prompt contract with and without a branch name (both parse paths), asserting resume-specific semantics (continue existing branch / never recreate / re-run gates / publish).loop-tick.shunchanged. Both reviewer lenses (correctness, tests) confirmed the new tests genuinely FAIL against pre-fix code and PASS after.Gates green: build, lint, test (
loop-daemon.test.sh113 checks,loop-event.test.sh82 checks, pluschecks.sh test+smoke-fanout.sh).Follow-ups (non-blocking, from review)
reattach_orphaned_driversstartup scenario for an already-activepr-loop-driver-resume-issue<N>unit (composing pieces are unit-tested; low risk).Closes #154.
🤖 Generated with Claude Code