Skip to content

Stall clock skips time at a hard stop; stall notices give the real wait - #321

Merged
dinoderek merged 1 commit into
mainfrom
fix/stall-after-answer
Nov 24, 2026
Merged

dinoderek merged 1 commit into
mainfrom
fix/stall-after-answer

Conversation

@dinoderek

Copy link
Copy Markdown
Owner

Objective

The stall notice no longer fires right after the operator answers a question. A wait spent at a hard stop (needs-human, or an open question on the item, including a planner's plan question) no longer counts toward the 10-minute stall: the clock starts when the question is answered. Stall notices give the real length of the wait instead of the 10m0s threshold, and say the session did not ask through the server. The trigger was BOGA3-467, flagged 7 seconds after its answer to a question it had asked 6 hours earlier.

Gates

Lane Result Evidence
./dev test (every required lane) PASS local run at c524a0c: format, vet, lint, unit, coverage, file-length, imports, versions, docs-check, harness-names all PASS
  • New or changed tests:
    • internal/controlrun/answered_test.go: replays the incident (ask, wait 40m, resolve, one pass), expects no notice, then a later stall timed from the answer. Fails with the fix disabled.
    • internal/reconcile/decide_test.go: a planner waiting on its plan question is not flagged.
    • internal/reconcile/text_test.go: the real wait (6h16m), the planner's wait, and the new wording.
    • internal/controlrun/dialog_test.go: matches the dialog text without the fixed 10m0s.
  • Not run, with reason: none

Rulings

None

Review

  • Fresh reviewer: Claude Code, Claude Opus 5.5 (build review mode), round 1: Verdict: APPROVED, three optional findings.
  • Declined findings:
    • The dialog test no longer pins the wait length: the length in the dialog text is pinned in internal/reconcile/text_test.go ("the planner demo-1 has waited for input for 10m: its harness says…"), which is the layer that owns the text.
    • waitedFor gives "" for a wait under 30s and "1h0m" for an exact hour: a stall needs at least 10m, so "" cannot happen, and "1h0m" reads fine.
    • A planner at a dialog while its plan question is open is no longer flagged: intended, since time at a hard stop never counts.
  • Review hard: internal/controlrun/view.go (keepObservations clears WaitingSince while the item is at a hard stop) and internal/reconcile/decide.go (the planner branch now checks AtHardStop).

Deviations

None

🤖 Generated with Claude Code

A session that asked through the server and waited hours for the answer
was flagged as stalled seconds after the operator answered: its wait start
predated the question. Clear the wait start while the item is at a hard
stop or has an open question, so the clock starts at the answer. Planners
at a plan question are no longer flagged either. Stall notices now give
the wait's real length and say the session did not ask through the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dinoderek
dinoderek merged commit d7f9fea into main Nov 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant