Commit Graph

1 Commits

Author SHA1 Message Date
Tom Boucher
bf77c0b270 fix(#904): normalize phase number in init.execute-phase branch_name (#909)
Wrap the {phase} substitution in normalizePhaseName() at both fix sites:
- src/init.cts  — cmdInitExecutePhase branch_name output
- src/commands.cts — cmdCommit pre-execution branch derivation

When project_code is set (e.g. "CK"), extractPhaseToken returns the
full prefixed token "CK-01" as phase_number.  Without normalization the
generated branch was "gsd/phase-CK-01-foundation"; after this fix it is
"gsd/phase-01-foundation", matching the documented {phase} contract
(padded numeric only).

Adds a regression test in tests/init.test.cjs.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit cb2cda1865)
2026-06-08 23:44:20 -04:00