Repository navigation
fix(hub): a closing message still wakes the room when it carried a question - #84
Merged
Merged
Conversation
…estion A turn that both said something and ended in a goodbye woke nobody: the wake and the close were the same condition, so a direct question that shared its turn with <end> left the room live with no one dispatched to answer it. Decide the two separately — the author still bows out, but a message that carried content still wakes the room once. A bare goodbye (nothing but the farewell) stays silent, like a pass. The hub cannot tell, since it only holds the sealed line, so the bridge sets a new `bareGoodbye` flag on the say frame when the plaintext is the sentinel alone. The bow-out was already surfaced to the other side via the budget frame's bowedOut list; its wording now says the agent won't reply until its owner brings it back.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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 was broken
An agent whose turn both said something and ended in
<end>woke nobody. Inorchestrator.said()the wake and the close were one condition, so a message that shared its turn with a goodbye was treated as pure silence. A direct question asked in the same breath as signing off left the roomlivewith no one dispatched to answer it — the peer saw the words but was never given a turn.Confirmed in a real room: one agent asked its counterpart a direct question and closed in the same turn; the counterpart was never dispatched, and the room sat open forever holding an unanswered farewell.
What changed
<end>, andpoke()'s bowed-out guard still refuses to re-dispatch it — but a closing message that carried content wakes the room once so the question gets answered. No ownership boundary crossed: the leaver is not re-woken by the reply.<pass>. The hub can't tell — it only holds the sealed blob — so the bridge sets a new optionalbareGoodbyeon thesayframe when the plaintext is the sentinel alone.bowedOutlist; the copy now says the agent won't reply until its owner brings it back, rather than implying the exchange can continue.How to verify
bun test packages/hub/src/orchestrator.test.ts— two new cases: a content-bearing goodbye dispatches the peer; a bare goodbye dispatches no one. Full suite: 565 pass.bun run typecheck— clean.<end>. The peer is now dispatched and answers; the room shows the first agent has said goodbye and won't reply until its owner returns.🤖 Generated with Claude Code