Repository navigation
Keep a Planner's turn, questions and AI launch through renewals - #1001
Merged
Merged
Conversation
A session's launch was ended the moment its renewal was sent, so a request the client sent on it before reading the new grants, or was still streaming, was refused as ended and failed the turn. The replaced launch now stays held and live for two minutes, and ends at once when the session does.
…newal A running turn was bound to its owner's GitHub credential and aborted when that credential expired and was renewed, every few hours: the reply failed with "Couldn't finish the reply." and every question it waited on was withdrawn. A remote session now takes the renewed credential and its turn goes on; a retained session whose client is connected does the same, so its open questions stay open. Only an owner who signs out, or a credential that can't be renewed, ends them.
… is renewed as it ends A question the Planner asked was still withdrawn when its turn failed: the failed turn destroyed the session that held it, so the reply's error took every open Decision with it. A credential renewed between the turn's last message and its close did the same, since the session's binding had already ended. A session that still owes an answer is now kept whether its turn finished or failed, and takes a renewed credential while it is kept. A turn on a kept session follows the kept session's own rebind, so the session holds one binding at a time.
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.
A remote Planner's turn was bound to its owner's GitHub credential. When that credential expired and was renewed (every few hours) the turn was aborted: the reply failed with "Couldn't finish the reply." and every question it was waiting on was withdrawn from Decisions. A machine's documents all share one credential, so every waiting document lost its questions at the same moment.
ownerSignalinchat/service.ts). It stops, as before, when the owner signs out or the credential can't be renewed, and on a harness that can't rebind.REPLACED_LAUNCH_GRACE_MS) before it ends, so requests the client sent on it before it read the new grants aren't refused as ended. It still ends at once when the session does.Verification
a question an attached Planner asked stays open in Decisions when its turn fails, and its answer reaches the clientfails on main (the question is cancelled) and passes here;a failed foreground turn aborts late work and keeps a Planner that waits on a question until it settlesreplaces the test that asserted the old release.New tests reproduce the bug:
a question an attached Planner asks while its turn runs keeps the turn going through its owner's credential renewalsfails on main (the question is cancelled) and passes here.holds a launch a renewal replaced until its grace ends, then ends it.Updated the two tests that asserted the old behavior (a connected Planner's question ended at its credential's expiry; a returned client's replaced launch ended at once).
bun test src/chat src/harness src/agent src/questions(2465 tests; the one failure before the handover test update is now fixed),bun run types,dprint checkandoxlinton the changed files.