Skip to content

fix(shim): a messages read right after connecting waits for registration (MUS-114) - #199

Merged
Castor-o7 merged 2 commits into
mainfrom
fix/mus-114-read-waits-for-registration
Nov 7, 2026
Merged

Castor-o7 merged 2 commits into
mainfrom
fix/mus-114-read-waits-for-registration

Conversation

@Castor-o7

Copy link
Copy Markdown
Owner

Why

scripts/test-restart-file-e2e.sh failed intermittently: on #185 at 255b343, on #194 at 18a1dd7 (neither diff touches it), and in 2 of 15 local runs at #185's head. With a copy of the script that prints the error the script normally throws away, the daemon's answer to the member's muster://messages?inbox=true&unread=true read was:

[unregistered] caller (client …) has no session on the roster — re-SET your Session and retry

A fresh shim read before its Session SET landed. The test's readiness loop passed early because is_self matched the session's row from the previous shim run, which has the same id and a dead connection. Tool calls already hold for registration and retry once on this refusal (MUS-72, MUS-79). The messages read did neither. A real agent reading its inbox right after a restart could hit the same refusal.

What

  • The hold and the retry-once are moved out of call_tool into as_registered, and the messages resource uses it too. The tool path behaves the same.
  • Roadmap entry for MUS-114 (ledger record 1046).

Checked

  • cargo test -p muster-shim --bins: 151 passed.
  • cargo clippy -p muster-shim --all-targets -D warnings: clean.
  • The restart-file e2e, run 30 times locally with the fix: 0 failed (before: 2 of 15).

Not covered

🤖 Generated with Claude Code

Castor-o7 and others added 2 commits November 6, 2026 22:28
…ion (MUS-114)

The restart-file e2e failed intermittently in CI (#185, #194) and in 2 of
15 local runs: a fresh shim's muster://messages read was refused as
unregistered before its Session SET landed. Tool calls already held for
registration and retried once on that refusal (MUS-72, MUS-79); the read
did neither. Both now go through as_registered. 0 of 30 local runs failed
with the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Castor-o7
Castor-o7 merged commit f20aa7f into main Nov 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant