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

@@ -46,15 +46,15 @@ that the roadmap implements the entire finding. Findings close only after their
relevant behavior or code removal is verified. Original audit reports, finding relevant behavior or code removal is verified. Original audit reports, finding
identities, priorities, and source links remain unchanged. identities, priorities, and source links remain unchanged.
CAT-02's direction follows the agreed import model; CAT-04's direction follows Directions for CAT-02, CAT-04, and CAT-05 reflect subsequent agreed choices.
the accepted audio-acquisition behavior. Other direction paragraphs retain the Other direction paragraphs retain the audit's candidate remedies; agreed
audit's candidate remedies; subsequent agreed choices and roadmap ownership are choices and roadmap ownership are identified by the disposition notes.
identified by the disposition notes.
Audio generation/size handling is [agreed in topic 4](discussion.md#4-keep-downloaded-audio-and-its-source-identity-together), Audio generation/size handling is [agreed in topic 4](discussion.md#4-keep-downloaded-audio-and-its-source-identity-together),
and subprocess completion is [agreed in topic 5](discussion.md#5-finish-subprocess-shutdown-before-releasing-its-files),
with implementation pending. Continue the remaining decisions in with implementation pending. Continue the remaining decisions in
[discussion topics 5–7](discussion.md#5-finish-subprocess-shutdown-before-releasing-its-files): [discussion topics 6–7](discussion.md#6-open-publication-sources-as-they-are-needed):
subprocess completion, publication source lifetimes, and audio eligibility. publication source lifetimes and audio eligibility.
Topic 1 also retains the smaller choice about waiting versus reporting a busy Topic 1 also retains the smaller choice about waiting versus reporting a busy
workspace. Remote checkpoint timing and failure handling are deferred, not workspace. Remote checkpoint timing and failure handling are deferred, not
decisions blocking publication import. decisions blocking publication import.
@@ -186,7 +186,9 @@ Related: [CAT-06](#cat-06--p2-stop-known-size-downloads-before-oversized-bodies-
Status: Open Status: Open
**Disposition / owner.** Independent subprocess remediation — [discussion topic 5](discussion.md#5-finish-subprocess-shutdown-before-releasing-its-files) **Disposition / owner.** Independent subprocess remediation — [discussion topic 5](discussion.md#5-finish-subprocess-shutdown-before-releasing-its-files)
remains open. Publication import does not remove downstream process ownership. selects joining process/output completion after bounded termination escalation,
before releasing resources. Implementation and verification remain pending;
publication import does not remove downstream process ownership.
Original findings: [CN-03](04-concurrency.md#cn-03--p2-the-exceptional-subprocess-reap-timeout-releases-ownership-too-early), Original findings: [CN-03](04-concurrency.md#cn-03--p2-the-exceptional-subprocess-reap-timeout-releases-ownership-too-early),
[TE-05](08-testing.md#te-05--p2-subprocess-lifecycle-tests-do-not-exercise-a-delayed-reap-after-escalation). [TE-05](08-testing.md#te-05--p2-subprocess-lifecycle-tests-do-not-exercise-a-delayed-reap-after-escalation).
@@ -197,11 +199,12 @@ caller-owned result-file closure can then overlap a still-active waiter or strea
copier. Current tests exercise ordinary shutdown or pre-populated completion, not copier. Current tests exercise ordinary shutdown or pre-populated completion, not
delayed completion beyond escalation. delayed completion beyond escalation.
**Direction.** Keep one supervisor responsible until completion and I/O ownership **Direction.** Retain bounded graceful-to-forceful escalation, then join process
are joined; distinguish escalation deadlines from resource completion. Add a and output completion before reading process state, flushing/closing diagnostics,
controlled delayed-wait/stream test that observes release ordering and preserved or returning resource ownership to callers. Add a controlled delayed-wait/stream
error causes. Preserve bounded escalation without claiming an absolute kernel-I/O test for release ordering and preserved error causes. Exceptional I/O delays can
termination deadline. outlast escalation timers; no absolute return-time guarantee or early-return
ownership handoff is required.
### CAT-06 — P2: Stop known-size downloads before oversized bodies exhaust staging space ### CAT-06 — P2: Stop known-size downloads before oversized bodies exhaust staging space

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 and distinguishes recommendations from approved scope. No remediation has been
implemented by this document. implemented by this document.
The operator has settled the main direction for topics 1, 2, 3, and 4. Topics 5, The operator has settled the main direction for topics 1 through 5. Topics 6
6, and 7 need discussion. Each open topic ends with a question and space for a 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 response. Implementation details can be settled during planning after the
operator-facing behavior is clear. operator-facing behavior is clear.
@@ -301,7 +301,7 @@ implementation and verification._
## 5. Finish subprocess shutdown before releasing its files ## 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). 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 The audit established this ordering from source. It did not reproduce a dynamic
race. Normal cancellation and subprocess tests passed. race. Normal cancellation and subprocess tests passed.
### Recommendation ### Agreed direction
Keep the bounded graceful-to-forceful escalation, then join process/output Keep the bounded graceful-to-forceful escalation, then join process/output
completion before releasing the associated resources or returning their ownership 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 Ordinary cancellation should still terminate promptly. In an exceptional blocked
filesystem write or kernel operation, resource completion can take longer than filesystem write or kernel operation, resource completion can take longer than
the escalation windows. There is no straightforward absolute return-time the escalation windows. The invocation may remain in shutdown and continue
guarantee for arbitrary blocked I/O. holding its workspace lock while resource ownership completes.
### Viable alternative Document the timeout as starting command shutdown, not guaranteeing that every
resource is released at that instant. Retain bounded escalation without an
Return before completion using an explicit ownership handoff. A remaining absolute return-time guarantee for arbitrary blocked I/O. Use the existing
supervisor would have to own every resource still in use, including output supervisor and standard process-waiting mechanisms; an early-return ownership
destinations normally owned by the caller. This is more complex than starting a handoff or background cleanup service is unnecessary for this fix.
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.
Operator response: 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 ## 6. Open publication sources as they are needed