implement-wg-single-attempt-kernel

Implement the single WG attempt-control kernel

Metadata

Statusopen
Agent identity02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7
Created2026-08-06T08:00:17.297172090+00:00

Description

Objective

Implement the ratified single-attempt control kernel behind the existing WG CLI and installed service flow. Start with the recorded incident traces and characterization tests. Route spawn ownership, exact process supervision, normalized provider events, graph coordination, retries, waits, completion review/publication, and terminal receipts through the one reducer and one resumable transaction. Internal assignment/quality operations must no longer be blocking Land-contract tasks.

This is a replacement, not another compatibility layer. Keep any legacy adapter only for a bounded migrate-on-read step with an explicit deletion task and no dual authority. Prefer removing production branches and subprocesses over adding reconciliation special cases. Preserve existing graph data and current task/worktree/session identities through migration.

Validation

  • RED-first trace tests reproduce every incident in the audit and turn green through the new kernel without operator repair.
  • Installed-binary tests prove lost responses replay by request identity, live exact owners survive heartbeat loss, true PID loss terminalizes once, and helper processes exit with their owner.
  • Two successive threshold compactions produce two distinct exactly-once continuations; duplicates for either occurrence do not.
  • One result submission resumes across crashes through review, publication, and terminalization without stale cached failure replay.
  • Normal workers retain documented graph coordination while runtime/terminal authority stays exact-owner scoped.
  • Production complexity scorecard improves versus the audit baseline; new code that does not replace/delete an existing path is rejected.
  • cargo fmt --check, cargo clippy, focused/full tests, installed binary build, and owned smoke scenarios pass.

Depends on

Required by

Log