You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: phase-executor.model-roles.test.ts runs the exec guard against the developer's checkout and auto-commits uncommitted work #1232
src/lib/workflow/phase-executor.model-roles.test.ts calls executePhaseWithRetry(975, "exec", …) with the SDK mocked and no cwd override, so the exec guard runs against the real process.cwd(). When that tree has uncommitted changes, the #1032 rescue (autoCommitUncommittedWork, phase-executor.ts) commits them as chore(#975): wip checkpoint — exec ended with uncommitted work (auto-committed by sequant).
Observed 2026-09-30 while writing #1227. Running this file next to phase-executor.test.ts, with the fix still uncommitted, turned the three edited files into a wip-checkpoint commit on the feature branch. CI is unaffected because its tree is clean. A developer running the file mid-edit gets a surprise commit, which is recoverable with git reset --soft HEAD~1.
This is the same class as #1163/#1164 (the suite writing checkout state), but here it's a git write.
Acceptance criteria
AC-1: The model-roles tests run the exec path in a temporary git repo, or with the change classifier stubbed, never against the developer's checkout. Evidence: with an uncommitted edit in the working tree, npx vitest run src/lib/workflow/phase-executor.model-roles.test.ts leaves git log -1 and git status --short unchanged
AC-2: No other test that calls executePhaseWithRetry / executePhase for the exec phase runs the guard against process.cwd(). Evidence: grep -rln 'executePhaseWithRetry(\|executePhase(' src --include='*.test.ts' reviewed in the PR body, one line per file
Activity
test(#1232): fixture cleans up its temp dir when repo setup fails