Hidden CLI: l9 send / slim send — inject L9/SLIM wire traffic (dev/testing) - #534
Merged
Merged
Conversation
…ic (#533) Undocumented dev/testing plumbing for pushing crafted L9 envelopes or raw SLIM messages onto a room's real channel, keyed to a sender handle. Joins as an ephemeral SLIM member (`mycelium.slim.member.publish_once`), asking the backend to invite it in the same way a resident connector does, so the backend's own persister/bus sees the traffic — a same-process shortcut (e.g. writing to the bus from another process) can't reach it. - `mycelium.slim.l9` gains a generic `build_envelope_content` (any kind/subkind) plus a `VALID_SUBKINDS` table mirroring the backend's, with `validate_kind`/`validate_subkind` run before anything touches the wire. `build_reply_content` now delegates to it. - `contracts/slim-l9-wire.json` gains the frozen subkind table; both `test_slim_l9_wire.py` suites assert against it so the CLI/backend copies can't drift. - Both commands are `hidden=True` and never `@doc_ref`'d, so they stay out of `mycelium --help` and the generated docs site, with a runtime banner noting they bypass the aligner.
juliarvalenti
force-pushed
the
claude/github-issue-533-nq6fjj
branch
from
August 15, 2026 00:13
4abb785 to
af452fd
Compare
This was referenced Aug 15, 2026
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.
Summary
git cat-file-style plumbing requested in Hidden CLI utilities: inject L9 payloads + raw SLIM messages into a room (dev/testing) #533, unblocking visual QA of the L9 Inspector (L9 inspector: expand a wire-feed row into full envelope JSON #501).mycelium l9 send --room R --as @handle --kind <kind> [--subkind <subkind>] [--data <json>] [...]— builds and publishes a hand-crafted L9 envelope.mycelium slim send --room R --as @handle --text "..."(or--json '{...}') — publishes an arbitrary raw message with no L9 semantics.Changes
mycelium.slim.member(new): ephemeral SLIM room membership —publish_once()joins a room as a given handle (asking the backend to invite it, the same call a resident connector makes on reconnect), waits to be admitted into the moderator's encrypted group, publishes one payload, and disconnects. This rides the real SLIM channel so the backend's own already-running persister/bus sees the traffic — a same-process shortcut (e.g. writing straight to the in-process bus from another process) can't reach it.mycelium.slim.l9: adds a genericbuild_envelope_content()supporting any kind/subkind (the existingbuild_reply_content()now delegates to it as theexchange-reply specialization), plus aVALID_SUBKINDStable mirroring the backend'sapp.services.l9.VALID_SUBKINDS, withvalidate_kind/validate_subkindrun before anything touches the wire.mycelium.commands.wire(new): the two CLI commands, registeredhidden=Trueand never@doc_ref'd, so they stay out ofmycelium --helpand the generated docs site. Each prints a runtime banner noting it bypasses the aligner and is for testing/demo only.contracts/slim-l9-wire.json: gains the frozen subkind table; bothtest_slim_l9_wire.pysuites (backend + CLI) assert against it so the two copies can't silently drift.Testing
uv run pytest tests/ -x -q, bothmycelium-cliandfastapi-backend)uv run ruff check .)uv run ruff format --check .)uv run ty check .)test_slim_l9_wire.pycases), kind/subkind validation (test_slim_l9.py), the join/publish sequence via theFakeSlimClient/fake_httpxfixtures (test_slim_member.py), and the CLI plumbing — hidden-from-help, validation-before-publish, envelope shape,--text/--jsonexclusivity (test_wire_cli.py).Related Issues
Closes #533
Generated by Claude Code