Skip to content

fix(dashboard): retire a chat runtime whose turn the backend never answered - #18947

Closed
javenciu wants to merge 1 commit into
kirodotdev:mainfrom
javenciu:fix/chat-ceiling-retires-silent-runtime
Closed

javenciu wants to merge 1 commit into
kirodotdev:mainfrom
javenciu:fix/chat-ceiling-retires-silent-runtime

Conversation

@javenciu

@javenciu javenciu commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A dashboard chat whose backend stopped answering recovers on the next message, instead of hanging for the whole turn ceiling on every message after that.

When the backend goes silent before it streams anything for a turn, the turn ends only at a ceiling: the dashboard's own wall-clock ceiling (agent.chat_turn_timeout_secs, 4 hours by default), or the ACP transport's own deadline, which ends the turn with stop_reason="timeout".
The stale-turn probe that would end such a turn earlier, and reset the session (STOP_REASON_STALE_RECOVER), never arms: AcpSessionHandle arms it only after a first text chunk or a finished tool.
Neither ceiling ending made _run_chat reset the slot's session. The silent runtime still reads alive, so the session manager reuses it, and the user's next message is sent to it and waits out the ceiling again.
The transport's "timeout" ending also showed the user nothing: the slot was left with no reply and no notice.

Why it matters

A user whose backend hangs sees a turn that lasts the whole ceiling and ends with the "This turn hit the ... limit" card. The card says to send a message to continue. That message hangs for the same ceiling, and so does every one after it, until the user resets the chat or restarts the gateway. With the transport ending, the user does not even get the card.

Not a goal

  • The user's own Stop keeps its session, as before: a stopped turn's runtime is live and the user may want to continue on it. A control test pins this.
  • An involuntary cancel that is not the ceiling (a closed tab, the idle-slot sweep, shutdown) keeps its session too: the runtime is live, and a chat reopened right after a close must not cold-start a fresh process. A control test pins this.
  • A normal end_turn is unchanged, and a control test pins this.
  • No change to when the stale-turn probe arms, to the ceiling values, or to the transport deadline.
  • Restoring the cut-off turn's request and partial answer into the next prompt (the interrupted-turn restore carry) is a separate follow-up, tracked in Restore the cut-off turn's request and partial answer after a chat runtime is retired #21223. Here the runtime that replaces a retired one resumes the conversation through session/load, which holds the turns the backend answered; the cut-off turn stays in the chat transcript and the saved history, and the next prompt carries no restore of it.
  • Sending session/cancel to the backend at the ceiling is PR fix(dashboard): cancel native turns before timeout unwind #18417's change, not this one. See Related Issues for how the two compose.

What changed (motivation → approach → change)

In short: a ceiling cut resets the session only when the native stop the ceiling sent got no acknowledgement, which _run_chat reads from a record _bounded_turn keeps for the turn instead of from the clock, and the timeout card then tells the user to send a message instead of waiting; a transport timeout resets it too, keeps the reply that streamed with its footer, and sends that reply and a notice to the linked surfaces through the end-of-turn legs. Red on origin/main, green here, 3 of 3 runs each (output under Tests).

  • Symptom: after a turn the backend never answered, the next message hangs for the full ceiling again; after a transport timeout the user sees nothing.
  • Root cause: _run_chat (src/kiro_crew/dashboard/chat_runner.py) resets the session in its finally only when needs_session_reset is set. The ceiling unwinds into the CancelledError arm, which set no reset; the "timeout" stop-reason arm only recorded the TURN_TIMEOUT_CAUSE metric. Only STOP_REASON_STALE_RECOVER set it. The session manager's reuse check is the provider's is_process_alive(), which a silent runtime passes.
  • Change, in _run_chat and in _bounded_turn:
    • Ceiling cut. In the CancelledError arm, a cancel that is not the user's Stop (read live through _stop_pressed()) sets needs_session_reset = True only when ceiling_cut_unacknowledged() answers True (dashboard/chat_runner.py:16671, defined at dashboard/turn_dispatch.py:125): the ceiling's timer fired for this turn, and the native stop it sent (session/cancel, added by fix(dashboard): cancel native turns before timeout unwind #18417) ended "timeout", "no_turn" or "error". Those are the outcomes the timeout card already words as unacknowledged; the set is now one constant, _UNACKNOWLEDGED_CANCEL (dashboard/turn_dispatch.py:57), which the card reads too (dashboard/turn_dispatch.py:442). An "acked" stop ended the native prompt (with a positive wait, which the ceiling passes, providers/acp_turns.py:240 answers "acked" only for a cancelled or end_turn stop reason), so that runtime answered and keeps its session, as stop_turn keeps the runtime of an acknowledged Stop. A ceiling with no owned native turn to stop (outcome None) keeps the session too. The other involuntary cancels keep it as before, and the user's Stop takes its own branch and keeps it, as before.
    • The record. _bounded_turn keeps one _TurnCut per guarded turn (dashboard/turn_dispatch.py:70) and publishes it beside the deadline in the context variable _TURN_CUT (dashboard/turn_dispatch.py:674), so code inside the turn reads what the wrapper observed instead of the clock. The record replaces the wrapper's local deadline_fired flag, and cut.fired is still set only by the timer (dashboard/turn_dispatch.py:627). The native outcome is written before the wrapper cancels the turn's task (dashboard/turn_dispatch.py:615), so it is there when that cancel reaches _run_chat; a native request cancelled before it settles is recorded as "error", as _settle_deadline_cancel already reports it (dashboard/turn_dispatch.py:654). A close cancels the guarded wrapper, and the wrapper then cancels the inner task. The wrapper's wakeup and a timer that has come due run in the same loop pass, so the timer could run next, while the inner task was still unwinding, and send session/cancel for a turn the close ended. The wrapper now disarms its timer before it cancels the inner task (dashboard/turn_dispatch.py:705), so a cut is recorded only for a turn the timer reached first.
    • The card. format_turn_timeout_card words an unacknowledged stop two ways, by whether the turn's handler replaced the runtime (dashboard/turn_dispatch.py:434, :442). The ceiling arm records the reset on the turn's _TurnCut right after it sets needs_session_reset (mark_ceiling_reset(), dashboard/turn_dispatch.py:144, called at dashboard/chat_runner.py:16673), _bounded_turn carries it on TurnTimeoutError.session_reset (dashboard/turn_dispatch.py:699, :718), and the card reads it. A replaced runtime gets "The native agent did not acknowledge the stop request, so its runtime was replaced and any tool it was still running ended with it. Work already written to disk is still there — nothing was rolled back. Send a message to continue." plus the limit hint, because the next message is the recovery. A cut that kept its runtime after an unacknowledged stop (the user's Stop racing the ceiling, or a turn that returned normally after the cut) takes no reset and keeps the old warning, "Do not resume this session until it becomes idle". An acknowledged stop and a ceiling with no native turn to stop keep the card they had.
    • Transport timeout. A new arm after the stream loop handles _stop_reason == "timeout" (dashboard/chat_runner.py:14821): it sets needs_session_reset = True, appends UNFINISHED_TURN_NOTICE (messaging/empty_turn_copy.py:64, the notice the channel driver already posts for a "timeout" turn at messaging/driver.py:1134) as an error entry, and returns, as the other terminal stop reasons do. That completion is the ACP handle's own: its deadline passed with no complete, and it sends no session/cancel (acp/session_handle.py:6076), so the native prompt is still open whether or not text streamed, and the runtime still reads alive. The message is not re-queued: the user decides what to send next.
    • Before the notice, that arm awaits _persist_partial_reply("timeout") (dashboard/chat_runner.py:14830), the helper every other abnormal end uses. Text the backend streamed before the deadline is in the slot only as chunk rows, which a save does not write, so without it the saved history and the crew log would lose that text. The turn's usage row needs nothing more: the timeout's EVENT_COMPLETE carries the turn's stats, the complete branch writes the row from them, and the helper finds it recorded and writes no second. The arm then attaches the footer the end-of-turn path attaches (_attach_owned_turn_stats, with the event's elapsed time, credits and cost, the served model, and the time to first visible output). The footer edits the row's meta only.
    • After the notice, the arm sends the kept reply and then the notice to the linked surfaces (dashboard/chat_runner.py:14864). It returns before the end-of-turn legs that take a reply to a session linked in Slack and to one linked to a channel such as Telegram, which main ran for a "timeout" turn. Those two legs moved unchanged into one nested helper, _deliver_to_linked_surfaces (dashboard/chat_runner.py:8256), called at the end of the turn (dashboard/chat_runner.py:16641) and by this arm; the only edit is the parameter name. So the arm's text passes the same audience fences (cross_surface_withheld, slack_publication_withheld, and publication_withheld inside _deliver_cross_surface_reply) and the same redaction as a finished reply.
  • The reset itself is the existing finally path (await state.sessions.reset(session_key)), which keeps the conversation and replaces the runtime, as it already does for STOP_REASON_STALE_RECOVER. No new store or file call runs on the event loop: the change sets one local and one record field, appends in-memory slot entries and edits one row's meta, and makes the same awaited sends to the linked surfaces the end-of-turn legs make.
  • docs/system-specs/modules/session.md describes the reset, the record and the transport-timeout arm beside cancel_owned_turn.

Rejected alternatives:

  • Arming the stale probe at prompt dispatch: it would probe a long non-streamed think that has not sent its first frame, which the model_silent_probe_secs window exists to protect.
  • Resetting from finish_turn_task in turn_dispatch.py: it runs after the turn task is done, outside the turn's session bookkeeping, and the transport's "timeout" ending never reaches it.
  • Re-queuing the message after a timeout, as the stale-recover path re-queues a continuation: the stale path knows the backend was live and wedged mid-turn; here the backend never finished this prompt, and a silent re-send would hide a backend that is down.
  • Resetting at every ceiling cut: an acknowledged stop shows the runtime answered, and a turn that reaches the ceiling in normal work (the turn_dispatch.py module docstring names a babysit loop polling a pull request) would lose its runtime every time.
  • Reading the clock (loop.time() against the turn's deadline) in the CancelledError arm: a close, the idle sweep or shutdown can cancel a turn after its deadline has passed but before the ceiling's timer has run, and that cancel would read as the ceiling and cold-start a reopened chat.
  • Posting the timed-out reply with _deliver_linked_slack_message, as the auth-required arm posts its notice: that helper applies no audience fence, and the reply is model text the end-of-turn Slack leg fences.
  • Reading TurnTimeoutError.native_cancel_outcome in _run_chat: the wrapper raises it after _run_chat has returned, too late for the finally that resets.

Backwards compatibility

Compatible: a turn the ceiling cut while its native stop went unacknowledged, and a turn the transport's "timeout" stop reason ended, now reset their session the way a stale-recover turn already does; the runtime that replaces it resumes the conversation. On main the next message went to the silent runtime; after a ceiling cut that session also carried prev_turn_cancelled (cancel_owned_turn arms it for every outcome), and the reset discards that session, so the next prompt carries no cancelled-turn restore. The timeout card for a cut whose runtime is replaced no longer tells the user to wait: it says the runtime was replaced and to send a message to continue. A ceiling cut the native runtime acknowledged keeps its session, as on main. A timeout after part of an answer streamed keeps that text as the interrupted reply, with the footer main shows on it, followed by the notice; its usage row is written once, as on main; and a session linked in Slack or to a channel such as Telegram gets that reply, as on main, then the notice. One timing change in _bounded_turn: an outside cancel the wrapper handles before its timer has run now disarms the timer, so that turn records no cut and sends no session/cancel; on main the timer could still run in the same loop pass and send it. A turn the user stops, and a turn that completes, are handled as before.

Removes nothing: the wrapper's local deadline_fired flag becomes the cut.fired field of the new _TurnCut record, read the same way at every former use. Adds _TurnCut (with its session_reset field), _TURN_CUT, _UNACKNOWLEDGED_CANCEL, ceiling_cut_unacknowledged(), mark_ceiling_reset(), the optional session_reset parameter of format_turn_timeout_card and _report_turn_timeout, TurnTimeoutError.session_reset and the nested _deliver_to_linked_surfaces, which holds the two legs moved from the end of _run_chat.

Tests

The new tests sit in test/test_chat_runner_coverage.py, class TestRunChatRecoveryLadders, beside the stale-recover tests, on the file's _runner_state and _set_stream harness (the real _run_chat, a scripted client), under the real _bounded_turn wherever a ceiling is involved; and in test/test_turn_dispatch.py, classes TestTimeoutCard, TestCeilingCutPredicates and TestFinishTurnTask.

  • test_a_turn_cut_by_the_ceiling_resets_the_session[timeout|no_turn|error]: a stream that never yields, under a 0.5 s ceiling whose native stop returns that outcome. TurnTimeoutError carries the outcome, reset("dashboard:chat-cov-1") is awaited once, and the card posted for that exit says to send a message to continue and not "Do not resume".
  • test_a_ceiling_cut_the_runtime_answered_keeps_the_session[acked|None]: the same turn, with "acked" and with no owned native turn to stop. No reset, and the card is the stopped-and-continue card.
  • test_a_cancel_after_the_deadline_before_its_timer_keeps_the_session: a close cancels the guarded task, then the loop clock moves past the deadline before the loop runs again, so the ceiling's timer is due in the same pass. No native stop is sent and no reset runs.
  • test_a_transport_timeout_resets_the_session_and_says_so: an EVENT_COMPLETE with stop_reason="timeout". The reset is awaited once, the notice is shown, nothing is re-queued.
  • test_a_transport_timeout_posts_the_shared_unfinished_turn_notice: the error entry is UNFINISHED_TURN_NOTICE itself, not a spelling of its own.
  • test_a_transport_timeout_keeps_the_reply_it_streamed: a chunk, then the timeout. The saved history holds the streamed reply before the notice, and the crew log gets it once as interrupted.
  • test_a_transport_timeout_bills_the_turn_once: the timeout event carries usage; one usage row, with stop reason timeout.
  • test_a_transport_timeout_keeps_the_cost_footer: the reply's footer holds the event's elapsed time and credits and the time to first output.
  • test_a_transport_timeout_reaches_the_linked_surfaces: a Slack-linked session gets the echo, the reply, then the notice in its thread, and the channel leg gets the reply then the notice.
  • test_a_finished_reply_reaches_the_linked_surfaces and test_a_transport_timeout_keeps_the_slack_audience_fence: controls for the moved legs; a finished reply reaches both surfaces once, and a fenced turn posts neither reply nor notice.
  • test_a_users_stop_does_not_reset_the_session, test_an_involuntary_cancel_before_the_deadline_keeps_the_session, test_a_normal_end_turn_does_not_reset_the_session: controls; no reset.
  • TestTimeoutCard: an unacknowledged stop that kept its runtime keeps "Do not resume this session until it becomes idle", one that replaced its runtime says the runtime was replaced and to send a message to continue, and an acknowledged stop reads the same either way.
  • TestFinishTurnTask::test_a_turn_that_replaced_its_runtime_is_told_to_send_a_message: the real _bounded_turn and finish_turn_task; a turn whose handler calls mark_ceiling_reset() after an unacknowledged stop gets the send-a-message card.
  • TestCeilingCutPredicates: the predicate per outcome, a timer that never fired, no guarded turn, and mark_ceiling_reset() outside a guarded turn changing nothing.

Red on origin/main (the two test files copied onto it, the 33 new or changed tests selected by name), 3 of 3 runs, every run the same 21 failures:

FAILED …::test_a_turn_cut_by_the_ceiling_resets_the_session[timeout] - AssertionError: Expected reset to have been awaited once. Awaited 0 times.
FAILED …::test_a_turn_cut_by_the_ceiling_resets_the_session[no_turn] - AssertionError: Expected reset to have been awaited once. Awaited 0 times.
FAILED …::test_a_turn_cut_by_the_ceiling_resets_the_session[error] - AssertionError: Expected reset to have been awaited once. Awaited 0 times.
FAILED …::test_a_cancel_after_the_deadline_before_its_timer_keeps_the_session - AssertionError: a close read as the ceiling: (native stops, resets) = (1, 0)
FAILED …::test_a_transport_timeout_resets_the_session_and_says_so - AssertionError: Expected reset to have been awaited once. Awaited 0 times.
FAILED …::test_a_transport_timeout_posts_the_shared_unfinished_turn_notice - AssertionError: []
FAILED …::test_a_transport_timeout_keeps_the_reply_it_streamed - AssertionError: the reply must precede the notice: [('assistant', 'Here is ...
FAILED …::test_a_transport_timeout_reaches_the_linked_surfaces - AssertionError: Slack lost the notice: [('C123', '💬 _hello_', 'ts-1'), ('C...
FAILED test_turn_dispatch.py::…::test_the_record_reads_as_unacknowledged[None-False] - AttributeError: module 'kiro_crew.dashboard.turn_dispatch' has no attribute...
FAILED test_turn_dispatch.py::TestTimeoutCard::test_an_unacknowledged_stop_that_replaced_the_runtime_says_to_send_a_message[timeout] - TypeError: format_turn_timeout_card() got an unexpected keyword argument 'session_reset'
FAILED test_turn_dispatch.py::TestFinishTurnTask::test_a_turn_that_replaced_its_runtime_is_told_to_send_a_message - AttributeError: module 'kiro_crew.dashboard.turn_dispatch' has no attribute...
(the other outcomes, the remaining predicate and card tests fail the same way)
=========== 21 failed, 12 passed, 437 deselected, 19 warnings in 6.94s ===========

Green here, 3 of 3 runs: 33 passed, 437 deselected, 19 warnings in 4.12s. The two touched test files whole: 470 passed in each of three runs at -n 0.

Mutants, each run against the same selection: the ceiling arm's reset removed fails only the three test_a_turn_cut_by_the_ceiling_resets_the_session cases; the transport arm's reset removed fails only test_a_transport_timeout_resets_the_session_and_says_so; the transport arm's _persist_partial_reply("timeout") removed fails only test_a_transport_timeout_keeps_the_reply_it_streamed and test_a_transport_timeout_keeps_the_cost_footer; the ceiling arm's mark_ceiling_reset() removed fails the same three reset cases, on the card assertion.

Also green on this head: test/test_dashboard_approval_window.py, test/test_prompt_timeout_follows_ceiling.py, test/test_turn_harness.py, test/test_session_turn_timeout.py, test/test_chat_slot_reset_conversation.py and test/test_session.py (627 passed); the wait-discipline, flake-pattern, pid-reader, tmpdir-helper and dir-fd-create ratchets at -n 0 (132 passed); scripts/check_agent_sdk_boundary.py; black --check, isort --check-only and flake8 on the touched files; scripts/check_comment_history.py against the merge base; scripts/docs_lint.py --test and scripts/docs-lint.sh.

Manual verification

N/A — unit coverage sufficient: the tests drive the real _run_chat and the real _bounded_turn with only the client scripted, and assert on the session manager call and the slot entries.

Screenshots / video

N/A: no frontend file changes; the one new user-facing text is a chat error row, quoted under What changed.

Related Issues

#18417 ("cancel native turns before timeout unwind"), now merged, made the ceiling send session/cancel, wait a bounded time for the outcome, then cancel the Python task, and word the card by that outcome. This change reads the same outcome: it resets the session only when the card says the stop was not acknowledged, and keeps it when the native prompt acknowledged it. Its cancel_owned_turn records no Stop (it calls provider.cancel directly, not stop_turn or note_stop), so _stop_pressed() stays False for the ceiling's cancel.
Open issue #4756 (turn ceiling strands unattended work; auto-continue) is a different concern: continuing after a ceiling.
GitHub search (gh search prs and gh search issues --repo kirodotdev/KiroCrew, open and merged) for "chat turn ceiling reset session", "turn timeout reset runtime", "stale_eligible", "silent backend chat" and "stale recover first chunk" found nothing on this defect.

Pattern harvest

Rule candidate: review-prompt
Pattern: a recovery that keys on one terminal stop reason leaves every other ending that cannot reach it on the old path; when a watchdog cannot arm (no first frame), the ceiling endings must apply the same retirement rule.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@javenciu
javenciu requested review from a team and KiroCrewCaptain as code owners October 10, 2026 21:10
@javenciu
javenciu requested a review from buluoray October 10, 2026 21:10
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ⏭️ skipped

Revision 48c1e6ebca4fd155333ac5bcba9e03c31ffc0403 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 48c1e6ebca4fd155333ac5bcba9e03c31ffc0403 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that a runtime replaced after a ceiling cut loses the cut-off request. The fix for that is deferred to #21223, so the agent's next turn won't know what it was doing.

[DESIGN-REVIEWED] 48c1e6e

Description read

[DESCRIPTION-READ] 96f410e82140e8b7de0ef4219e53785a911c3f928b95b08476a0ad95c37b251e

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 48c1e6ebca4fd155333ac5bcba9e03c31ffc0403 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Check before merge: counting "no_turn" as unacknowledged means a ceiling cut always replaces the runtime when the provider reports no active native turn.

What this change ships

Inventory (8 items) — 8 justified

Intent: when the backend stops answering a dashboard chat, the next message should recover instead of hanging until the turn ceiling again. This is a FIX.

  1. When the ceiling cuts a turn and the native stop gets no acknowledgement, the session's runtime is replaced, so the next message goes to a fresh runtime — justified
  2. The timeout card for a replaced runtime now says "Send a message to continue" instead of "do not resume until idle" — justified
  3. When the transport times out (stop_reason="timeout"), the dashboard session is reset. The channel paths already do this (messaging/dispatch.py:2421, slack/handler.py:2185); the dashboard was the one sibling left — justified
  4. The dashboard now shows the unfinished-turn notice after a transport timeout, where before it showed nothing — justified
  5. The reply streamed before a transport timeout is saved with its footer — justified
  6. The partial reply and the notice from a transport timeout now reach the linked Slack/Telegram surfaces, through the existing legs, which move into a shared closure — justified
  7. A close, idle sweep or shutdown now disarms the ceiling timer before cancelling the turn, so those cancels never count as the ceiling's and keep their session — justified
  8. A native stop request cancelled before it settles is recorded as "error" — justified

[FIRST-PRINCIPLES-REVIEWED] 48c1e6e

Description read

[DESCRIPTION-READ] 477c0a5a51c3a86b4a96af0776776e1853f938ede577b26f6388a8fa92d8b54e

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 48c1e6ebca4fd155333ac5bcba9e03c31ffc0403 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 48c1e6e

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 48c1e6ebca4fd155333ac5bcba9e03c31ffc0403 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 48c1e6e

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 10, 2026
@javenciu

Copy link
Copy Markdown
Contributor Author

Agreed, and fixed in the second commit, 957a307. The new "timeout" arm returned before the end-of-turn flush and did not call _persist_partial_reply, so text the backend had streamed stayed in the slot only as chunk rows, which a save does not write; main kept that text, because the stop reason fell through to the flush, so the first commit's early return was what dropped it. The arm now awaits _persist_partial_reply("timeout") before it appends the notice (chat_runner.py:15970), so the text reaches the saved history and the crew log as the interrupted reply, as on every other abnormal end. It then attaches the footer main's end-of-turn path puts on that reply, with the same figures: elapsed time, credits, cost, model and time to first output. The usage row was not skipped: the timeout's EVENT_COMPLETE carries the turn's stats (acp/session_handle.py:5489-5492, usage=self.last_prompt_stats.to_turn_usage()), and the complete branch writes the row from them and sets _turn_usage_persisted before the loop ends (chat_runner.py:15775-15792), so the helper's row half finds it recorded and writes no second one, and the footer edits the row's meta only. test_a_transport_timeout_keeps_the_reply_it_streamed saves the slot through the real _save_slot_to_history and requires the streamed text as the one assistant row, before the notice, and once in the crew log, marked interrupted. Added to the first commit's file it fails in 3 of 3 runs (the saved history lost the streamed reply: [('error', ...)]), and it passes in 3 of 3 on the second commit. test_a_transport_timeout_keeps_the_cost_footer requires the footer on that reply; it fails on the first commit and passes on main and on the second commit. test_a_transport_timeout_bills_the_turn_once (control) gives exactly one usage row on both commits. The whole file gives 381 passed in each of 3 runs, and the 90 neighbouring files 5,976 passed.

@javenciu
javenciu force-pushed the fix/chat-ceiling-retires-silent-runtime branch from 957a307 to 20f2a65 Compare October 11, 2026 09:43
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 11, 2026

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR resets a dashboard chat's runtime when the turn hits the dashboard ceiling, or ends with the transport's stop_reason "timeout", so the next message does not wait out the ceiling again on a silent backend. The idea is right, but two findings on head 20f2a65 are real and have no answer (the author's reply covers the persistence finding from an earlier round, not these). First, a regression for linked surfaces. The new if _stop_reason == "timeout": ... return arm (chat_runner.py ~15988-16026) returns before the Slack mirror leg and before _deliver_cross_surface_reply (~17831). On main a "timeout" turn fell through to both. Now a chat driven from a linked Slack thread or Telegram gets neither the partial reply nor the timeout notice. Fix: deliver the notice and the persisted partial text to the linked surface before returning, the way the AcpAuthRequired arm does. Second, turn_deadline_passed() (turn_dispatch.py:88) decides "the ceiling cut this turn" from the clock. _bounded_turn's own docstring rejects that, and it already records the observed fact in deadline_fired. A tab-close, idle-sweep or shutdown cancel that lands after the deadline but before the timer callback runs, which happens on a busy loop, reads as a ceiling cut and cold-starts the reopened chat this PR's "Not a goal" promises to keep. Fix: publish deadline_fired (a mutable holder in the ContextVar) and read that. Please also answer the Design question of whether a healthy turn whose native cancel came back "acked" should lose its runtime. — crew-pr-reviewer (deep re-check)

@javenciu
javenciu force-pushed the fix/chat-ceiling-retires-silent-runtime branch from 20f2a65 to 2fd7d86 Compare October 12, 2026 09:24
@javenciu

Copy link
Copy Markdown
Contributor Author

Thanks, all three are addressed in 2fd7d86, folded into the second commit so the PR stays at two.

1. Linked surfaces. Agreed: the "timeout" arm returned before both end-of-turn legs. Those two legs now live in one nested helper, _deliver_to_linked_surfaces (dashboard/chat_runner.py:10139), moved unchanged except for the parameter name, and called at the end of the turn (dashboard/chat_runner.py:18021) and by the arm, which sends the kept reply and then the notice before it returns (dashboard/chat_runner.py:16298). I did not reuse _deliver_linked_slack_message for the reply: it applies no audience fence, and the reply is model text the end-of-turn Slack leg fences. test_a_transport_timeout_reaches_the_linked_surfaces requires, after the question's echo, the reply and then the notice in Slack and in _deliver_cross_surface_reply. On the previous head it fails in 3 of 3 runs (Slack lost the reply: [('C123', '💬 _hello_', 'ts-1')]); on main it fails because the notice is missing; here it passes. Two controls: a finished reply still reaches both surfaces once (it fails if the end-of-turn call is removed), and a turn whose audience fence holds posts nothing.

2. Clock. _bounded_turn now keeps one _TurnCut record per turn (dashboard/turn_dispatch.py:68) in a ContextVar. Its fired replaces the local deadline_fired and is set only by the timer, and _run_chat reads it through ceiling_cut_unacknowledged() (dashboard/turn_dispatch.py:117). Publishing the flag alone does not close the race you describe. A close cancels the guarded wrapper (slot.task), the wrapper then cancels the inner task, and a timer that has come due runs in the same loop pass, before the inner task sees its cancel, so it still recorded a cut and sent session/cancel. The wrapper now disarms its timer before it cancels the inner task (dashboard/turn_dispatch.py:664). test_a_cancel_after_the_deadline_before_its_timer_keeps_the_session cancels the wrapper, then moves the loop clock past the deadline before the loop runs again. (native stops, resets) is (1, 1) on the previous head, (1, 0) with the record but without the disarm, and (0, 0) here, 3 of 3 runs each.

3. An acknowledged stop. No, that runtime should keep its session, and now does. provider.cancel answers "acked" only when the native prompt ended with STOP_REASON_CANCELLED or STOP_REASON_END_TURN (providers/acp.py:2767), so the runtime answered, and stop_turn already keeps an acknowledged runtime and resets only one that did not acknowledge (session_lifecycle.py:3388, session_lifecycle.py:3426). The reset now runs only when the timer fired and its native stop ended "timeout", "no_turn" or "error": the set the timeout card already words as unacknowledged, now one constant that both read (dashboard/turn_dispatch.py:55, dashboard/turn_dispatch.py:405). test_a_ceiling_cut_the_runtime_answered_keeps_the_session[acked] and [None] fail on the previous head and pass here; test_a_turn_cut_by_the_ceiling_resets_the_session[timeout|no_turn|error] reset on both. The transport "timeout" arm keeps its reset even after text streamed: that completion is the ACP handle's own and sends no session/cancel (acp/session_handle.py:5881), so the native prompt is still open. Its comment claimed nothing had been received, which was wrong when text streamed; it now says this.

The 16 items: red on main 7 failed and 9 passed, red on the previous head 4 failed and 12 passed, green here 16 passed, 3 of 3 runs each. Whole file: 389 passed, 3 of 3. The 239 test files that name chat_runner or turn_dispatch: 19,076 passed and 3 skipped. The body's What changed, Backwards compatibility, Tests and Related Issues sections are updated; #18417 has merged since the last round.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 12, 2026
@javenciu

Copy link
Copy Markdown
Contributor Author

The new commit replaces the short fixed waits that the repo's wait-discipline ratchet (test/test_wait_discipline_ratchet.py) rejects in test/test_chat_runner_coverage.py; it changes that file only.
The file counted 15 short fixed waits and counts 9 again, its baseline (six wait_for ceilings of 5 s raised to 30 s); the ratchet passes on the head merged with main (c4c51aa), and the file passes 3 of 3 runs (389 tests each).

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 13, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 13, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 13, 2026
@javenciu
javenciu force-pushed the fix/chat-ceiling-retires-silent-runtime branch from a168cad to 2b5e01d Compare October 14, 2026 11:11
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 14, 2026
@javenciu

Copy link
Copy Markdown
Contributor Author

Both review points on 6649e3a are answered on the current head, 38ef102, which is the split revision 2b5e01d plus one commit. The split (my comment above) removed the interrupted-turn restore carry from this PR, so two of the points name state that is no longer here; the evidence for each is below.

  1. The native /clear and the restore consume. Not reachable on this head: the carry it fed is gone. _interrupted_turn_restore, ceiling_sent_native_stop and _carry_cut_turn have no occurrence in src/ or test/ (grep -rn --include='*.py' '_interrupted_turn_restore\|ceiling_sent_native_stop\|_carry_cut_turn' src/kiro_crew test exits 1 with no output), and dashboard/state.py and context_assembly/replay.py are byte-identical to main. The ceiling reset is now a turn-local needs_session_reset = True (src/kiro_crew/dashboard/chat_runner.py:18858), paid in the same turn's finally, so nothing crosses into the next turn for the is_slash arm (:11967) or the EVENT_CLEAR_STATUS arm (:16247) to miss. The /clear guard and the "ceiling cut, /clear, message" test belong to the follow-up PR that carries the restore; they will land there with its invariant spec.

  2. The ceiling_sent_native_stop docstring. That function went with the carry. The predicate this head keeps, ceiling_cut_unacknowledged (src/kiro_crew/dashboard/turn_dispatch.py:119), states the two cases apart: False "when the ceiling found no owned native turn to stop (None: cancel_owned_turn declined, or no native cancel was wired)" (:128), and ""no_turn" is True: the provider answered, before sending anything, that it had no active native turn, so nothing confirmed that this turn's prompt ended, and the session is reset" (:130). test/test_turn_dispatch.py::TestCeilingCutPredicates::test_the_record_reads_as_unacknowledged[no_turn-True] and [None-False] pin both.

  3. First Principles disposition. The item on 6649e3a (the acknowledged-ceiling restore) was dropped with the carry, which is what the lane suggested. The lane re-ran on 2b5e01d and raised one new item, the _timeout_notice literal duplicating UNFINISHED_TURN_NOTICE; fixed in 38ef102, disposition posted below. The dashboard arm appends UNFINISHED_TURN_NOTICE (src/kiro_crew/messaging/empty_turn_copy.py:64) at src/kiro_crew/dashboard/chat_runner.py:17059 and sends it to the linked surfaces at :17065; the literal and its extra sentence are gone. test/test_chat_runner_coverage.py::TestRunChatRecoveryLadders::test_a_transport_timeout_posts_the_shared_unfinished_turn_notice fails on 2b5e01d (1 of 1, the row carried the extra sentence) and passes 3 of 3 here. Gates on the commit: scripts/check_black_formatting.py, flake8, isort --check-only on the touched files, and pytest test/test_chat_runner_coverage.py test/test_turn_dispatch.py test/test_messaging_driver.py (558 passed).

The PR body's transport-timeout clause and its test list are updated for the shared notice and the new test.

@javenciu

Copy link
Copy Markdown
Contributor Author

span=aebe770cf81d

  • Item 4, the transport-timeout notice duplicated UNFINISHED_TURN_NOTICE. fixed 38ef102: the dashboard arm appends UNFINISHED_TURN_NOTICE from src/kiro_crew/messaging/empty_turn_copy.py:64 (src/kiro_crew/dashboard/chat_runner.py:17059) and sends that same constant to the linked surfaces (:17065); the _timeout_notice literal is gone, and with it the one extra sentence, so the dashboard, Slack and a channel all show the wording messaging/driver.py:1134 already posts for a "timeout" turn. test/test_chat_runner_coverage.py::TestRunChatRecoveryLadders::test_a_transport_timeout_posts_the_shared_unfinished_turn_notice pins the slot's error row to the constant: it fails on 2b5e01d (the row carried the extra sentence) and passes 3 of 3 on 38ef102. grep -rn 'did not finish its answer' src/kiro_crew finds the text only in empty_turn_copy.py.

@javenciu

Copy link
Copy Markdown
Contributor Author

span=08121ccb9775

  • The new ceiling-reset tests pass only if _run_chat gets past startup before a real 0.5 s timer fires. fixed f555fee: both tests now run the turn under a 30 s ceiling, wait for the stream's turn_started event, then move loop.time past _TURN_DEADLINE so the ceiling's own timer fires (_run_until_the_ceiling_fires in test/test_chat_runner_coverage.py), as test_a_cancel_after_the_deadline_before_its_timer_keeps_the_session does. With a 0.6 s startup delay injected, the old versions fail 3 of 5 cases and the new ones pass 5 of 5; unchanged, the ceiling tests pass 6 of 6 in three runs and the two touched test files pass 461 of 461.

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REQUEST_CHANGES at f555fee.

The runtime retirement itself looks right. The ceiling arm resets only when the timer recorded in _TurnCut fired and the native stop went unacknowledged, a close no longer races the timer, and the transport-timeout arm keeps the streamed reply, its footer and the linked-surface fences. Our earlier points (linked surfaces, clock-based cut, /clear restore, docstring) are fixed or no longer apply after the split.

Please fix before this can be approved:

  1. The ceiling card now contradicts the fix. format_turn_timeout_card says 'Do not resume this session until it becomes idle' for every outcome in _UNACKNOWLEDGED_CANCEL (turn_dispatch.py#L410-L416). Those are exactly the outcomes that now reset the runtime (ceiling_cut_unacknowledged, chat_runner.py#L16630). So the user is told to wait when the next message is the recovery this PR adds. Smallest fix: when the reset is taken, show the 'send a message to continue' wording, for example by passing the reset decision into format_turn_timeout_card, and add a test for it. This is the Opus lane's open finding at this head, which has no disposition yet.
  2. The restore of the cut-off turn's request and partial answer is deferred to a follow-up PR (Not a goal), but no issue is linked. Please open one issue that covers it, including the two GPT findings left open on the carry, and link it in the description.

This PR also adds new paths that kill and replace a chat runtime, so a human reviewer needs to sign off after these are fixed.

— crew-pr-reviewer (r106)

…swered

A dashboard chat turn whose backend went silent before it streamed
anything ended only at a ceiling, and the slot kept that runtime. The
stale-turn probe arms after a first text chunk or tool result, so a turn
silent from its start never produced the stale-recover stop reason that
resets the session. The dashboard ceiling's cancel and the transport's
"timeout" stop reason both left needs_session_reset unset. The silent
runtime still read alive, so the next message was sent to it and waited
out the whole ceiling again, on every message. The "timeout" stop
reason also showed the user nothing.

The ceiling's CancelledError arm now sets needs_session_reset when
ceiling_cut_unacknowledged() answers True: the ceiling's timer fired for
this turn and the native stop it sent ended "timeout", "no_turn" or
"error", the outcomes the timeout card already words as unacknowledged,
now one constant both read. An acknowledged stop ended the native
prompt, so that runtime keeps its session, as stop_turn keeps the
runtime of an acknowledged Stop. The finally's existing reset keeps the
conversation and replaces the runtime, as it does for stale-recover.

The arm reads the cut from the wrapper, not the clock. _bounded_turn
keeps one _TurnCut record per guarded turn, publishes it in a
ContextVar, and records in it that its timer fired and how the native
stop it sent ended, before it cancels the turn's task. An outside cancel
the wrapper handles first disarms the timer, which could otherwise run
in the same loop pass, record a cut and send session/cancel for a turn
a close ended. A closed tab, the idle sweep and shutdown keep their
session, as does the user's own Stop.

The timeout card follows what the arm did. It used to tell the user not
to resume until the session was idle for every unacknowledged outcome,
but those outcomes now replace the runtime, so the next message is the
recovery. When the arm sets the reset it also records that on the
turn's _TurnCut (mark_ceiling_reset), the wrapper carries it on
TurnTimeoutError, and format_turn_timeout_card takes it as
session_reset: a replaced runtime is told to send a message to
continue, while a cut that kept its runtime after an unacknowledged
stop still gets the warning.

A turn the transport ends with the "timeout" stop reason resets its
session too. That arm first saves the text the backend streamed as the
interrupted reply through _persist_partial_reply, since a save writes
no chunk row, attaches the footer the end-of-turn path attaches, through
the same owned-row writer, and appends UNFINISHED_TURN_NOTICE, the
notice the channel driver already posts for a timed-out turn. It returns
before the end-of-turn legs that take a reply to Slack and to a channel
such as Telegram, so those two legs move unchanged into one nested
helper, _deliver_to_linked_surfaces, called at the end of the turn and
by the arm, which sends the kept reply and then the notice through the
same audience fences. A normal end_turn is unchanged.

The ceiling tests run the turn under a long ceiling, wait until the
stream has started, and then move the loop clock past the turn's
deadline so the ceiling's own timer fires, so a slow start on a loaded
runner cannot let the timer land before the turn holds its slot.
@javenciu

Copy link
Copy Markdown
Contributor Author

Both points on f555fee are handled on this head.

  1. The ceiling card. Fixed. format_turn_timeout_card takes the reset decision as session_reset (src/kiro_crew/dashboard/turn_dispatch.py:418). The ceiling arm records the reset on the turn's _TurnCut right after it sets needs_session_reset (mark_ceiling_reset(), src/kiro_crew/dashboard/turn_dispatch.py:144, called at src/kiro_crew/dashboard/chat_runner.py:16673), _bounded_turn carries it on TurnTimeoutError.session_reset (src/kiro_crew/dashboard/turn_dispatch.py:699 and :718), and the card is worded from it. An unacknowledged stop whose runtime was replaced now says the runtime was replaced and to send a message to continue (src/kiro_crew/dashboard/turn_dispatch.py:434). An unacknowledged stop that kept its runtime still gets "Do not resume this session until it becomes idle" (src/kiro_crew/dashboard/turn_dispatch.py:442): the user's Stop racing the ceiling, or a turn that returned normally after the cut, takes no reset, so that warning is still true for them. I carried the decision on the cut record instead of deriving it from the outcome, because the outcome is not the reset decision: _run_chat resets only in its CancelledError arm and not on a Stop. An acknowledged stop and a ceiling with no native turn to stop keep the card they had.
    Tests: test/test_turn_dispatch.py::TestTimeoutCard (the wording both ways, and the acknowledged card unchanged), TestFinishTurnTask::test_a_turn_that_replaced_its_runtime_is_told_to_send_a_message (through the real wrapper and finish_turn_task), and in test/test_chat_runner_coverage.py the ceiling cases test_a_turn_cut_by_the_ceiling_resets_the_session[timeout|no_turn|error] (the real _run_chat: reset awaited once and the card says to send a message) and test_a_ceiling_cut_the_runtime_answered_keeps_the_session[acked|None] (card unchanged). Red first: with the previous head's two source files and the new tests, 9 of the 27 selected tests fail, among them all three reset cases on the old "Do not resume" wording; on this head both test files pass 470 of 470 in three runs (461 before).

  2. The deferred restore. Opened as Restore the cut-off turn's request and partial answer after a chat runtime is retired #21223 and linked from Not a goal. It covers restoring the cut-off turn's request and partial answer, quotes the two GPT findings left open on the carry (a second consecutive cut overwriting an unpaid restore, and a ceiling cut that completes without a local cancellation), maps each to the place on main where the same situation arises, and lists acceptance for the follow-up.

The sign-off on the paths that replace a runtime stays with a human reviewer.

@javenciu

Copy link
Copy Markdown
Contributor Author

span=e48125549479

  • The timeout card still says "Do not resume this session until it becomes idle" for a runtime the ceiling reset. fixed: the ceiling arm records the reset on the turn's cut (mark_ceiling_reset(), src/kiro_crew/dashboard/chat_runner.py:16673), TurnTimeoutError carries it (src/kiro_crew/dashboard/turn_dispatch.py:699), and format_turn_timeout_card(session_reset=True) tells the user the runtime was replaced and to send a message (src/kiro_crew/dashboard/turn_dispatch.py:434); a cut that kept its runtime keeps the warning (:442); test_a_turn_cut_by_the_ceiling_resets_the_session[timeout|no_turn|error] in test/test_chat_runner_coverage.py fails 3 of 3 on the previous head's source and passes 3 of 3 here.

@javenciu

Copy link
Copy Markdown
Contributor Author
  • Does a reset after an unacknowledged ceiling cut still load the earlier turns through session/load, now that the restore flag is dropped? kept: yes for a persistent chat, and the cut-off turn is the one thing it does not load. _run_chat resets with the defaults (src/kiro_crew/dashboard/chat_runner.py:18667), and reset() clears the resume pointer only under clear_conversation (src/kiro_crew/session_lifecycle.py:1554-1562), so the pointer survives; the allocation path reads it with _session_map.get (src/kiro_crew/session_allocation_parts/get_or_create.py:561) and hands it to the new client with set_resume_session_id (src/kiro_crew/session_allocation_parts/get_or_create.py:872), and the client then issues the load when _can_load_session holds (src/kiro_crew/acp/client.py:2418), which restores the turns the backend answered. The cut-off turn is not in that load (kiro-cli writes a prompt only once it is answered, docs/system-specs/modules/session.md "Interrupted-turn context restore"), and prev_turn_cancelled is armed on the session being retired (src/kiro_crew/session_lifecycle.py:3478), so it goes with it: the next prompt carries no restore of that turn, which is the stated trade-off under Not a goal, tracked in Restore the cut-off turn's request and partial answer after a chat runtime is retired #21223. A temporary or incognito chat keeps no resume pointer (src/kiro_crew/session_allocation_parts/get_or_create.py:853-854), so its successor starts a new native session, as after any other reset; the stale-recover path resets the same way (src/kiro_crew/dashboard/chat_runner.py:14879-14880).

@javenciu

Copy link
Copy Markdown
Contributor Author
  • Should "no_turn" reset? The provider saying no native turn was active could mean the prompt already ended and the runtime is healthy. kept: yes, and the healthy case never reaches "no_turn". Before it sends anything, cancel_owned_turn asks the provider for an independent done-boundary proof and returns None when the native turn already ended (src/kiro_crew/session_lifecycle.py:3462-3467, proof at src/kiro_crew/session.py:998-1021, True only when has_unfinished_turn() is exactly False), and None keeps the session. What can still come back as "no_turn" is a provider that cannot show the turn ended and reports no active turn: for ACP, a turn already cancelled whose acknowledgement has not arrived, or a stalled stdin, where has_active_turn is false (src/kiro_crew/acp/client_turn_control.py:1082-1094) while has_unfinished_turn stays true (src/kiro_crew/acp/client_turn_control.py:1097-1108), so the native turn is still open on that runtime. No await sits between the proof and provider.cancel (src/kiro_crew/session_lifecycle.py:3468-3479), so the state cannot change between them. test/test_session.py::TestStopTurn::test_cancel_owned_turn_skips_a_natively_completed_owner pins the None case and test_cancel_owned_turn_keeps_unfinished_no_turn_fail_closed the "no_turn" case; test/test_turn_dispatch.py::TestCeilingCutPredicates::test_the_record_reads_as_unacknowledged[no_turn-True] and [None-False] pin the predicate. A Stop still waiting for its acknowledgement takes the Stop branch first (src/kiro_crew/dashboard/chat_runner.py:16652) and does not reset.

@iamwhatever

Copy link
Copy Markdown
Contributor

HOLD at 48c1e6e for human review.

Both points from our r106 review are fixed. First, the timeout card now says the runtime was replaced and to send a message whenever the ceiling arm took the reset (turn_dispatch.py#L434, set at chat_runner.py#L16671). A cut that kept its runtime still gets the wait warning. Second, the deferred restore is #21223, which covers the restore and both open GPT findings and lists acceptance criteria. All AI lanes pass on this head, and the Design and First Principles punchlines have answers backed by code. I found no new defect, and all checks are green.

This PR adds paths that reset a session and replace its chat runtime, and it moves the Slack and cross-surface audience fences into a shared helper. A human reviewer needs to sign off. Our earlier CHANGES_REQUESTED review should be dismissed or superseded once that sign-off is given.

— crew-pr-reviewer (r107)

@javenciu

Copy link
Copy Markdown
Contributor Author

Closing without merging, to keep my open PRs to the ones close to landing.

The Oct 16 hold found both review points fixed and left this head (48c1e6e) for human review. Since then it has started conflicting with main's split of test/test_chat_runner_coverage.py (#21440).

The runtime retirement isn't on main as of 2e50054. I've deleted the branch; it can be restored from this page at 48c1e6e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants