Skip to content

T-ZSSE-task-sort-registry-move

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

task sits in LEGACY_NOUNS for exactly one verb: sort. Move sort into the registry to drain it — atomically, because mergeSplitNoun’s legacy-wins collision rule would dead-shadow a registry sort while task stays legacy, and a naive parity test would pass against the still-live legacy path, masking the unreachable op.

LocationRole today
plugin/cli/task_cli/sort.tspickup-order algorithm (D-Q2WR): line-per-basename output consumed by orchestrate; CYCLE markers
plugin/cli/sdlc.tsLEGACY_NOUNS carries task solely for the sort dispatch
plugin/cli/task_cli/tests/dispatch tests spawn task_cli/index.ts by path

model/entities/task/ops/sort.ts with path: ['task','sort']; a cli.render hook preserves the line-per-basename output and CYCLE marker; task leaves LEGACY_NOUNS in the same commit; the parity test asserts registry dispatch — getOp(['task','sort']) resolves AND task is absent from LEGACY_NOUNS — so a shadowed op fails loudly. The CLI path sdlc task sort is unchanged: no caller codemod.

  1. Golden-snapshot sdlc task sort (normal + cycle fixture), byte-exact.
  2. Port the algorithm into the op with its render hook.
  3. In the SAME commit: register the op and remove task from LEGACY_NOUNS.
  4. Parity + registry-dispatch assertions; re-point task_cli dispatch tests to spawn cli/sdlc.ts.
LocationKindChange
plugin/lib/model/entities/task/ops/sort.tsnewthe op + render hook
plugin/cli/task_cli/sort.tsdeletealgorithm moves to the op (git mv core)
plugin/cli/sdlc.tsmodifyLEGACY_NOUNS drops task (same commit as op registration)
plugin/cli/task_cli/tests/dispatch.test.tsmodifyspawn cli/sdlc.ts; assert registry dispatch
  • AC-1: sdlc task sort byte-matches the golden, including the CYCLE-marker case.
  • AC-2: a test asserts getOp(['task','sort']) resolves AND task ∉ LEGACY_NOUNS — the shadow scenario cannot pass silently.
  • AC-3: the op registration and the LEGACY_NOUNS removal are one commit (git show exhibits both).
  • AC-4: after merge, backlog is the only remaining split/legacy noun.
  • Adversarial refutation: mergeSplitNoun’s first-positional probe + legacy-wins rule create a silent-shadow window; the atomic-flip discipline here mirrors T-2W56-lease-noun-migration’s split-brain guard.

T-NV49-op-path-substrate


← Back to Tasks