Repository navigation
Conversation
5e8e35b to
3f209e5
Compare
95eae15 to
0340a93
Compare
0340a93 to
1b51b9b
Compare
|
Follow-up review at Two issues are worth resolving before merge:
Documentation follow-ups:
Validation: the previous macOS unused-import finding is fixed and targeted macOS Clippy now passes. The temporary panic probe failed as described; the cancellation probe passed. Probes were removed. The latest stack-head CI run has passed all four Kind/Firecracker shards and its aggregate gate. The earlier rapid aggregate failure belonged to a cancelled run, not a non-main-base rejection. Codex-assisted follow-up review. No implementation changes are included in this comment. |
Close admission without cancelling admitted work, and expose explicit cancellation. Bound drain waits with a typed incomplete-cleanup result while retaining ownership for a later drain. Track blocking I/O, worker startup and retirement, stream cleanup and watch teardown through cancellation. Keep the daemon's cancel-before-drain path and existing wire contracts.
Cancellation could end worker read/list relays and Direct listings with successful EOF after partial output. Carry the terminal Unavailable status beside the bounded result queue, as descriptor reads already do, so a full queue cannot hide the error or hold up cleanup. Cover worker RPC reads/listings, Direct listing and empty/full relay queues. All three regressions fail without the fix. Preserve ordinary completion, buffer ordering and graceful admission closure.
Closing and Drained enforce the same admission policy. Successful drain is already established by waiting for owned work; remove the extra state and write without changing repeated or concurrent drain behavior.
Distinguish finite read/list streams from passive watches when the relay ends. Read/list cancellation still reports partial output as Unavailable; watch closure completes quietly, matching Direct watches. Clarify the close/drain documentation and exercise worker watches under both admission closure and parent cancellation. The regression fails before the fix; existing interrupted read/list coverage still passes.
Distinguish worker-watch retirement at close from Direct retirement during drain or cancellation. Preserve both shutdown paths.
Include uploads and filesystem mutations in the graceful-close contract.
Move process_event and process_exit into their Linux-only consumer so non-Linux test builds do not fail Clippy on unused imports.
02131d1 to
856fece
Compare
Summary
Make
close()stop admission without cancelling admitted work. Addcancel()and a deadline-aware drain returningIncompleteExecutionDrainuntil owned work settles. Track physical I/O, worker startup/retirement, stream cleanup and watch teardown.Interrupted read/list streams now end with
Unavailableafter buffered results, even with a full output queue. Worker watches retire with recoverableUnavailableat close or cancellation; Direct watches retire quietly during drain or cancellation. Producer panics terminate read/list/relay streams withInternalafter buffered output. The daemon keeps cancelling before drain; wire schemas are unchanged.Stacked on #790; implements lifecycle ownership from the embedding RFC. Admission metrics are in #833.
Validation
137 filesystem/admission tests passed on the updated stack, including regressions for producer panics and recoverable watch closure. Formatting, affected all-feature/no-default-feature Clippy and doctests passed on Linux. Native macOS and Kind/Firecracker were not rerun locally; CI is pending on this head.
Severity and risk
Moderate: interrupted output must not appear complete, and drain must retain outstanding cleanup. Embedders must consume or drop admitted futures/streams and keep the runtime alive after incomplete drain. Revert after dependent changes to roll back.
AI assistance: Codex contributed code, tests and this description.