Skip to content

T-2W56-lease-noun-migration

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

lease is the largest hidden noun and, after T-ZSSE-task-sort-registry-move, the last hand-wired CLI subtree besides backlog. Migrate its 11 verb files into discovered op modules preserving the real two-axis depth-3 shape (lease task *, lease op claim) — atomically, because a partial drain creates a split-brain window where lease task acquire routes to the old dispatcher while flat lease heartbeat routes to the registry.

LocationRole today
plugin/cli/lease_cli/11 hand-wired verbs incl. the two-axis task_claim/task_acquire/task_reacquire/task_transition/task_archive + op_claim
plugin/cli/lease_cli/index.tsnoun-scoped --authority/--project-root flags applied to every subcommand
plugin/cli/lease_cli/_common.tsdeterministic markers (CLAIMED/HEARTBEAT/CAS-FAILED/…) + exit codes 2–8
plugin/skills/task-work/tests/lease_integration.test.tsspawns scripts/sdlc_lease.ts and lease_heartbeat_loop.ts by path
plugin/cli/sdlc.tsLEGACY_NOUNS carries lease

services/lease/ops/task/{claim,acquire,reacquire,transition,archive}.ts and ops/op/claim.ts as 3-segment paths, plus flat ops/{heartbeat,release,inspect,list,parse-footer,reconcile,migrate}.ts; authority declared via a shared optional input fragment on each lease op (the noun-level flag becomes verb-level — adapter has no inherited-flag mechanism; callers are codemodded anyway); markers and exit codes preserved via render hooks; the single-shot heartbeat op stays distinct from the heartbeat-loop service; lease leaves LEGACY_NOUNS in the same commit the ops register, with a post-flip sdlc lease task acquire behavior test guarding the split-brain window.

  1. Goldens for every verb: markers, exit codes 2–8, --json shapes (reuse the existing lease test fixtures).
  2. Port the flat verbs, then the two-axis depth-3 verbs under ops/task/ and ops/op/.
  3. Shared authority input fragment; verify expansion semantics match resolveAuthority (via lib/config from T-KO35-config-sdlc-yaml).
  4. Atomic flip: ops registration + LEGACY_NOUNS removal in one commit; post-flip dispatch test for a depth-3 verb.
  5. Re-point lease_integration.test.ts (and scripts/sdlc_lease.ts callers) to spawn cli/sdlc.ts; full lease suites green.
LocationKindChange
plugin/lib/services/lease/modifyops/ tree lands here (post T-JJZ3-lib-root-tidy relocation)
plugin/cli/lease_cli/deleteverbs become discovered ops (git mv cores)
plugin/cli/sdlc.tsmodifyLEGACY_NOUNS drops lease (same commit)
plugin/skills/task-work/tests/lease_integration.test.tsmodifyspawn cli/sdlc.ts
plugin/scripts/sdlc_lease.tsmodifyforwards to the CLI until deletion
  • AC-1: every lease verb golden parity — markers, exit codes 2–8, --json — including all five lease task verbs and lease op claim at depth-3.
  • AC-2: ops registration and LEGACY_NOUNS removal are one commit; a post-flip test dispatches sdlc lease task acquire through the registry (no legacy fall-through).
  • AC-3: --authority accepted at verb level with unchanged expansion semantics; lease namespace-conflict guard behavior preserved.
  • AC-4: lease_integration.test.ts green spawning the CLI; single-shot heartbeat and the heartbeat-loop service remain distinct paths.
  • The adversarial loop’s strongest catch: all four candidate designs flattened the lease two-axis lossily, and the ambiguity refuter proved the mergeSplitNoun split-brain window. docs/plans/op-substrate-full-sweep.md T11 amendment.

T-NV49-op-path-substrate, T-JJZ3-lib-root-tidy


← Back to Tasks