Skip to content

Land the webrtc framer transport crate (D2) - #721

Closed
MattJackson wants to merge 28 commits into
predevfrom
lane-task-row-132b-webrtc-framer
Closed

MattJackson wants to merge 28 commits into
predevfrom
lane-task-row-132b-webrtc-framer

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

Status row 132, piece D2: the webrtc framer transport crate and its dropped-in door, built and tested on predev. Starts from the WIP commit 185d3b2 (cherry-picked alone; D1 #706 had no overlapping hunks).

What changed after the WIP

  • Builds against str0m 0.24.1. The one compile error was media data arriving as Arc<[u8]>.
  • Every name from the media stack's DTLS interface now lives in src/shim.rs: the provider, the certificate, and the keying-profile mapping. The shim refuses any profile other than AEAD-AES-GCM. No DTLS engine is named anywhere.
  • Fixed a drain bug: SCTP packets queued for sealing during the poll that answered a timeout were never routed, so data channels never opened. With the fix, the end-to-end session test passes.
  • Address types now come from core::net instead of std::net. These are address types only; the dep-wall gate bans std::net in plugin source.
  • *_streams fields renamed to *_by_stream (the vocab gate read them as the streaming plane's name).
  • The plugin twin is this crate's own cdylib, behind a dropped-in feature, the same way busbar-transport-stdio does it. The WIP's separate busbar-transport-webrtc-plugin crate depends on the logic crate, which breaches kind-isolation:closure (deps: bump schemars from 1.2.1 to 1.2.2 #40(a), OWNER-LOCKED: a plugin's workspace closure is busbar-contract alone). plugins.yaml keeps crate: busbar-transport-webrtc-plugin (pending_crate), as stdio's row does.
  • qa/construction.toml: added a manifest-allowlist row naming this crate's own third-party dependencies (str0m, ring, aes, zeroize), under the PLUGIN LIBRARIES ruling.

Tests (each with a RED arm), all passing on Latchkey: cargo test -p busbar-transport-webrtc (24 tests)

  • AES_CM refused: by the cipher in both directions and at the keying item. RED arm: the GCM ciphers seal and open.
  • Dependency closure (tests/dependency_closure.rs): aes/cipher/inout are confined to the SRTP key derivation, both in Cargo.lock and in the source. RED arms: a second crate depending on aes, and the framing naming aes, are both refused.
  • Spoofed ICE path is not rebound; application data before peer verification is dropped (WIP tests, now passing).
  • Keys zeroised on drop (tests/zeroise.rs, a watching allocator). RED arm: the same key in a plain Vec is seen freed unzeroed.
  • The framer source names no DTLS type (tests/no_dtls.rs). RED arms: an engine in the shim, and the DTLS interface outside the shim, are both refused.
  • Both doors through the loader's transport table (tests/conformance.rs, following export_conformance_tests): the linked and dropped-in doors state the same Statement and give equal transcripts. RED arm: the cdylib admitted against a different Statement is refused.

Needs the owner

  • kind-isolation:transport-registration is RED for this crate. The rule requires every wire to be composed in the root's [package.metadata.busbar.linked] table. Linking a datagram framer into the busbar binary is a composition-root change; it may touch boot and golden fixtures, and the connector can't serve it yet. I left it out of D2. Either register it here or carry it with the connector piece.
  • In the same gate run, kind-isolation's deps, test-deps and law0 rows were red, but their findings name only pre-existing items: no merge base on a detached checkout, legacy edges, and law0 counts in crates this PR doesn't touch. None names webrtc.
  • str0m 0.24.1 depends on dimpl unconditionally, so a DTLS engine is in the crate's build graph even though the framer never instantiates it. The tests check the framer's source, not its closure.

…dropped-in door into the crate, add its tests

The framer builds against str0m 0.24.1 (media data is an Arc<[u8]>). Every name of the media
stack's DTLS interface moves into src/shim.rs (provider, certificate, profile mapping); the
shim refuses any keying profile but AEAD-AES-GCM. The drain routes what the stack queued for
sealing on every poll, the last one included, so SCTP reaches the far end. Address types come
from core::net. The dropped-in door is this crate's cdylib under a dropped-in feature, as
stdio's is, so the crate's closure stays busbar-contract plus its framing libraries.

Tests: AES_CM refused (cipher and keying item), the aes/cipher/inout dependency closure, no
DTLS type outside the shim, keys zeroised on drop (a watching allocator), and both doors
through the loader's transport table, each with its RED arm.
@MattJackson
MattJackson enabled auto-merge October 10, 2026 04:44
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

promote into predev: NO VERDICT @a31461adf

Run gate (busbar-release decides; do exactly what it says): promote.yml wiring drift: jobs.preflight.permissions (contents read only: it runs candidate code) | promote.yml wiring drift: jobs.preflight-act.needs (preflight: it consumes its act artifact) | promote.yml wiring drift: jobs.preflight-act.permissions (the gate's writes, and only them) | promote.yml wiring drift: jobs.preflight-act runs ci preflight-act | promote.yml wiring drift: jobs.slsa-build.if (every rung that reads the release artifact: || needs_release_artifact == 'true') | promote.yml wiring drift: jobs.hop --must-run slsa-build (the fold denies a skipped slsa-build without it) | promote.yml wiring drift: jobs.hop --must-run soak (the fold denies a skipped soak without it)

Preflight red (1):

  • gate:R6 WIRING: promote.yml wiring drift: jobs.preflight.permissions (contents read only: it runs candidate code) | promote.yml wiring drift: jobs.preflight-act.needs (preflight: it consumes its act artifact) | promote.yml wiring drift: jobs.preflight-act.permissions (the gate's writes, and only the

The hop ended without writing a verdict (runner lost, timeout, cancel, or it died before the engine judged): preflight: failure at step Run act=(); publish: runner lost at step Run $RUNNER_TEMP/busbar-release ci fallback, Post Run actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1.

No failing-test list exists for this run. Run: https://github.com/GetBusbar/busbar/actions/runs/38207069213 . Re-run the hop, or read the job's step list in the run page.

… drain its name from core

Clippy (-D warnings): the stun-success arms in framing.rs and the audio MediaAdded arm fold their
`if` into the match guard (collapsible_match); read_remote's return type is a `Remote` alias
(type_complexity); door.rs's piece loop is a `while let` (while_let_loop).

kind-isolation:transport-registration: the webrtc wire was composed in no place. The root links
it as a `transport-webrtc` row on the transport and transport-door axes, behind an optional,
off-by-default feature of the same name (the crate edge and the row together, as transport-ws).
Its linked entry gains COMPOSES_OVER (none) and SESSION (true, its claim row's session) beside
KEY and door. The shipped fold and session fixtures carry its row (both count rows a build
leaves off); qa/kind-isolation.toml names the busbar -> busbar-transport-webrtc edge.

kind-isolation:law0 (18 -> 20): the new crate made `webrtc` transport-instance vocabulary, so
core's existing mentions became hits (busbar-core-connector 68 -> 76, busbar-contract 226 -> 230).
Drained, not re-ceilinged: the connector's docs say "media association", the contract's
composition tests use a made-up `dgram` wire over `udp`.

Proved on Latchkey: clippy -p busbar-transport-webrtc --all-targets -D warnings; check -p busbar
--features transport-webrtc --tests; test -p busbar body_chunk_bounds and
transport_composed_over_consistency; gate kind-isolation and kind-isolation-ship
(transport-registration PASS, law0 back to 18 findings, the rest at base); selftest
kind-isolation and kind-isolation-ship; xtask plant_tests a_wire_composed_in_no_place_is_red_and_the_real_tree_has_none
and a_manifest_row_is_the_wires_one_registration. The per-crate clippy rows (core-duplex-ws,
loader-pack, ...) and the workspace selftest_runs_every_registered_gates_red_proof row share these
causes and are left to CI.
@MattJackson
MattJackson added this pull request to the merge queue Oct 10, 2026
@MattJackson
MattJackson removed this pull request from the merge queue due to a manual request Oct 10, 2026
@MattJackson MattJackson added fixing and removed fixing labels Oct 10, 2026
…rtc census id added

Landing busbar-transport-webrtc teaches the census the transport id `webrtc`,
so every `webrtc` in the composition root (a core-neutral crate) became a
busbar x transport hit: 12 in tests/plane_transport_neutrality.rs's own
source and 3 fixture rows (transport_fold.txt, transport_sessions.txt,
session_transport_nouns.txt), figure 11 -> 26. The [[law0]] ceiling does not
rise, so the cell is drained back to it:

- plane_transport_neutrality.rs no longer spells the noun in its own source
  (its fixture already holds the list "so the scanner's own source spells no
  word it bans"): the self-test plants `mulaw` / `dtmf_digit_count` for the
  bare-word and snake_case cases instead, which proves the same two rules;
  the noun list and the detector are unchanged (-12).
- The three fixture rows stay: the fold and session rows are read by the
  all-features build that links the wire, and the noun row mirrors the xtask
  twin's NOUNS. They are offset by three prose-only names of the line
  carrier's transport in the root's docs (serve_lines.rs x2, serve.rs x1),
  reworded to "line carrier"/"line transport" (-3).

Not run locally: the Latchkey run budget (RUN_CAP) is spent; the count is
reasoned from the matrix scanner (every non-Cargo.toml file under the crate,
occurrences per line, `webrtc`/`stdio` unmasked) and the PR's CI is the proof
for gate:kind-isolation and gate:kind-isolation-ship.
@MattJackson MattJackson added fixing and removed fixing labels Oct 10, 2026
The red row (nextest busbar-kernel-egress::swrr_allocation::
a_warm_pools_selection_allocates_nothing) was a first-try FAIL that passed on
retry: the run reported failed 0, and the turnstile reads a TRY 1 FAIL as a red
row. Nothing in this PR touches the egress unit (src and test are byte-identical
to predev). The witness was racy: its counting flag was process-global, so
libtest's main thread, still filing the test it had just spawned, could
allocate inside the measuring window on a loaded shard.

Ruling: the witness measures the op, not the process. THE DESIGN A.8
(docs/design/BUSBAR-1.6.0.md l.3561: "A counting-allocator witness is 0 for
each request-path op"; l.1285 "no allocation and no blocking on the hot
path"). The flag is now thread-local. select_weighted runs wholly on the
calling thread, so every allocation it makes is still counted and the
assertion (== 0) is unchanged.
@MattJackson
MattJackson added this pull request to the merge queue Oct 10, 2026
@MattJackson
MattJackson removed this pull request from the merge queue due to a manual request Oct 10, 2026
@MattJackson MattJackson added fixing and removed fixing labels Oct 10, 2026
…plane edges

The webrtc framer adds six non-test .rs files under crates/, so the
population (941 at base) is 947 and the one-file-short selftest plant no
longer goes red: blocking-ffi, response-header and settings-leak selftests
failed on it. population::FLOOR is a ratchet pinned at the measured count,
so it moves to 947. The tracing selftest is fixed by merging predev
(13a9ecb, the SCAN_FLOOR plant cuts with Overlay::below_floor).

This branch touches qa/kind-isolation.toml, which arms kind-isolation:deps.
That row was red for two standing edges with no rows: busbar-llm ->
busbar-plane-llm (no [[dep]] row and no [[transitional]] drain row) and
busbar-voice -> busbar-plane-streaming (no [[dep]] row). Both are legacy ->
plane drain edges at count 1; they get not-allowed [[dep]] rows and the llm
edge gets its [[transitional]] row, on the same terms as busbar-a2a ->
busbar-plane-a2a.

Not proved on Latchkey: busbar-release dev refused every row (run budget
spent, RUN_CAP 4000/4000). Reasoned from the CI log of run 38094908998;
the PR's CI is the proof.
@MattJackson MattJackson added fixing and removed fixing labels Oct 11, 2026
Conflict in xtask/src/gates/population.rs (FLOOR): keep both sides.
predev's computed one_file_short plant and its note stay; FLOOR stays
at 947, the census measured with this branch's six
busbar-transport-webrtc/src files, because a census floor "pins its
ceiling at TODAY'S MEASURED VALUE" (BUSBAR-1.6.0.md:2090-2092).
Predev's own floor guarantees >= 941 files there, so the merged tree
holds >= 947.
@MattJackson

Copy link
Copy Markdown
Collaborator Author

Claim released by busbar-release: the fixing label had no live agent behind it: no push and no new claim for 15h55m (the longest agent's hard timeout is 2h00m), so it is off and the PR is back in the pipeline.

…door, chosen by rank

busbar-transport-webrtc's conformance (2 tests) failed at `stated()`: "the cdylib exports
busbar_plugin_door". `choose_cdylib` took `target/debug/libbusbar_transport_webrtc.*`, uplifted by
an earlier plain build without the `dropped-in` feature, so that image has no door. The test
build's own image, `deps/libbusbar_transport_webrtc.*`, does export it but was never a candidate:
cargo names a workspace cdylib with no metadata hash, and a `cargo test` never uplifts a lib's
cdylib (the lib is not a root unit), so the uplifted file is only ever another build's.

The choice now ranks: the image CDYLIB_ENV names; the lib unit's own unhashed `deps/<lib>`; the
uplifted image; the one hashed image. At every rank an image that does not load or exports no
`busbar_plugin_door` is passed over, and only doorless images built is a failure naming them.

Why this over a dedicated target dir: the suite is published to every plugin repo and runs inside
their test binaries; building the image into a dir of its own would mean a nested cargo build from
a test (a second cold build of the closure, a lock on the target dir), and `plugin-ci.yml` already
names its image in CDYLIB_ENV. Probing the symbol decides by what an image IS, the door the
dropped-in leg needs, never by which build ran last; the existing refusal of two different images
at one rank stays.

Tests: a doorless uplifted image is passed over for the deps image with the door, before and after
a later plain build; doorless images only are refused naming them; the real probe tells the example
cdylib from a file with no door. Fixed forward with the root cause (BUSBAR-1.6.0 §11.4, Part 2 #2:
one table, compiled in or dropped in; Part 6: nothing waived).
@MattJackson

Copy link
Copy Markdown
Collaborator Author

Carried onto predev 62fdbdf in #795 (same commits, one predev merge; population floor 947 -> 953). Closing in favour of #795.

MattJackson added a commit that referenced this pull request Oct 12, 2026
…ows #721 carried; they are not this crate's edges, and the transitional row armed legacy-drain red
MattJackson added a commit that referenced this pull request Oct 13, 2026
webrtc framer transport crate on predev (row 132, piece 1; carries #721)
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