Skip to content

Add dynamic child process startup - #1391

Open
Weidong Cui (wdcui) wants to merge 17 commits into
uliteboxfrom
wdcui/ulitebox/child-start
Open

Weidong Cui (wdcui) wants to merge 17 commits into
uliteboxfrom
wdcui/ulitebox/child-start

Conversation

@wdcui

Copy link
Copy Markdown
Member

This PR adds broker-coordinated dynamic child process startup for userland runners: parent requests reserve child process identity and inherited broker handles, authenticated prepared-runner associations receive bounded bootstrap data, and child execution is gated on parent acknowledgement with rollback on launch failure or disconnect. It wires the transaction through Linux and Windows userland transports and runners, drains committed descendants after root completion, and adds protocol, broker-core, and end-to-end coverage.

Weidong Cui (wdcui) and others added 14 commits September 18, 2026 18:39
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
Converge child startup publication, acknowledgement, failure, shutdown, and finalization across Linux and Windows while preserving process identity safety.

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

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Use one mutex-serialized std::process::Child lifecycle for Linux and Windows exit observation, termination, and final waiting.

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

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Replace the parallel startup-thread pin with explicit StartReady and StartCommitted process states completed after acknowledgement publication.

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
Model every out-of-process runner with RunnerInstance and represent parent-issued startup through RunnerStartup and ProcessStart coordination. Move the process-start state machine into its own module and share one association-serving path across initial and started runners.

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

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Name the module after RunnerProcessManager and represent each in-progress StartProcess operation as a transaction with explicit state. Clarify started-runner configuration and simplify the non-Linux exit-signal helper.

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

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Make StartProcess block until the new runner reports ready and broker startup completes. Remove acknowledgement tokens, receipt state, watchdog workers, and the intermediate committed process state while preserving bounded startup, teardown, and runner finalization.

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

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Allocate process and initial thread identities before launch, commit startup when the broker association activates, and remove the separate readiness protocol.

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

Copilot-Session: 05547201-01e0-4ff2-87c6-27739e6cc816
Weidong Cui (wdcui) and others added 3 commits September 18, 2026 18:59
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:
  BrokerProcess::parent_id, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/080368d2b1b350596297fbe098e3b7a20a43d63d/litebox_broker_core/src/process.rs:160
  BrokerProcess::finish, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/080368d2b1b350596297fbe098e3b7a20a43d63d/litebox_broker_core/src/process.rs:230

--- failure function_parameter_count_changed: pub fn parameter count changed ---

Description:
A publicly-visible function now takes a different number of parameters.
        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/function_parameter_count_changed.ron

Failed in:
  litebox_broker_host::setup_connection now takes 8 parameters instead of 5, in /home/runner/work/litebox/litebox/litebox_broker_host/src/lib.rs:227

--- 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 initial_thread_id of variant BrokerHandshakeResponse::Negotiated in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:152
  field startup of variant BrokerHandshakeResponse::Negotiated in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:154

--- 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:ProcessStarted in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:246
  variant BrokerOperation:StartProcess in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:69

--- failure function_missing: pub fn removed or renamed ---

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

Failed in:
  function litebox_broker_userland::runtime::serve_association, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/080368d2b1b350596297fbe098e3b7a20a43d63d/litebox_broker_userland/src/runtime.rs:61

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