Feature 013: unattended work continuity — resolved-or-unresolved halts - #1
Merged
Conversation
… reporting Under an explicit unattended (--policy autonomous) run, dude-work now keeps working through ready work and ends only on a genuine stop; every work-loop halt carries a report that either resolves to exactly one closed-set reason with actionable detail (affected target, specific causing subject, next owner action) or is explicitly unresolved (names the fields that could not be established and presents no out-of-set reason). Progress reporting never stops the loop, and every safety floor, hard stop, verification gate, and independent review is preserved unchanged. The deterministic autonomous runner attaches the report at its single terminal chokepoint finish(row) — hard-stop -> describeUnattendedHalt(...), ended -> null — reusing the landed endsUnattendedLoop / describeUnattendedHalt primitives. Because the runner is the sole production adapter driver and the model submits no protocol operations, the runtime (not the model) owns the stop decision, resolving the FR-010 wired-versus-unwired dilemma without a session gate, checkpoint threading, or any new stop reason, lane, board, command, or persistent store. Guarded and non-unattended behavior is byte-for-byte unchanged. Tasks T001-T006 complete. Verification: full discovered suite 2261 pass / 0 fail (4 pre-existing skips); focused runner+recovery 557/0; prompt-contract 117/0; dude-lint 0 warnings / 0 failures; compose verify all packs OK; pristine release build clean; .github regenerated with src parity. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 74c629fd-d370-4111-b399-2d1d6b90c152
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.
Why
During an explicitly unattended (
--policy autonomous) run,dude-worksometimes ended a turn just to summarize progress, which read as a stop, so work idled with no legitimate basis while ready work remained. Worse, some halts named no reason from the closed stop set, so an unnameable halt looked exactly like a legitimate one after the fact, and a legitimately-named halt could still be undiagnosable without reading runtime internals.What this does
Under an explicit unattended run, the loop now keeps working through ready work and ends only on a genuine stop. Every work-loop halt carries a report that is one of two structurally distinct forms:
A halt that cannot be attributed to a closed-set reason takes the unresolved form rather than masquerading as a named one. Progress reporting is decoupled from stopping, and every safety floor (destructive operations, spending, credentials, external authorization, ownership ambiguity), hard stop, verification gate, and independent review is preserved unchanged. Guarded and non-unattended behavior is byte-for-byte identical.
Approach
The deterministic autonomous runner attaches the report at its single terminal chokepoint
finish(row): ahard-stopterminal carriesdescribeUnattendedHalt(...), a clean settlement (ended) carriesnull. It reuses two landed primitives (endsUnattendedLoop,describeUnattendedHalt) unchanged.The key design decision, worth calling out: the runner is the sole production driver of the host adapter and the model submits no protocol operations, so having the deterministic runner decide continuation is exactly what FR-010 requires. That single insight let us delete an entire earlier design (a session gate, per-operation gating, checkpoint/handoff/resume threading, and a lane-disposition chain) as machinery guarding a threat the production topology does not contain. The result is one bounded field on the terminal row: no new stop reason, lane, board, command, persistent store, or gate, and no halt attribution persisted anywhere.
Non-obvious notes for reviewers
hard-stop-only gate is necessary, not just an optimization:endsUnattendedLoopfails closed to "halt" for any non-authorized/completedreason, so calling the reporter onendedrows would misclassify a clean settlement.completionDispositionV2emits only accepted/verification-failed/review-rejected; ownership ambiguity is preempted earlier). Their exhaustive per-category coverage lives at the reporter level; the runner wiring is reason-agnostic and proven on every reachable terminal, so the split composes without a gap.finish's never-throw contract; it is honestly left uncovered per the "an unreachable guard cannot be honestly covered" rule.Verification
Full discovered suite 2261 pass / 0 fail (4 pre-existing platform skips); focused runner+recovery 557/0; prompt-contract 117/0;
dude-lint0/0;compose verifyall packs OK; pristine release build clean;.githubregenerated withsrcparity. Independent Tester and Code Reviewer both signed off on the runner wiring (T006) and on the complete feature (T005).