Skip to content

R22

What to build

Cancelling judge execution stops owned cooperative provider tasks before returning control.

Source and evidence

Repository scientific/architectural review, snapshot 86c8517, item R22. Classification: confirmed defect; high severity.

The coordinator creates judge tasks and waits for completion without a cleanup block owning those tasks. Cancelling the coordinator propagates cancellation to its caller, but leaves the judge tasks running. These tasks can continue provider requests and incur cost after the operation that owned them has ended.

The retained retained synthetic probe starts one cooperative synthetic judge, cancels its coordinator after entry, and observes one live child. Releasing that child confirms it completes after caller cancellation. The probe releases and joins its child; it makes no provider requests.

Acceptance criteria

  • [ ] Cancel the coordinator after one judge enters: no child task remains running after cancellation propagates.
  • [ ] Unexpected child failure cancels/joins siblings and retains safe aggregate evidence or the documented primary exception.
  • [ ] Concurrency and request/unit/cost budgets remain bounded during cleanup.
  • [ ] Tests make no paid calls and use independent cleanup to avoid leaking tasks when assertions fail.
  • [ ] Preserve Consumer-owned meaning, payload-free evidence, disabled optional-import isolation, safe diagnostics and the non-relaxable Safety Floor.
  • [ ] Run the narrowest observable contract, then applicable committed Make gates. Record every command and outcome; update specifications/compatibility evidence for changed public or wire contracts. Run native Collector verification for changed Collector assets and build for packaging changes.

Design guidance

Use structured task ownership or an explicit finally cancel-and-join owner. Preserve caller cancellation; do not let detached provider requests outlive their invocation.

Keep prefactoring narrow and verifiable in this slice. Reuse established owners and structural interfaces; introduce a pattern only when it clarifies a real responsibility or variation point. Do not add consumer vocabulary or private payloads to platform code or evidence. Mocked/local results must not claim hosted, production, accelerator or release qualification.

Blocked by

None (can start immediately). Shared-area coordination is useful, but no other review fix is a genuine prerequisite for this slice.

Verification scope

Convert the described counterexample or investigation oracle into an observable test at the lowest suitable public boundary. Prefer bounded operation-count or deterministic interleaving evidence to flaky timing assertions; timing guarantees need a declared tolerance and independently owned cleanup. This ticket authorizes remediation/research, not publication or deployment.