Record subprocess shutdown ownership decision

This commit is contained in:
2026-12-01 04:10:52 +00:00
parent 4b75e283db
commit 096a2f6745
2 changed files with 32 additions and 33 deletions

View File

@@ -13,8 +13,8 @@ own the detailed evidence. This document records decisions, explains consequence
and distinguishes recommendations from approved scope. No remediation has been
implemented by this document.
The operator has settled the main direction for topics 1, 2, 3, and 4. Topics 5,
6, and 7 need discussion. Each open topic ends with a question and space for a
The operator has settled the main direction for topics 1 through 5. Topics 6
and 7 need discussion. Each open topic ends with a question and space for a
response. Implementation details can be settled during planning after the
operator-facing behavior is clear.
@@ -301,7 +301,7 @@ implementation and verification._
## 5. Finish subprocess shutdown before releasing its files
Status: Open
Status: Decision agreed; implementation pending
Finding: [CAT-05](catalog.md#cat-05--p2-retain-subprocess-and-stream-ownership-through-delayed-completion).
@@ -319,34 +319,30 @@ as observing completion of every resource user.
The audit established this ordering from source. It did not reproduce a dynamic
race. Normal cancellation and subprocess tests passed.
### Recommendation
### Agreed direction
Keep the bounded graceful-to-forceful escalation, then join process/output
completion before releasing the associated resources or returning their ownership
to callers. Exercise the delayed-completion branch with a controlled test.
to callers. Read process state and flush/close diagnostics after completion is
joined. Preserve the original timeout or cancellation cause. Exercise the
delayed-completion branch with a controlled test of resource-release ordering.
Ordinary cancellation should still terminate promptly. In an exceptional blocked
filesystem write or kernel operation, resource completion can take longer than
the escalation windows. There is no straightforward absolute return-time
guarantee for arbitrary blocked I/O.
the escalation windows. The invocation may remain in shutdown and continue
holding its workspace lock while resource ownership completes.
### Viable alternative
Return before completion using an explicit ownership handoff. A remaining
supervisor would have to own every resource still in use, including output
destinations normally owned by the caller. This is more complex than starting a
background waiter and is justified only if returning promptly despite unfinished
I/O is an actual operational requirement.
### Question for discussion
Is it acceptable to wait for safe resource completion after forceful termination,
even when exceptional blocked I/O outlasts the escalation timers? I recommend yes,
with accurately scoped timeout documentation.
Document the timeout as starting command shutdown, not guaranteeing that every
resource is released at that instant. Retain bounded escalation without an
absolute return-time guarantee for arbitrary blocked I/O. Use the existing
supervisor and standard process-waiting mechanisms; an early-return ownership
handoff or background cleanup service is unnecessary for this fix.
Operator response:
_Pending discussion._
_Approved: retain bounded termination escalation, then wait for process and output
completion before releasing resources, even when exceptional I/O delays outlast
the escalation timers. CAT-05 remains open pending implementation and verification._
## 6. Open publication sources as they are needed