Repository navigation
fix(supervisor): a turn that follows a reported wake takes a new access token first - #40
Merged
Merged
Conversation
…ss token before its first request to the core
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.
What
A spot that runs as an Agent Substrate actor reports a wake, and the core suspends the actor a moment later; the access token ends there. A turn that started inside that moment, in the same run, used the ended token: its first request to the core, the read of the standing notes, was refused, and the turn went on without its notes until a later tool call said hello again.
The link now remembers that a wake report reached the core since the token was taken (
Link.RenewAfterReport), and the supervisor says hello before the first request of a turn in that case (renewToken, inturnandstartSide). A turn that follows no report makes no extra call.Checked
make checkpasses;TestLinkRenewsItsTokenAfterAWakeReportcovers no report, after a report, and twice in a row. Run on a test cluster: turns work as before. The race itself was not reproduced by hand there.