fix(bus): a room name may not start with '-' - #2
Merged
Conversation
Every bb bus subcommand takes the room POSITIONALLY, so a flag in the room slot became a room name. `bb bus join --room ops` CREATED a room called `--room`; after that `bb bus send --room ops "..."` found it, passed the existing "no such room" check, and posted there with exit 0. Nine threads sent 15 messages into that room over 14 hours on 2026-08-11/12 (plus an empty `--help` room from the same mistake). Nothing surfaced it, because a misrouted send is indistinguishable from a peer that went quiet. Guarded in two places: - validateRoom() in lib.ts, called by parseSend, so a bad `send` fails. - One gate over argv[1] in server.ts covering every subcommand, so `join` can no longer create the room that makes `send` stop complaining. Only a LEADING dash is rejected. Dashes inside a name stay legal, and flag-shaped words in a message BODY stay prose — that behaviour is tested. The SKILL.md gains a "two ways a send looks like success and delivers nothing" section: this, plus the shell eating backticks/$() before bb sees argv. Both were already in bb memory and both recurred anyway; memory only fires when you think to search, a loaded skill fires when the task matches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The hole
Every
bb bussubcommand takes the room positionally. A flag in the room slot therefore became a room name:sendalready refused unknown rooms — butjoinhad created it first, so the guard never fired. Nine threads sent 15 messages into--roomover 14 hours on 2026-08-11/12; a second empty room--helpcame from the same mistake. Nothing surfaced it, because a misrouted send is indistinguishable from a peer that went quiet.The fix
validateRoom()inlib.ts, called byparseSend— badsendfails.argv[1]inserver.tscovering every subcommand —joincan no longer create the room that makessendstop complaining.Only a leading dash is rejected.
vat-audit-2026stays legal, and flag-shaped words in a message body stay prose (existing test unchanged, plus live check).Why the skill changed too
Both this and the shell-eats-backticks failure were already written down in bb memory, and both recurred anyway. Memory only fires when you think to search — and nobody searches for how to type a command they believe they know.
skills/bus/SKILL.mdgains a "Two ways a send looks like success and delivers nothing" section, because a skill loads when the task matches, not when you suspect you are wrong.Verification
13/13 unit tests,
tsc --noEmitclean, and exercised live against the running plugin:bb bus send --room zz-syntax-probe "…"bb bus join --room zz-syntax-probebb bus join zz-syntax-probebb bus send zz-syntax-probe "use --force on the rebase"--forceintact in bodyNo new dash-prefixed room was created during testing.
The two existing bogus rooms are left in place deliberately — re-delivering 14-hour-old status would wake nine threads with stale information.
🤖 Generated with Claude Code