T-11QZ-task-schema-v6-contract-sweep
Status: closed/superseded · Impact: medium · Complexity: large
Stage 7 of D-S30G-task-state-plane-split — the contraction.
Everything this task removes has had no writer since the stage-5
cutover. Gated on an operational drain: no pre-cutover runs still
open (sdlc task inflight shows zero pre-cutover runs).
| Location | Role today |
|---|---|
apps/sdlc/lib/model/entities/task/schema.ts | v5; in-progress* live enum values; stamp doc-comments describe the retired per-run write pattern. |
apps/sdlc/lib/model/entities/task/migrations/ | Per-version deterministic transforms consumed by entities-migrate. |
apps/sdlc/lib/model/entities/task/ops/lint-state-origin.ts | TASK_STATE_FIELDS still lists the full six-field mirror set. |
apps/sdlc/lib/model/entities/task/ops/probe-state.ts | Still carries main_head_is_verify_stamp + the legacy resume arm. |
apps/sdlc/lib/model/entities/task/commits/lifecycle/template.eta | Still carries the retired start / record-pr actions. |
Proposed
Section titled “Proposed”Schema v6: in-progress / in-progress/blocked marked deprecated
in the doc-comment (tolerated-but-never-written; removal is v7),
stamp doc-comments redefined as promotion-time. A v5→v6 migrate
transform: active task at in-progress* with an active lease ⇒
open/ready; with no/archived lease ⇒ flag the ambiguous tail per
migrate’s convention. TASK_STATE_FIELDS narrows to the surviving
semantic set. probe-state drops the verify-stamp signal and legacy
resume arm. template.eta retires the start / record-pr
actions. Skill prose drops legacy narration.
Approach
Section titled “Approach”- Schema v6 doc-comment pass + version bump.
- Write the v5→v6 transform in
migrations/; run entities-migrate over the corpus. - Narrow
TASK_STATE_FIELDS; update the lint’s tests. - Remove the legacy probe-state arm and the retired template actions; sweep skill prose.
- Confirm drain precondition before landing.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/sdlc/lib/model/entities/task/schema.ts | modify | v6: deprecations + doc-comments. |
apps/sdlc/lib/model/entities/task/migrations/ | modify | v5→v6 transform. |
apps/sdlc/lib/model/entities/task/ops/lint-state-origin.ts | modify | Narrowed state-field set. |
apps/sdlc/lib/model/entities/task/ops/probe-state.ts | modify | Drop legacy resume arm + verify-stamp signal. |
apps/sdlc/lib/model/entities/task/commits/lifecycle/template.eta | modify | Retire start / record-pr. |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: entities audit reports zero active tasks at
in-progress*after the sweep. - AC-2: The v5→v6 transform maps a leased
in-progresstask toopen/readyand flags an unleased one. - AC-3: A state-field-only commit on a task branch that touches only the surviving semantic fields still trips lint-state-origin; the retired fields are no longer listed.
- AC-4: No source file references
main_head_is_verify_stamp.
Out of scope
Section titled “Out of scope”- v7 hard removal of the
in-progress*enum values — a later sweep once zero occurrences is confirmed corpus-wide.
Dependencies
Section titled “Dependencies”- T-S27R-ensure-ready-plane-rework and T-AQR9-task-work-cutover-stop-mirror-writes — the writers must be gone first, plus the operational drain above.
Discovery context
Section titled “Discovery context”- Scaffolded from D-S30G-task-state-plane-split (migration stage 7 of 7).
Depends on
Section titled “Depends on”T-S27R-ensure-ready-plane-rework, T-AQR9-task-work-cutover-stop-mirror-writes