From eb97632e061266584a6c05612ad231460e06b9a7 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Wed, 25 Nov 2026 05:26:58 +0000 Subject: [PATCH] Accept cooperative signal cancellation and operator termination --- docs/roadmap/audit/catalog.md | 5 +++++ docs/roadmap/audit/discussion.md | 33 +++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/docs/roadmap/audit/catalog.md b/docs/roadmap/audit/catalog.md index 5817071a..9ca1ce1a 100644 --- a/docs/roadmap/audit/catalog.md +++ b/docs/roadmap/audit/catalog.md @@ -218,6 +218,11 @@ embedded use. A local fake-backend subprocess regression can protect the path; there was no signal-injection reproduction in the audit. Cooperative cleanup does not imply SIGKILL handling or a new shutdown deadline guarantee. +**Subsequent decision:** [Discussion Item 3](discussion.md#3-process-signals-and-cooperative-cancellation) +selects cooperative cancellation on the first SIGINT/SIGTERM and ordinary +termination on a subsequent signal, with no application shutdown deadline. +Signal handling stays at the executable boundary; implementation remains pending. + ### CAT-011 — Extreme Accepted Context Radius Can Empty Evidence **Assessment:** Reproduced latent internal-API defect; original P3. diff --git a/docs/roadmap/audit/discussion.md b/docs/roadmap/audit/discussion.md index a44ca466..2275b619 100644 --- a/docs/roadmap/audit/discussion.md +++ b/docs/roadmap/audit/discussion.md @@ -122,20 +122,31 @@ tests during implementation; private debug filenames remain implementation detai ## 3. Process Signals And Cooperative Cancellation **Finding:** CAT-010. -**Status:** Open, narrowly scoped behavior decision. +**Status:** Accepted; implementation pending. -Connect supported process signals to the existing cancellation path at the -executable boundary. The recommendation is for the first SIGINT or SIGTERM to -request cooperative cancellation and normal cleanup, with a subsequent signal -permitting ordinary process termination. Preserve caller-owned contexts for -embedded execution. +**Accepted decisions:** -Settle the repeated-signal behavior before implementation. A focused subprocess -test with a local fake backend can verify cancellation and available terminal -capture evidence. This does not require a shutdown framework, a new deadline, -SIGKILL handling, or guarantees for collaborators that ignore cancellation. +- The first SIGINT or SIGTERM requests cooperative cancellation through the + existing invocation context, allowing dispatch to stop, native requests to + cancel, started jobs to drain, and ordinary failure/capture finalization to run. +- A subsequent signal permits ordinary process termination rather than being + swallowed while cleanup proceeds. That signal may interrupt finalization; + a completed debug bundle is not guaranteed after forced termination. +- Introduce no application shutdown deadline or timeout configuration. Operators + and supervisors retain control over forced termination. +- Install signal handling only at the executable boundary. Embedded callers + retain context ownership; application invocation does not install process-wide + signal handlers on their behalf. +- Cancellation remains cancellation: no permissive fallback, model retry, or + successful completion claim. Retain existing cache entries, published files, + and available debug evidence under the existing lifecycle rules. -**Decision:** Pending. +Implement a small standard-library signal adapter around the existing invocation. +A focused subprocess test with a local fake backend should verify cancellation +and available terminal capture evidence. No new shutdown subsystem, SIGKILL +handling, or guarantees for collaborators that ignore cancellation are introduced. + +**Decision:** Accepted as above. No open behavior choices remain in this item. ## 4. One Owner For Pipeline Interpretation And Pure Copying