issue-325: Full test sweep for the worktree decision table #331
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-325/full-test-sweep-for-the-worktree-decision-table"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
325: Full test sweep for the worktree decision table
Closes #325 — 325.
Generated in 22m 53s.
Review findings
Let me look at the
makeDepsdefinition to confirm thedetectOriginFndependency seam:The pattern is confirmed. Now applying the fix for finding 1 — pin
detectOriginFnin the new runCli test:Now let me verify the fix. First, check the test command and run the affected test file:
Now let me verify the fix context — check
makeDepsand thegitlabOriginfixture in the test file:The fix is consistent —
makeDepsspreads...overrideslast, so mydetectOriginFnoverride takes effect. Now run the gates:Targeted test passes. Now the full gates:
All 2229 tests pass. Now lint and format check on the changed file:
All gates green. Let me confirm the final working-tree diff is minimal:
All gates are green (build, 2229/2229 tests, lint, prettier on the changed file), and the diff is the minimal fix suggested. Finding 2 remains unresolved by design: it's pre-existing repo-wide Prettier drift in 42 files unrelated to this change, and its own suggested fix is to leave it untouched in this MR (separate chore) — fixing it here would bloat the diff.
Review Findings — 325
Summary
Test-only change (7 new tests) completing the ADR-022 worktree decision-table sweep: six
loadConfigFile-level cases (relative dir, dir == repo root, dir inside repo, dir is a regular file, parent-of-repo accepted, prefix-sharing sibling accepted) plus onerunCli-level case (badworktree.dir→ exit 1,error.jsonwithkind: config/stage: setup, pipeline never invoked). All gates ran: build pass, test pass (152 files / 2229 tests), lint pass;prettier --checkfails on 42 pre-existing files none of which are in this diff (both changed files are prettier-clean). No correctness, convention, or coverage gaps found in the diff itself.Remediation: fixed the Low finding in
runCli.test.ts(added adetectOriginFnspy passed throughmakeDepsplusexpect(detectOriginFn).not.toHaveBeenCalled(), so the "before origin detection" comment is now actually pinned). TherunClitest file re-ran green (118/118) and the full suite stays green (2229/2229); lint and prettier pass on the changed file. Left unresolved: the pre-existing repo-wide Prettier drift (42 files) — out of scope for this test-only change, and its suggested fix is to defer it to a separate chore.Critical
(empty)
High
(empty)
Medium
(empty)
Low
runPipelineFnnot being called; the defaultdetectOriginFninmakeDepsis a plain function, so origin detection is not actually asserted (same gap as the sibling "unknown config key" test at line 2392). Suggested fix: follow the pattern at line 170 —const detectOriginFn = vi.fn(() => Promise.resolve(gitlabOrigin));, pass it inmakeDeps({ argv: ['ABC-1'], runPipelineFn, detectOriginFn }), and assertexpect(detectOriginFn).not.toHaveBeenCalled().npm run format:checkfails repo-wide on 42 files with pre-existing Prettier drift (e.g.src/model/vertexAnthropic/auth.test.tsfrom PR #169); no file in this diff is among them, so this is out of scope for issue 325 but will keep the format gate red for any subsequent MR. Suggested fix: leave untouched in this MR (note in the MR description as a known pre-existing gap) or handle in a separate chore runningnpm run format.