design-simplified-authoritative

Design simplified authoritative task lifecycle

Metadata

Statusdone
Assignedagent-875
Agent identity603daf069cd2ae4a26357aa66e8c6124154b648711a0816ffd8b660ee3b23815
Created2026-07-26T10:23:22.725165512+00:00
Started2026-07-26T11:09:32.371732769+00:00
Completed2026-07-26T11:39:51.394620626+00:00
Tokens2563382 in / 28058 out

Description

Objective

Turn the completed lifecycle/coordinator deep survey into a ratified simplification design. Reduce the number of transition authorities and eliminate implicit task reopening/resume/failure behavior while preserving durable recovery, attempts, worktrees, messages, and optional evaluation.

Required decisions

  • Define one authoritative transition function/event ledger and which actors may request each transition.
  • Messages are data by default: they must not change task status/liveness/eligibility unless the task explicitly waits on a message condition.
  • Separate task state, attempt state, worker process state, resource admission, provider health, worktree merge state, and evaluation evidence; never encode one as another.
  • Make resource backpressure a deferral; process launch/runtime failure a failed attempt; evaluator failure evaluation evidence—not source execution failure.
  • Specify idempotent daemon restart/replay/reconciliation and exact ownership/fencing rules.
  • Decide which auto-repair/rescue/scaffold mechanisms to remove, retain, or make explicit operator commands.
  • Define lazy evaluation records/satellites and advisory vs hard-gate policy.
  • Provide backward-compatible migration from existing graph events and ambiguous historical states.
  • Define operator-visible diagnostics and a model-based transition conformance suite.

Produce docs/design-simplified-task-lifecycle.md; no production code changes.

Validation

  • Every current failure class has a deterministic state/transition in the proposed model.
  • No ordinary message can reopen or keep alive a task.
  • Number of status writers/transition authorities is explicitly reduced.
  • Crash, restart, retry, worktree, evaluation, and admission semantics are unambiguous.
  • Migration and staged implementation can land without a flag-day graph rewrite.
  • Acceptance brief identifies permanent smoke/model-based scenarios.

Depends on

Required by

Messages 4 messages (4 unread)

  1. #1user2026-07-26T11:06:11.543419695+00:00read
    Ratification must explicitly eliminate the reproduced Done -> Open on pending-message path; make completion/failure first-terminal-wins per attempt; make evaluation append-only evidence; make worktree ownership a fenced lease released/transferred atomically; and make ownership conflicts/reset inconsistencies breaker-neutral, self-diagnosing states rather than repeated spawn failures.
  2. #2design-simplified-authoritative2026-07-26T11:09:41.534369047+00:00read
    Acknowledged — the ratified design will explicitly prohibit Done→Open on pending-message paths; define first-terminal-wins per attempt; make evaluation append-only; fence and atomically release/transfer worktree leases; and make ownership/reset inconsistencies breaker-neutral diagnostic states rather than spawn failures.
  3. #3user2026-07-26T11:47:30.983932167+00:00read
    Add explicit attempt-finalization transaction: Active -> Suspect/NeedsFinalization -> durable candidate checkpoint -> deterministic validation -> evaluation against candidate -> merge/repair -> terminal. No-main-file heuristic; no terminalization while old PID can still write; no evaluator against main when candidate is isolated. Process exit without wg_done/wg_fail must trigger same-session completion probe, not inferred Done/Failed.
  4. #4.respond-to-design-simplified-authoritative2026-07-26T12:15:45.796828654+00:00read
    Done — commit 14fbcdd1 revises the ratified design with an explicit resumable attempt-finalization transaction: unreported exit → Suspect → same-session typed completion probe; all candidate writers quiesced; durable leased-worktree checkpoint; deterministic validation; exact-digest evaluation; merge/fenced repair; then one terminal commit. Main-file/diff heuristics and evaluation fallback to main are explicit hard violations. Added permanent scenario lifecycle_attempt_finalization_transaction.

Log