Skip to content

Hidden CLI: l9 send / slim send — inject L9/SLIM wire traffic (dev/testing) - #534

Merged
juliarvalenti merged 1 commit into
mainfrom
claude/github-issue-533-nq6fjj
Aug 15, 2026
Merged

Hidden CLI: l9 send / slim send — inject L9/SLIM wire traffic (dev/testing)#534
juliarvalenti merged 1 commit into
mainfrom
claude/github-issue-533-nq6fjj

Conversation

@juliarvalenti

Copy link
Copy Markdown
Contributor

Summary

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 generic build_envelope_content() supporting any kind/subkind (the existing build_reply_content() now delegates to it as the exchange-reply specialization), plus a VALID_SUBKINDS table mirroring the backend's app.services.l9.VALID_SUBKINDS, with validate_kind/validate_subkind run before anything touches the wire.
  • mycelium.commands.wire (new): the two CLI commands, registered hidden=True and never @doc_ref'd, so they stay out of mycelium --help and 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; both test_slim_l9_wire.py suites (backend + CLI) assert against it so the two copies can't silently drift.

Testing

  • Unit tests pass (uv run pytest tests/ -x -q, both mycelium-cli and fastapi-backend)
  • Linting passes (uv run ruff check .)
  • Format check passes (uv run ruff format --check .)
  • Type check passes (uv run ty check .)
  • Added unit coverage: envelope construction against the wire contract (new + existing test_slim_l9_wire.py cases), kind/subkind validation (test_slim_l9.py), the join/publish sequence via the FakeSlimClient/fake_httpx fixtures (test_slim_member.py), and the CLI plumbing — hidden-from-help, validation-before-publish, envelope shape, --text/--json exclusivity (test_wire_cli.py).
  • Not tested live against a running SLIM node / L9 Inspector (no node available in this environment) — the wire-contract and fake-transport tests cover the envelope shape and control flow; a live smoke test against the Inspector is still worth doing before closing out L9 inspector: expand a wire-feed row into full envelope JSON #501.

Related Issues

Closes #533


Generated by Claude Code

…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
juliarvalenti force-pushed the claude/github-issue-533-nq6fjj branch from 4abb785 to af452fd Compare August 15, 2026 00:13
@juliarvalenti
juliarvalenti merged commit a09d336 into main Aug 15, 2026
5 checks passed
@juliarvalenti
juliarvalenti deleted the claude/github-issue-533-nq6fjj branch August 15, 2026 00:15
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.

Hidden CLI utilities: inject L9 payloads + raw SLIM messages into a room (dev/testing)

2 participants