Repository navigation
Conversation
On a non-user interruption (shutdown/superseded/inactivity), auto-resume marked the session idle with no recovery armed, leaving it silent until the 180s/600s stall timeout. Fire one immediate, fully-guarded continue before that wait; user interrupts and unknown reasons default to stand-down. - new SessionWatch.instantInterruptResumeFired (one-shot, reset by genuine user message), helper instantResumeAfterNonUserInterrupt, wired into the interrupted handler fire-and-forget. - guards: userCancelled, completion latches + literal trailing TASK COMPLETE, lockKind, compacting, selfAbort, isWaitingOnUser, loop/lifetime budgets, injectIntervalMs + duplicate suppression via injectOnce. - 6 bun:test tests: 3 non-user reasons resume, user/unknown/missing do not, TASK COMPLETE last line suppresses, one-shot per episode.
Contributor
Author
|
Closing this PR. Live testing found an additional bug in the user-interrupt path: a stop initiated by the operator could trigger an instant resume. The fix is being reworked and a new PR with corrected tests will be submitted. |
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.
Summary
task_completeand a literal trailingTASK COMPLETEsetcompletionHard. That stopped both the stall ladder and the one-shot instant resume for the rest of the session. A new user message now clears the field. It uses the same timestamp guard as the other re-arm sites. The plugin ignores its own prompts, synthetic interruption messages, and user messages older than the latch.This branch carries two commits: the instant resume after a non-user interruption, and this hard-latch fix. The tests for the fix exercise the instant-resume path; the earlier PR #53 (session-level pause) was closed by the maintainer and is not included here.
Evidence
src/v2/index.completion-hard-rearm.test.ts— 8 tests: control latch, instant resume re-arm, regular stall re-arm, own prompt, synthetic interrupt, stale message, user interrupt, freshtask_completere-latch.master(v1.2.8): reverting only the production change produced 2 failures (12 pass / 2 fail); restored produced14 pass / 0 failacross the instant-resume and hard-rearm files.1114 pass / 1 failin 1115 tests. The one failure is the pre-existingdispatch.test.tsglobal-console-capture flake (passes 10/10 in isolation; also recorded on the earlier PR fix(v2): make /auto-resume pause strictly per-session, reset on restart #53).6c9b2e37314db34aidentical in both live copies and the dist; fix marker present; plugin load events after restart; only known recurring inotify errors in the post-restart window.Merge Danger
Door: Two-way — the change is one conditional reset in
noteInboundUserMessageplus tests; revert is a single commit.Blast Radius: Recovery timing. After a completed turn, a user message re-arms auto-resume. The plugin ignores its own prompts, synthetic interrupt messages, and user messages older than the latch. User interrupts still stand down. A new
task_completecall re-latches.Duplicate scan: 5 PR + 4 issue keyword queries (
completionHard,hard latch,task_complete user message,completion latch reopen,instant resume interruption,nudge after task_complete). All hits were closed, unrelated items (#37, #33, #28, #18); no prior PR covers this.