fix(core): preserve letter suffix case in normalizePhaseName (#1963)

* fix(core): preserve letter suffix case in normalizePhaseName (#1962)

normalizePhaseName uppercased letter suffixes (e.g., "16c" → "16C"),
causing directory/roadmap mismatches on case-sensitive filesystems.
init progress couldn't match directory "16C-name" to roadmap "16c".

Preserve original case — comparePhaseNum still uppercases for sorting
(correct), but normalizePhaseName is used for display and directory
creation where case must match the roadmap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(phase): update existing test to expect preserved letter case

The 'uppercases letters' test asserted the old behavior (3a → 03A).
With normalizePhaseName now preserving case, update expectations to
match (3a → 03a) and rename the test to 'preserves letter case'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tibsfox
2026-04-10 07:48:00 -07:00
committed by GitHub
parent 49645b04aa
commit cb1eb7745a
3 changed files with 56 additions and 4 deletions

View File

@@ -1906,9 +1906,9 @@ describe('normalizePhaseName', () => {
assert.strictEqual(normalizePhaseName('12A.2'), '12A.2');
});
test('uppercases letters', () => {
assert.strictEqual(normalizePhaseName('3a'), '03A');
assert.strictEqual(normalizePhaseName('12b.1'), '12B.1');
test('preserves letter case', () => {
assert.strictEqual(normalizePhaseName('3a'), '03a');
assert.strictEqual(normalizePhaseName('12b.1'), '12b.1');
});
test('handles multi-level decimal phases', () => {