Uh oh!
There was an error while loading. Please reload this page.
Fix CI for semver checks by fetching main - #3
Conversation
Adds host-side identifiers to audit JSONL + broker connection log: #1 host_tid (gettid, thread_local cached) on every shim audit entry #4 SO_PEERCRED capture at broker control-socket accept; logged as CONN OPEN: conn_id=N peer_pid=P peer_uid=U peer_gid=G Enables host-PID ↔ guest-PID correlation when diagnosing cross-worker issues. Diagnostic-only; no behavior change. Validated 199/199. Subagent assessment of remaining audit improvements: #2 migration handoff: medium, ~80-150 LOC, high value — land next #3 broker_conn_id per RPC: medium-high, ~120-250 LOC — after #2#5 parent_host_pid: small, opportunistic #6 guest_context_pid: defer (broad delayed-fork changes) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…, broker-direct handles Phase 3 of the legacy-pipes migration: every fd entering litebox becomes a broker-held handle at the boundary; siblings reference it via handle-id instead of socketpair fd-passing through a parent dispatcher thread. Major changes: - D2: AttachHostFd opcode + SubsystemTag::HostFd + broker HostFdState dispatch + runner/control-listener wiring. Host fds inherited via SCM_RIGHTS get a broker handle at attach time. - D3: broker-global OFD registry (litebox_broker::ofd_registry). RegisterOfd(parent_9p_fid)->open_file_id; CloneOfd(open_file_id, new_fid). Both sides reference the same kernel Arc<File> for POSIX shared-position inheritance over delayed-fork. - D5: all five mux-stream kinds (host, vsocket, vpipe, vpty, fs) migrated to direct broker handles in the delayed-fork commit path. Parent emits --broker-fd-bridge specs; worker installs them before fork-restore ack. - D6/D7: deleted parent mux dispatcher block, worker mux block, multiplexer.rs, MuxParentStream/MuxPtySlaveFd/install_mux_pipe_fd*, --mux-fd/--mux-stream CLI args, and the LITEBOX_NEW_MUX feature flag (default-on, then deleted). - Phase 5 deletion: litebox/src/pipes.rs (1083 LOC), RawFdRef::Pipes, GlobalState.pipes, EpollDescriptor::Pipe, all dispatch arms. Rubber-duck review surfaced 6 findings, all fixed test-first: - #1 fork-restore install gap (install before ack on both 9P/non-9P). - #2 UnixSocket install consume-list parity with Pipe/TcpConn. - #3 OFD register/clunk race (write-lock serialization). - #4 clone_ofd_into_fid metadata-error refcount leak. - #5 fs_fid post-CloneOfd cleanup (Tclunk on every failure path). - #6 dup_handle failures propagate as install failure across all kinds. Validation: broad regression gate litebox::{dropbear_bash, EPIPE, FORK, P1, FS., PB., NPIPE, BPIPE, CL3} 542/542 PASS at LITEBOX_TEST_JOBS=8 (first-run, zero flakes). Net diff: ~5,145 insertions / ~5,012 deletions across 45 files. Branch: wportnoy/legacy-pipes-phase-3 (tip 6691630) 36 individual commits across phases D2–D7 + Phase 5 deletion + review fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… fd-migration paths Closes the class of bug that produced 68/99 hard FAILs when epoll/inotify were added without matching emit loops in exec_on_remote_host (fixed in 5387acc): no compile-time signal that a new fd subsystem had silently been dropped by the worker-exec path. Three layers added: (1) Exhaustive RawFdRef match in new module litebox_shim_linux/src/syscalls/migration_policy.rs. migration_policies_for(&RawFdRef) returns { worker_exec, delayed_fork, independent_fork } policies. No wildcard arms; no #[non_exhaustive]; the workspace-wide clippy::wildcard_enum_match_arm = "deny" plus rustc E0004 enforce the gate. Verified during agent work by adding a temporary GateProof variant — build failed at the gate. (2) Shared enumeration function referenced by all three fork-path entry points (do_fork, commit_delayed_fork, exec_on_remote_host) via zero-cost reference_gate::<FS>() calls. New variants cannot bypass the gate by being added to RawFdRef without updating migration_policy. (3) Test-discovery-time coverage gate in litebox_test_harness/src/coordinator/inherit_matrix.rs: InheritSubsystem::discriminant_index() (exhaustive match) + EXPECTED_VARIANT_COUNT + ALL[] verified in coverage_gate cfg(test) module. New InheritSubsystem variant without a matching INHERIT.<kind>.*.{dng,snm} matrix family fails at test discovery. Verified by removing a variant from ALL and observing the loud assert. The shim-side gate is a *policy declaration* gate: developers declare which loop bridges a kind, but the linkage from loop_name string → actual emit loop is not yet compiler-checked (follow-up #3 in the sub-agent report: typed per-loop constants). Combined with the test-discovery gate, the net effect is that the exact bug pattern that produced 68 FAILs requires at least two explicit human acts of mis-declaration plus a missing test family to recur — versus zero gates before. Acknowledged out-of-scope follow-ups: * Collapse the 13 per-subsystem emit loops in exec_on_remote_host into a single RawFdRef-driven dispatch (epoll-last ordering constraint makes this its own refactor). * Reconcile platform-side worker_exec_bridge_decision() (dead_code with todo!() arms) with this gate. * Promote loop_name strings to typed constants emitted by each loop, so renaming a loop without updating the policy table is itself a compile error. Behavior-preserving: pure structural gate, zero runtime cost. Coverage_gate unit tests: 2/2 pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No description provided.