Skip to content

Make broker pipes shared-memory only#1052

Open
wdcui wants to merge 5 commits into
uliteboxfrom
wdcui/ulitebox/broker-pipe-shared-only
Open

Make broker pipes shared-memory only#1052
wdcui wants to merge 5 commits into
uliteboxfrom
wdcui/ulitebox/broker-pipe-shared-only

Conversation

@wdcui

@wdcui wdcui commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

  • make shared memory mandatory for broker pipes and replace inline payloads with bounded staging offsets, lengths, and byte counts
  • scope descriptor-bearing responses to pipe creation through pipe-specific channel traits; successful creation carries shared memory and failures do not
  • transfer the sealed memfd with SCM_RIGHTS in the same sendmsg as the serialized create response body while leaving ordinary responses on normal framed I/O
  • keep BrokerCore authoritative while host and local adapters stage data through separate read/write regions

Stack

  1. Add broker shared-memory primitives #1049 — reusable shared-memory primitives
  2. This PR — shared-memory-only broker pipes

Validation

  • cargo test -p litebox_broker_transport --all-features
  • cargo test -p litebox_broker_protocol
  • cargo test -p litebox_broker_local
  • cargo test -p litebox_broker_host
  • cargo test -p litebox pipes::tests
  • cargo test -p litebox event::counter::tests
  • cargo test -p litebox_runner_linux_userland --test run test_runner_broker_integration_with_rewriter -- --exact
  • strict clippy for affected broker, LiteBox, platform, and runner crates
  • no-std and transport feature checks
  • cargo test -p dev_tests ratchet_maybe_uninit
  • GPT-5.6 Sol static review: no significant issues found

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
@wdcui
wdcui force-pushed the wdcui/ulitebox/broker-pipe-shared-protocol branch from 24d5337 to e94d2f0 Compare July 19, 2026 17:33
@wdcui
wdcui force-pushed the wdcui/ulitebox/broker-pipe-shared-only branch from 84ca2b2 to a4005be Compare July 19, 2026 17:54
wdcui added 4 commits July 19, 2026 11:07
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
@wdcui
wdcui force-pushed the wdcui/ulitebox/broker-pipe-shared-only branch from a4005be to b41d939 Compare July 19, 2026 18:08
Base automatically changed from wdcui/ulitebox/broker-pipe-shared-protocol to ulitebox July 19, 2026 18:18
@github-actions

Copy link
Copy Markdown

ℹ️ Note: This semver check was run against the wdcui/ulitebox/broker-pipe-shared-protocol branch, not main or ulitebox.

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure auto_trait_impl_removed: auto trait no longer implemented ---

Description:
A public type has stopped implementing one or more auto traits. This can break downstream code that depends on the traits being implemented.
        ref: https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/auto_trait_impl_removed.ron

Failed in:
  type BrokerLocal is no longer UnwindSafe, in /home/runner/work/litebox/litebox/litebox_broker_local/src/lib.rs:39
  type BrokerLocal is no longer RefUnwindSafe, in /home/runner/work/litebox/litebox/litebox_broker_local/src/lib.rs:39

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/inherent_method_missing.ron

Failed in:
  BrokerLocal::request, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-wdcui_ulitebox_broker_pipe_shared_protocol/b375c5aa88bef099f1075894100a0735d13f75df/litebox_broker_local/src/lib.rs:95

--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field ReadPipeRequest.offset in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:42
  field WritePipeRequest.offset in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:60
  field WritePipeRequest.length in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:62
  field ReadPipeResponse.read in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:51

--- failure copy_impl_added: type now implements Copy ---

Description:
A public type now implements Copy, causing non-move closures to capture it by reference instead of moving it.
        ref: https://github.com/rust-lang/rust/issues/100905
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/copy_impl_added.ron

Failed in:
  litebox_broker_protocol::pipe::ReadPipeResponse in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:49
  litebox_broker_protocol::pipe::WritePipeRequest in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:56

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field data of struct ReadPipeResponse, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-wdcui_ulitebox_broker_pipe_shared_protocol/b375c5aa88bef099f1075894100a0735d13f75df/litebox_broker_protocol/src/pipe.rs:45
  field data of struct WritePipeRequest, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-wdcui_ulitebox_broker_pipe_shared_protocol/b375c5aa88bef099f1075894100a0735d13f75df/litebox_broker_protocol/src/pipe.rs:54

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