Repository navigation
Conversation
Signed-off-by: Tee8z <tee8z@protonmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
|
Independent follow-up review of After natural shell exit, the worker preserves the PTY, stops/reaps descendants that could retain its slave, and drains buffered output. The drain has one five-second deadline and a 64-KiB budget; timeout or overflow reports failure instead of successful truncation. I independently reran all five production-binary PTY tests; they pass. The scheduling-barrier regression includes a background holder and catches both early output loss and an indefinite EOF drain. My original standalone pause/release probe now delivers The remaining relay consumer must enforce owner approval, publish durable acceptance before shell creation, wait for readiness before Open acknowledgement, and treat containment exit 2 as harness-fatal. This review covers the worker layer; human runtime confirmation remains outstanding. The PR remains draft. |
Signed-off-by: Tee8z <tee8z@protonmail.com>
|
Superseded by #166 to join the published terminal CLI and worker into one linear stack for the snapshot/relay consumers. Worker source, tests, and documentation are byte-identical to 15b80d6, including the independently rechecked final-output fix. Existing history is preserved; no force push or shared-history rewrite. The new PR remains draft. |
Behavior
Relay terminal access needs a PTY whose jobs stop when the attachment ends, including jobs that detach with
setsidor double-fork. This layer adds a contained local worker insidebuzz-acp. The relay authorization and audit consumer follows above it; this PR does not open a relay terminal by itself.Depends on #159, whose packet shapes the local worker reuses. The gateway foundation remains #154.
sequenceDiagram participant Harness participant Worker participant Kernel Harness->>Worker: Workspace, bounded expiry and Open Worker->>Kernel: Verify subreaper and pidfd support Worker->>Kernel: Spawn PTY shell Worker-->>Harness: Ready and bounded data Harness->>Worker: Close, EOF or termination Worker->>Kernel: Stop, kill and reap owned descendants Worker-->>Harness: End metadata and containment statusThe worker runs as a separate Linux subreaper, so adopted descendants belong to that terminal and harness siblings remain outside its tree. A safe maintained PTY crate provides native async I/O; the lock retains existing Tokio and Rustix versions. No new image helper or network channel is required.
The shell still has the sandbox user's filesystem privileges. Explicit per-session owner approval is required in the upcoming relay consumer; a global gateway grant alone never authorizes it. Worker documentation describes the local protocol and failure contract.
Validation