Skip to content

T-2T0R-probe-state-inflight-lease-aware

Status: closed/done · Impact: high · Complexity: medium

Stage 2 of D-S30G-task-state-plane-split. The two lease-blind readers gain a lease arm so they keep working when execution state stops being mirrored into frontmatter. Dual-mode: the frontmatter fallback stays until stage 7 removes it.

LocationRole today
apps/sdlc/lib/model/entities/task/ops/probe-state.tsReads frontmatter status/stamp, worktree dir, branch, gh PR, and the main_head_is_verify_stamp commit-subject literal. No lease read.
apps/sdlc/lib/model/entities/task/ops/_probe_core.tsShared probe helpers (frontmatter, git, gh).
apps/sdlc/lib/model/entities/task/ops/inflight.tsClassifies in-flight work from frontmatter status + open PR only.
apps/sdlc/skills/task-work/SKILL.mdStep 2 branches on probe-state’s fields, incl. resume_candidate.

probe-state emits lease_present / lease_phase / lease_pr_number from the local ref mirror (null when the mirror is absent — no network in the op). resume_candidate becomes lease-arm OR the legacy verify-stamp arm. inflight classification prefers lease phase when present (working → implementing, awaiting-review / responding → awaiting-review) with the frontmatter rule as fallback. Pre-cutover, lease and frontmatter agree, so behavior is unchanged.

  1. Add a local-mirror lease reader to _probe_core.ts (ref presence + parsed phase / pr_number / gates; null offline).
  2. Extend probe-state’s output and its resume_candidate / blocked_preflight derivations with the lease arm.
  3. Rewrite inflight.ts classify to prefer lease phase.
  4. Update task-work SKILL.md Step 2 prose to read the new fields.
  5. Tests: a lease-holding pre-split run resumes via the lease arm; a missing mirror degrades to today’s exact behavior.
LocationKindChange
apps/sdlc/lib/model/entities/task/ops/_probe_core.tsmodifyLocal-mirror lease reader.
apps/sdlc/lib/model/entities/task/ops/probe-state.tsmodifyLease fields + dual resume gate.
apps/sdlc/lib/model/entities/task/ops/inflight.tsmodifyLease-preferring classify.
apps/sdlc/skills/task-work/SKILL.mdmodifyStep 2 reads the new fields.
  • AC-1: A run holding a lease in phase working is a resume candidate even when main’s HEAD is not the verify-stamp commit.
  • AC-2: With no local lease mirror, probe-state and inflight reproduce today’s outputs.
  • AC-3: inflight classifies a lease in awaiting-review / responding as awaiting-review regardless of frontmatter.

T-5G81-lease-payload-gates


← Back to Tasks