Repository navigation
Timed-out waits tell the asker who is silent and to ask the user - #21
Merged
Merged
Conversation
Merged
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 timed-out
murmur_wait(ormurmur_sendwithwait) now carries anotethat tells the asker who is still silent and not to start work that could overlap theirs: ask the user, or wait again.Why
On timeout the result was only
conditionMet: false, timedOut: trueplus the matrix (resolveTimedOut,src/broker.ts), and nothing told the asking agent what to do next. A session stuck in a long tool call misses the window, and then both sessions can decide to go ahead. Suggested on the Reddit post: default the asker to pinging the user on timeout, because one extra ping costs less than two sessions doing the same work.What changed
WaitResultgets an optionalnote(src/protocol.ts).timeoutNote()builds it from the matrix inresolveTimedOut, for example:timed out: bob, carol have the message but have not replied; dave has not confirmed receipt. Do not start work that could overlap theirs: ask the user, or murmur_wait again.deliveredandacknowledgedcount as having the message;queuedandsentas unconfirmed (sentonly means a transport took it).repliedis never named.timeoutMs: 0: that is a status check that never waited, so it gets no advice about waiting.docs/consult.md,docs/reference/protocol.md(the wait row also gains therepliesfield it was missing), CHANGELOG[Unreleased]Added.Issue
No issue filed. From a comment on the Reddit post.
How it was verified
AssertionError: expected undefined to be 'timed out: bob have the message but h...', and for the snapshot checkexpected true to be false). They pass with the change.npm run coverage:Tests 512 passed (512), 100 percent on statements (2325/2325), branches (1306/1306), functions (430/430) and lines (2247/2247).tsc --noEmitexit 0, markdownlint 0 issues, typos exit 0, no em or en dashes in the diff.resolveTimedOutreads the matrix synchronously, and a reply handled first resolves the wait throughcheckWaitersand clears its timer.JSON.stringifythe whole result).Behavior changes
A timed-out wait result can have a new
notefield. Nothing else changes.