You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Rangsh (via GitHub)" <gi...@apache.org> on 2026/09/04 16:38:21 UTC
Re: [PR] fix(desktop,runtime): interrupt and bound empty assistant loops [maka]
Rangsh commented on PR #4138:
URL: https://github.com/apache/maka/pull/4138#issuecomment-5543609490
@Astro-Han Thanks for the careful re-review — addressed all three points and rebased onto current main so CI can run.
**P2 alternating signatures.** Agreed that consecutive-equality alone lets `A B A B …` walk past the cap. Kept the 3-step identical streak (ordinary multi-step work still won’t trip it), and added a sliding window of the last 6 empty-step signatures: once the window is full and `unique < length`, we stop as `step_limit`. Added a regression that alternates two textless Read inputs and asserts the turn ends after 6 steps.
**P2 `resolveFollowUpModeAtSubmit`.** Deleted. Call site now uses `!slashCommand ? metadata?.followUpMode : undefined` directly; `hasActiveTurnAtSubmit` stays for the interrupt branch.
**Stop → send / `session_busy`.** Host-side `turn.interrupt` awaits the cancelled turn’s terminal fact (`claim.terminal`) before resolving success. Desktop only falls through to the new root send after `sessions.stop` returns `interrupted`, so admission is ordered by that await — not “usually fast enough” relative to settlement. Documented that invariant next to the interrupt-then-send path. Happy to add a Host test that holds settlement open if you’d still like an explicit regression for a non-awaiting caller; this Desktop path doesn’t need one.
Verification: `node --test --test-name-pattern="stops an unbounded loop" packages/runtime/dist/__tests__/ai-sdk-backend.test.js` — pass (4 cases, including the new alternating-window one).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org