Skip to content

feat(comms): Rust-native !continuum bridge parser (comms→airc lane, slice 2) - #1635

Merged
joelteply merged 1 commit into
canaryfrom
feat/airc-bridge-parser-rust
Jun 16, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/airc-bridge-parser-rust

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

Ports AircBridgeProtocol.ts → continuum-core airc::bridge_protocol — the transport-agnostic, security-critical half of the inbound airc→continuum bridge.

Why (headless-first)

Today the only way to reach that parser is to shell out: tools/scripts/continuum-airc-bridge.mjs pipes each airc line into jtag airc/bridge, which runs the TS parser under Node. Per the headless-first doctrine ([[rust-is-the-core-node-is-the-shell]], [[headless-rust-is-canonical-many-uis-optional]]) continuum-core must classify inbound airc text natively, with no Node hop. Node is for the human-facing UI only; a server/container instance must do this in Rust. This is that parser.

Security contract preserved

  • Only !continuum-prefixed text reaches the deny-by-default allowlist (ping/status/rooms/activity list/export/assert seen/chat).
  • Everything else is conversation, bridged verbatim — peer content is not instructions (vuln-A <pm-NONCE>).
  • A [continuum] self-echo maps to Skip to break mirror loops.

Shape

Pure unit, transport-agnostic (tested without a live mesh), faithful to the TS so both can run side-by-side during the transition and a parity test can pin them. 17 unit tests, all green under --features metal,accelerate. Later slices wire the airc inbound stream into it and dispatch the parsed action to the kernel.

🤖 Generated with Claude Code

…lice 2)

Port AircBridgeProtocol.ts → continuum-core airc::bridge_protocol — the
transport-agnostic, security-critical half of the inbound airc→continuum
bridge. Today the only path to that parser is shelling out:
continuum-airc-bridge.mjs pipes each airc line into `jtag airc/bridge`,
which runs the TS parser under Node. Per the headless-first doctrine
([[rust-is-the-core-node-is-the-shell]]) continuum-core must classify
inbound airc text natively, with no Node hop. This is that parser.

Faithful to the TS so the two can run side by side during the transition
and a parity test can pin them. Deny-by-default allowlist preserved:
only !continuum-prefixed text reaches the bounded verb set
(ping/status/rooms/activity list/export/assert seen/chat); everything
else is CONVERSATION bridged verbatim (vuln-A: peer content is not
instructions); a [continuum] self-echo is skipped to break loops.

Pure unit, 17 tests, no mesh required. Later slices wire the airc inbound
stream into it and dispatch the parsed action to the kernel.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit ab3fcaa into canary Jun 16, 2026
4 checks passed
@joelteply
joelteply deleted the feat/airc-bridge-parser-rust branch June 16, 2026 01:30
joelteply added a commit that referenced this pull request Jun 16, 2026
…onsumer (slice 3a) (#1643)

Wires the Rust bridge parser (#1635) into the live inbound airc path, OFF the
transport hot path: AircBridgeDirectiveModule subscribes via MessageBus::receiver()
and spawns a consume loop on initialize, filters chat: events, classifies via
parse_airc_bridge_message, and emits an observable airc:bridge:directive event +
probe. NO command execution — that's the security-sensitive slice 3b that will
subscribe to this event (vuln-A: peer content is conversation, not instructions).

Agentic review caught a BLOCKER on the first cut and drove this design:
- async event_subscriptions do NOT auto-invoke handle_event; the inbound path's
  publish_async_only only feeds the broadcast channel. A handle_event override was
  dead code. FIX: real receiver() consume loop (the actual async-delivery
  mechanism), proven by the directive_flows_through_the_real_bus integration test
  (end-to-end through the bus — pure-fn tests can't catch dead wiring).
- event name is peer-settable → filter on the chat: PREFIX (robust), and the
  safety guarantee is the parser's deny-by-default allowlist, NOT the name.
- length cap (16KB) bounds peer-controlled tokenize CPU/alloc.

Architecturally accommodating to media/WebRTC/all transport: only continuum-body-hint
envelopes project to bus events (media forwarded opaque), and this filters to chat:
— presence/media/transport never classified. Additive: one more consumer + event in
an event-rich system. 9 unit+integration tests green under --features metal,accelerate.

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Oct 31, 2026
Card 2a0d34cf: land the identity custody fix in base.

762adeb2 is the airc canary head + the read-never-mints identity
custody fix (fix/read-never-mints-identity, card 4b2dbdf3): a READ of
the work board on a named home no longer silently mints and overwrites
a citizen's identity.key; init --as mints explicitly.

Bumps every workspace pin in Cargo.toml [workspace.dependencies]
(airc-core, airc-blobs, airc-protocol, airc-ipc, airc-bus, airc-lib,
airc-wire, airc-trust, airc-work) and re-resolves Cargo.lock to the new
rev (15 lock entries).

This rev already carries #1623 (sealed progress / terminal reply
lifecycle, which satisfied the c7083d04 BLOCKED note) plus #1618, #1624,
#1630, #1633, #1635 on top.

Suite status: airc suite green at 762adeb2 (identity_commands 10/10,
airc-identity unit+doc). continuum suite re-run follows against this pin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant