T-S27R-ensure-ready-plane-rework
Status: closed/done · Impact: high · Complexity: large
Stage 4 of D-S30G-task-state-plane-split. Readiness
verification splits by plane: an unleased pass produces the single
promotion commit (promotion IS the readiness claim), a leased pass
writes lease gates only, and the fail path becomes lease-aware so
it can never downshift live work. Must land BEFORE the stage-5
cutover.
| Location | Role today |
|---|---|
apps/sdlc/skills/task-ensure-ready/ensure_ready_mutate.ts | Pass: stamp readiness_verified_at, drop definition_gap; fail: downshift to planning/needs-definition unless in-progress*. Commits via --commit (current checkout) or --commit-on main (ephemeral worktree). |
apps/sdlc/lib/model/entities/task/commits/lifecycle/template.eta | Commit-subject literals; verify-ready’s doubles as probe-state’s resume signal. |
apps/sdlc/skills/task-ensure-ready/SKILL.md | The gate’s procedure; Steps 4/5 narrate the two commit paths. |
apps/sdlc/skills/task-work/SKILL.md | Step 5a invokes the gate with --commit-on main. |
Proposed
Section titled “Proposed”Four behaviors, by plane:
- Unleased pass on
planning/*→ ONE commit:status: open/ready+readiness_verified_at(new promotion lifecycle action intemplate.eta). - Unleased pass on an already-
open/readystamped task → no-op. - Leased run (task-work Step 5a) → CAS-write lease
gates; zero main commits. First gates writer: bump the control-plane minimum client version. - Fail: preserve status when
in-progress*OR an active lease exists (post-split a leased task readsopen/ready; the old carve-out would downshift live work).--commitstandalone refuses when an active lease exists.
Approach
Section titled “Approach”- Add the promotion action to
template.eta; keepverify-readyuntil stage 7 retires it. - Rework
ensure_ready_mutate.tsmode matrix (unleased pass/fail, leased pass/fail) incl. the lease discovery + CAS gates write. - Update both SKILL.md files’ procedure prose and marker blocks.
- Bump the control-plane minimum client version.
- Tests per mode; regression: standalone fail against a leased task leaves status and stamp untouched.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/sdlc/skills/task-ensure-ready/ensure_ready_mutate.ts | modify | Plane-aware mode matrix; promotion commit; lease gates write. |
apps/sdlc/lib/model/entities/task/commits/lifecycle/template.eta | modify | New promotion action. |
apps/sdlc/skills/task-ensure-ready/SKILL.md | modify | Procedure + markers. |
apps/sdlc/skills/task-work/SKILL.md | modify | Step 5a invocation + prose. |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: A pass on a
planning/proposedunleased task lands exactly one commit, flipping status toopen/readyand writing the stamp. - AC-2: A pass during a leased run writes lease
gatesand lands zero commits on main. - AC-3: A fail against a task with an active lease does not
change
statusand does not clear the promotion stamp. - AC-4:
--commitrefuses (distinct exit code + marker) when an active lease exists.
Out of scope
Section titled “Out of scope”- Deleting the start-commit / PR mirror writes — stage 5 (T-AQR9-task-work-cutover-stop-mirror-writes).
Dependencies
Section titled “Dependencies”- T-5G81-lease-payload-gates — the gates surface this writes.
- T-2T0R-probe-state-inflight-lease-aware — the dual resume gate that keeps new runs resumable once the verify-stamp signal stops appearing at main’s HEAD.
Discovery context
Section titled “Discovery context”- Scaffolded from D-S30G-task-state-plane-split (migration stage 4 of 7).
Depends on
Section titled “Depends on”T-5G81-lease-payload-gates, T-2T0R-probe-state-inflight-lease-aware