Skip to content

Terminal state 'verified' over-promises: split back into 'complete' (phases done) vs 'verified' (verify-approval passed) #919

Closed

Description

@waleedkadous

Problem

Spec 653 renamed the terminal project state complete → verified universally (state.ts:135, comment: "applies to ALL protocols"), but only added the verify phase + verify-approval gate to SPIR and ASPIR (653 Component C, item 1).

The result: every protocol without a verify phase — BUGFIX, AIR, MAINTAIN, EXPERIMENT — reaches a state named verified without any verification ever happening. The name asserts "a human verified this works in the environment"; for those protocols it only means "porch ran off the end of the phase graph."

Concrete harm

  • Display ambiguity (surfaced via Shannon PR Tower SIGTERMs a reused shellper pid in the reconcile pre-filter (workspace missing / temp dir) #1879): derivePrReady (overview.ts:492) keys the "PR ready for human" fallback on bugfix && phase === 'verified'. Because the terminal name conflates "done" with "verified," a mid-CMAP porch rollback that writes a sticky pr_ready_for_human: false can suppress a post-CMAP PR — the state name gives no signal to disambiguate.
  • Lexical collision: customized BUGFIX variants (e.g. Shannon's) have a pre-PR verify phase (reproduction), a completely different concept from 653's post-merge verify. One keystroke apart, opposite meanings.

Proposed direction

  • Terminal state for "phases exhausted" = complete (honest, makes no verification claim).
  • verified reserved for projects that actually passed (or --skip'd with reason) the verify-approval gate — a claim that already lives in the gate history.
  • Migration must distinguish the two on load (use gates['verify-approval']), not blanket-rename.

Reverses 653's universal terminal rename while preserving its real merged-vs-verified-working distinction. Spec to follow with full blast radius + migration plan.

Activity

  1. waleedkadous commented on May 29, 2026

    @waleedkadous
    ContributorAuthor

    Architect investigation notes (context for the spec builder)

    These are findings from the investigation that surfaced this issue — not the spec. The spec should be authored fresh in the specify phase. Use these as the suggested direction.

    Empirical finding: the verify phase is vestigial

    • The verify phase definition is bare: { id: verify, type: once, gate: verify-approval, next: null } — no prompt, no checks, no artifact.
    • Across the 7 SPIR/ASPIR projects carrying a verify-approval gate (723, 786, 746, 694, 755, 761, 823), zero have ever approved or skipped it — all sit at verify-approval: pending, parked at phase: review.
    • So the verified terminal is never reached via genuine verification; in practice it is always the generic "phases exhausted" case. The name is doubly unearned (only 2/6 protocols got the gate, and neither has ever fired it).

    Suggested direction

    • complete = porch exhausted the phase graph (no verification claim). The common (effectively only) terminal.
    • verified = reserved for projects that passed (or --skip'd with reason) verify-approval — backed by gate history, not a universal rename.
    • Keep the verify phase capability; this corrects naming/semantics only. Removing the phase is out of scope.

    Migration (state.ts:135)

    Today it force-renames complete → verified universally. Reverse + refine on read:

    • verified with no approved verify-approval → migrate to complete (mislabeled by 653's blanket rename)
    • verified with approved verify-approval → keep verified
    • pre-653 complete → keep complete
    • readState stays pure; both labels remain readable indefinitely (in-flight builders + external adopters carry both).

    Blast radius — sites keying off literal 'verified' (must accept both labels)

    next.ts:249,348,777 · index.ts:200,523,813,1188 · the done() early-exit added by PR #904 (now merged) — must recognize complete · status.ts:241 · workspace-recover.ts:19 (already both) · overview.ts:373,386 (progress=100) · overview.ts:492 derivePrReady — bugfix && phase==='verified' must become bugfix && (phase==='complete' || phase==='verified'), else BUGFIX builders stop surfacing. Plus 7 test files.

    The #1879 root cause (fold in)

    porch rollback writes pr_ready_for_human=false (index.ts:841); in a gateless protocol the forward path never re-sets it true, so a mid-CMAP rollback permanently suppresses the post-CMAP PR. Invariant to preserve: a BUGFIX reaching its terminal with an open, CMAP'd, unmerged PR must surface in Needs Attention. Prefer re-deriving pr_ready_for_human at terminal assignment over trusting the stale value.

    Open questions for the spec

  2. waleedkadous commented on May 29, 2026

    @waleedkadous
    ContributorAuthor

    Closing. The Needs-Attention motivation behind this issue (the verified/pr_ready ambiguity that hid and over-surfaced PRs) is superseded by #927, which fixes Needs Attention at the root — surfacing PRs via the universal pr gate and deleting the builder-state-derived fallbacks, making terminal-state coupling irrelevant to the dashboard.

    The standalone verified → complete terminal-state rename (an independent honesty fix, unrelated to Needs Attention) is set aside with this issue. It can be re-filed on its own if we decide to pursue it later.

    Builder worktree cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions