* test(#3335): fold the workflow-content & phase-lifecycle fix-* cluster — Wave 3
Folds 13 legacy fix-*.test.cjs regression files (131 test() blocks) into
their module's main suite, per H3 (#3315) of the test-hygiene epic (#3053):
- 6 files with no prior target coverage: renamed (git mv) into new suites
(spike-manifest-scoping, ship-note, add-todo, workflow-jq-dependency,
resolve-execution-dynamic-routing, clock)
- 7 files merged into 5 pre-existing suites (worktree-base-ref x2,
model-resolver, phase-locator x2, frontmatter, verification-status),
deduplicated against existing coverage
Zero net test-coverage loss: every source assertion preserved or verified
as a genuine pre-existing duplicate. No production code changed.
Last fix-* wave (Wave 1 #3341, Wave 2 #3342 already merged); 4 issue-*
waves remain in #3315.
* test(#3335): fix orthogonal-review findings — Wave 3 fold
Standards-axis review + Memtrace graph pass found real defects in the
just-folded suites, all fixed here:
- phase-locator.test.cjs: pinned an unseeded fast-check property test
(CONTRIBUTING.md determinism requirement), matching the sibling test's
seed:7 convention.
- phase-locator.test.cjs: added assert.ok() presence guards after 9
data.plans.find() calls that were dereferenced unguarded, inconsistent
with 5 sibling tests in the same file that already guard correctly.
Latent robustness gap — an omitted plan would throw an opaque TypeError
instead of a clear assertion failure.
- Standardized the fold-wrapper convention (block-scoped __foldDescribe)
across worktree-base-ref.test.cjs, verification-status.test.cjs, and
phase-locator.test.cjs to match the pattern already established in
frontmatter.test.cjs and model-resolver.test.cjs from earlier folds.
- worktree-base-ref.test.cjs: moved a mid-file require to the top-of-file
require block.
- Eliminated duplicated env-isolation helpers: model-resolver.test.cjs and
phase-locator.test.cjs each reimplemented GSD_WORKSTREAM/GSD_PROJECT
save-restore independently; factored a shared isolateWorkstreamEnv()/
restoreWorkstreamEnv() into tests/helpers.cjs and pointed both call
sites at it.
No test() count changed in any file. No production code touched.
---------
Co-authored-by: sim <sim@local>