Task — engineering-spec@1

Standing goals - re-verify done, forever

doneTASK-IMP-109
module improvement · class product · priority p1 · created 2026-07-17 · shipped 2026-07-17
depends on none · blocks none

TASK-IMP-109: Standing goals - re-verify done, forever

Summary

done is terminal and never re-checked. TRACE-004 proves every clause had a passing test on the day it shipped and nothing looks again, so a task shipped in batch 1 could be broken today and the corpus would still show it green. At the done flip, enrol the task's cited tests as a standing goal, and re-run the goals on demand. Detection only: a violated goal becomes a type: bug task through the normal loop, never an auto-fix.

Problem

A goal verified once is an assumption with a timestamp. Every acceptance this run recorded is exactly that: true on 2026-07-17, unexamined on 2026-07-18.

task-reconcile (v2.7.0) does not close this. It measures drift when a task RE-ENTERS the workflow - it is a turnstile, not a sentinel. A done task that never comes back is never looked at again by anything.

The corpus already demonstrates the failure mode: TASK-IMP-086 recorded acceptance evidence for rows that were not in the committed file, and nothing re-checked until an external reviewer asked. That was caught by luck and a bot. The 35 done improvement tasks and 176 done tasks overall currently rest on the same footing.

Proposed Solution

At the done flip, ship-tasks writes docs/goals/<task-id>.md carrying the task's §1 cited tests as its predicate - free, because TRACE-004 already collected exactly that list. A verify-goals.mjs runner re-runs each predicate, flips a failing goal to violated, and appends to a goal ledger. A violated goal produces a finding, and the fix goes through create-tasks -> ship-tasks like any other bug.

Only mechanically re-runnable predicates are enrolled. ACs carrying a justified verify: rather than test: cannot be re-run by a script, and the goal file MUST say so rather than pretend - an honest gap beats a fake predicate.

Alternatives Considered

Success Metrics

Scope

In scope: goal emission at the done flip, verify-goals.mjs, the goal ledger, the report, suite arms.

Out of scope / Non-Goals

Dependencies

None mechanically. Consumes the §1 cited tests TRACE-004 already collects.

Serialisation note: touches STATUS-REFERENCE.md and ship-tasks.md, both shared with TASK-IMP-108 (and ship-tasks with 113, 114, 115). Parent-serialised per §11a; never concurrent.

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

§1 - Verdict summary

Spec is 96 lines, 8 §1 clauses, 6 ACs, 6 edge cases. Converts done from a claim into a maintained invariant using predicates TRACE-004 already collects. Highest-risk task in the batch by construction - it executes commands read from files. Passes after 8 findings.

§2 - Findings (all resolved)

ISS-001 - Executing predicates read from files is the rung-5 defect, re-introduced

This task's core mechanism - run a command named in a repo file - is exactly what the batch-5 review caught in task-reconcile: a crafted file could name a command. Resolved: §3 security-class is marked HIGH and requires repo-root confinement plus a git ls-tree HEAD tracked check before execution, naming the precedent so the fix is not re-derived from scratch.

ISS-002 - Auto-fix on violation would be the machine grading itself

An auto-fix on a violated acceptance is self-certification at the exact moment nobody is watching. Resolved: §1 #1.7 forbids status change, code change, and re-opening; AC 5 asserts detection-only.

ISS-003 - verify:-only ACs cannot be predicates but could be faked as ones

A predicate that cannot be re-run is not a predicate. Resolved: §1 #1.3 excludes them and requires the goal to name the gap; §1 #1.4 covers the zero-predicate task with predicate: none rather than a fake pass.

ISS-004 - A hanging predicate could be read as passing

A timeout returning nothing is not a success. Resolved: §1 #1.8 makes timeout a violation, named as such; AC 6 asserts it.

ISS-005 - Re-opening the source task would destroy the acceptance record

done is terminal for a reason. Resolved: §1 #1.7 requires a new type: bug task through the normal loop.

ISS-006 - 176 existing done tasks have no goals - the report could imply coverage

Claiming a guarantee covering a third of the corpus would be the 086 pattern. Resolved: §3 requires the report to state how many done tasks have no goal; backfill is an explicit Non-Goal.

ISS-007 - A flaky predicate would poison the ledger and invite deletion

A goal deleted without a reason is the evidence loss this task exists to prevent. Resolved: §3 requires quarantine with a recorded reason, never silent deletion.

ISS-008 - Scheduling would couple the payload to a host

Cron is a host decision; CyberOS is invoked. Resolved: explicit Non-Goal - the runner is a command, and when it runs is the operator's business.

§3 - Resolution

All 8 concerns addressed. The machine floor (task-lint) ran FIRST and was clean before any judgment family was applied, per TASK-IMP-084. Score = 10/10.


End of TASK-IMP-109 audit.