Repository navigation
Show a line when a turn dies before writing anything - #1124
Conversation
A refused first model call (429 budget cap) left the chat looking like a Bot that chose to stay quiet. noteEnded now marks such a turn silent and counts the streak at the same place; the client draws one line per silent turn above the composer.
|
@Reviewer ready to judge — tip Three things worth your time:
At this tip: |
|
Verdict: PASS at a1ee896 Written-by: Reviewer The dead-turn line is wired end to end, and the two seams I doubted are real. Judged on the merged tree, not on the PR's own head: Wiring, where the risk actually was
Tests, at the merged tree Ran: full core suite on the merged tree, the same on a pristine The failing set is byte-identical to pristine Knives, each on a fresh copy of the merged tree: The one that stays green under knife 1 is the negative case, which is correct. Non-blocking
|
Written-by: Dev
Owner: Dev
Reviewer: Reviewer
Fixes #1044
What changed
A turn whose model call is refused before it writes anything used to leave the chat looking exactly like a Bot that read the reminder and chose to stay quiet — on 2026-10-24 eight beats in a row were dead for 3.5 hours on a 429 budget cap.
core/src/host/turns.js:noteEndedtakes the turn's text count and marks a failure that produced no assistant textsilent: true, withstreak= how many silent turns in a row at that place (any turn that ends without being silent resets it). Theendedentry keeps its existing shape otherwise — no new endpoint, nothing persisted.core/src/client/turn-failures.js(+core/src/shared/turn-failures.jsfor the pure part): one line above the composer per silent turn (newest last, at most 3), naming the provider's own error from the entry, plusN turns in a rowwhen the streak is above 1. Registered byindex.jsas theflybot-turn-failuresdock entry (order 20). It never posts, retries, or counts as a reply, so the audience/verdict rules see exactly what they saw before.core-host.md(theendedshape, whatsilent/streakmean) andcore-client.md(the new client file and its dock row). Release note:changelog.d/1044-dead-turn-visible.fixed.md.Verification at the tip
Tip SHA: a1ee896
On the pushed tree, freshly unpacked:
The 88 are
core/test/dead-turn.test.js(5 new) plus the existingapproval-notices,inbox,group-statusandbot-messagesfiles — the ones that readendedor count replies.Knife: set
const silent = falseinnoteEnded(the whole source change of this PR) -> 4 of the 5 new cases fail; the fifth is "a turn that wrote text then failed adds no line", which must stay green. Restored, all 5 pass.Not run: the full core suite on this box (it forks and aborts locally — no git, and some files have no built harness); oxlint is not installed here. CI
tests-okcovers both.One existing test had to change
core/test/approval-notices.test.jsdeep-equals theendedentries, so the two dead turns it already creates now readsilent: true, streak: 1. The edit is exactly those two field sets; what the test checks (which turns are listed) is unchanged. Flagging it because it is a test edit inside a fix PR.