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:
@@ -900,7 +900,10 @@ function normalizePhaseName(phase) {
|
||||
const match = stripped.match(/^(\d+)([A-Z])?((?:\.\d+)*)/i);
|
||||
if (match) {
|
||||
const padded = match[1].padStart(2, '0');
|
||||
const letter = match[2] ? match[2].toUpperCase() : '';
|
||||
// Preserve original case of letter suffix (#1962).
|
||||
// Uppercasing causes directory/roadmap mismatches on case-sensitive filesystems
|
||||
// (e.g., "16c" in ROADMAP.md → directory "16C-name" → progress can't match).
|
||||
const letter = match[2] || '';
|
||||
const decimal = match[3] || '';
|
||||
return padded + letter + decimal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user