Skip to content

Establish broker-managed process and thread identity - #1377

Open
Weidong Cui (wdcui) wants to merge 13 commits into
uliteboxfrom
wdcui/ulitebox/multiprocess-foundation
Open

Weidong Cui (wdcui) wants to merge 13 commits into
uliteboxfrom
wdcui/ulitebox/multiprocess-foundation

Conversation

@wdcui

@wdcui Weidong Cui (wdcui) commented Sep 15, 2026

Copy link
Copy Markdown
Member

This PR establishes broker-managed process and thread identity by replacing broker sessions with BrokerProcess, introducing authoritative BrokerThread objects and typed ProcessId and ThreadId u32 protocol values allocated and range-constrained by broker core from one rotating namespace with global and per-process quotas, representing local threads as non-cloneable LiteBox lifecycle proxies created and exited through broker operations, propagating negotiated identities through the protocol, transports, runners, and Linux and Windows shims, and releasing IDs only after complete normal teardown while abnormal teardown fails closed.

Weidong Cui (wdcui) and others added 2 commits September 15, 2026 06:01
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
@wdcui Weidong Cui (wdcui) changed the title Establish broker process identity foundation Establish broker-managed process and thread identity Sep 15, 2026
Weidong Cui (wdcui) and others added 11 commits September 15, 2026 11:10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
@github-actions

Copy link
Copy Markdown

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

Click for details
--- 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.50.0/src/lints/inherent_method_missing.ron

Failed in:
  BrokerCoreLimits::with_session_quotas, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/lib.rs:132
  BrokerCore::create_session, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/lib.rs:257

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself 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.50.0/src/lints/struct_missing.ron

Failed in:
  struct litebox_broker_core::SessionId, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/session.rs:34
  struct litebox_broker_core::BrokerSession, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/session.rs:90

--- 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.50.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field max_references_per_session of struct BrokerCoreLimits, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/lib.rs:69
  field max_pipe_capacity_per_session of struct BrokerCoreLimits, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/lib.rs:73
  field max_sockets_per_session of struct BrokerCoreLimits, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/lib.rs:77

--- failure trait_method_missing: pub trait method removed or renamed ---

Description:
A trait method is no longer callable, and may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-item-signature
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/trait_method_missing.ron

Failed in:
  method close_session of trait SocketProvider, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_broker_core/src/socket.rs:478

--- failure enum_discriminants_undefined_non_unit_variant: enum's variants no longer have defined discriminants due to non-unit variant ---

Description:
An enum's variants no longer have well-defined discriminant values due to a tuple or struct variant in the enum. This breaks downstream code that accesses discriminants via a numeric cast like `as isize`.
        ref: https://doc.rust-lang.org/reference/items/enumerations.html#assigning-discriminant-values
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_discriminants_undefined_non_unit_variant.ron

Failed in:
  enum ConnectionTermination in /home/runner/work/litebox/litebox/litebox_broker_host/src/lib.rs:1043

--- failure enum_struct_variant_field_added: pub enum struct variant field added ---

Description:
An enum's exhaustive struct variant has a new field, which has to be included when constructing or matching on this variant.
        ref: https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_struct_variant_field_added.ron

Failed in:
  field process_id of variant BrokerHandshakeResponse::Negotiated in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:146

--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_variant_added.ron

Failed in:
  variant BrokerResult:ThreadCreated in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:218
  variant BrokerResult:ThreadExited in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:220
  variant BrokerOperation:CreateThread in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:48
  variant BrokerOperation:ExitThread in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:50

--- 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.50.0/src/lints/inherent_method_missing.ron

Failed in:
  LinuxKernel::init_task, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_platform_linux_kernel/src/host/snp/snp_impl.rs:104

--- 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.50.0/src/lints/inherent_method_missing.ron

Failed in:
  LinuxUserland::init_task, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_platform_linux_userland/src/lib.rs:333

--- 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.50.0/src/lints/inherent_method_missing.ron

Failed in:
  LinuxKernel::init_task, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_platform_lvbs/src/host/lvbs_impl.rs:78

--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_variant_added.ron

Failed in:
  variant ElfLoaderError:InvalidProcessId in /home/runner/work/litebox/litebox/litebox_shim_linux/src/loader/elf.rs:355

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_shim_linux::LinuxShimBuilder::new takes 1 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_shim_linux/src/lib.rs:210, but now takes 2 parameters in /home/runner/work/litebox/litebox/litebox_shim_linux/src/lib.rs:211
  litebox_shim_linux::LinuxShimBuilder::new_with_litebox takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_shim_linux/src/lib.rs:215, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_shim_linux/src/lib.rs:216

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_shim_windows::WindowsShimBuilder::new_with_litebox takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4ef15ecc2e3df35e63398dbb2abcc008b3bf756b/litebox_shim_windows/src/lib.rs:402, but now takes 5 parameters in /home/runner/work/litebox/litebox/litebox_shim_windows/src/lib.rs:405

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