Repository navigation
fix(transport-matrix): zooid_send_message accepts a bound room's configured alias - #146
Merged
Merged
Conversation
…igured alias bootstrap rewrote binding.alias to the canonical !id, so a send to the configured #alias failed not_in_room. Keep the configured selector on the binding (configuredAlias) and resolve either form locally (ZOD084); the not_in_room error now lists the agent's rooms. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
zooidbot
commented
Oct 14, 2026
zooidbot
left a comment
Collaborator
Author
There was a problem hiding this comment.
Lead review: no blocking findings. Merging.
- Bare
#localpart: accepting it is the right call. Without it, the exact call reported in #104 would still fail, and refusing it when two servers match is the safe default. - Production wiring:
build-registry.ts:387passesagent.matrix.rooms, the same binding objectsBotPool.bootstrapmutates, soconfiguredAliasreaches the provider in production as well as in the test. - Resolution: it's local only, with no homeserver call, which matches ZOD084. The not_in_room message now lists the agent's rooms.
- CI:
test-infrais green, which covers the infra tier that couldn't run in the sandbox.
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.
Closes #104
Repro: not run live (no Tuwunel/daemon in the sandbox). Reproduced from code:
BotPool.bootstrapsetbinding.alias = resolved, soMatrixContextProvider.sendMessagecompared#productagainst!idand threwnot_in_room. The new test fails onmainfor that reason.What was wrong: bootstrap threw away the configured alias, and the provider only matched the canonical ID.
What changed
RoomBinding(core) gains optionalconfiguredAlias;bot-pool.tssets it before rewritingalias.context-provider.tsresolves the selector locally (no homeserver call, per ZOD084): canonical ID, configured alias, or a bare#localpart. It sends to the canonical ID.#localpartis included because core config normalizes#productto#product:<server>, so matching the stored alias alone would still reject the exact input in the bug report. A bare name matching rooms on two servers is refused.not_in_roomnow ends withRooms this agent is in: <ids>.r.alias ===sites (router.ts,task-dispatch.ts,transport.ts:1954) compare event or caller room IDs, not agent input, so they are unchanged.Tests:
pnpm testin transport-matrix (460 passed, 9 skipped); rootpnpm test:ci,pnpm test:socketandpnpm typecheckpass. New tests run the realBotPool.bootstraprewrite, then send via the#alias, bare#localpartand!id, the unbound-room error listing, and the two-server ambiguity.bot-pool.test.tsupdated for the new field.Not verified: transport-matrix
test:infra(context-provider.integration,media.integration) needs Tuwunel/Podman and is skipped in this sandbox; the tier runner reports the skips as a failure, so it did not run. Not exercised against the live daemon.Knowledge impact: ZOD084 (already specifies this; the code now matches it). Its "configured selector" wording doesn't mention the bare
#localpartform.🤖 Generated with Claude Code