fix(#4830): re-land #4768's letter-suffix phase-id fix and its lint-phase-id-drift ratchets on current next (#4873)
* fix(#4830): re-land #4768's letter-suffix phase-id fix and its lint-phase-id-drift ratchets on current next Commit740ba0d8a(#4781) removed every change #4768 had merged for #4748: the first-non-digit split at execute-phase.md's two arithmetic sites, the init-emitted `padded_phase` the REVIEW.md lookup binds instead of `printf "%02d"`, the canonical-grammar extractions in autonomous.md and plan-review-convergence.md, the `.changeset/zesty-wolves-tumble.md` fragment, and the three lint-phase-id-drift ratchets with their tests. The guard and the code it guarded left together, so nothing went red. This is a cherry-pick of092d9256bonto current `next`, resolved against the #4683 threat-id fields on execute-phase.md's Parse-JSON line, with the changeset `pr:` reset to the placeholder and the compact-content benchmark baseline regenerated against the current base. (cherry picked from commit092d9256b8) Emitted-Drift-Ack-Growth: autonomous.md — restores #4768's canonical-grammar extraction and its explanatory comment for --from/--to/--only Emitted-Drift-Ack-Growth: execute-phase.md — restores #4768's first-non-digit split at two arithmetic sites and the padded_phase binding for the REVIEW.md lookup Emitted-Drift-Ack-Growth: plan-review-convergence.md — restores #4768's canonical-grammar phase extraction and its comment Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AX7LXxc3uAkGki6iaYiAMP * chore(#4830): set changeset fragment pr to 4873 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Tom Boucher <trekkie@nomorestars.com>
This commit is contained in:
@@ -1028,6 +1028,13 @@ function cmdInitExecutePhase(
|
||||
? toPosixPath(path.join(cwd, phaseInfo['directory'] as string))
|
||||
: null,
|
||||
phase_number: phaseInfo?.['phase_number'] || null,
|
||||
// #4748: the disk path hands back the directory's padded number (`03A`)
|
||||
// but the ROADMAP fallback above hands back the heading's bare one (`3A`),
|
||||
// and execute-phase.md's review lookup needs the padded form for
|
||||
// `{PADDED}-REVIEW.md`. It used to re-pad in shell with `printf "%02d"`,
|
||||
// which cannot pad a letter id and reads an already-padded `08` as octal.
|
||||
// Emit the canonical normalization, as the plan-phase/code-review inits do.
|
||||
padded_phase: phaseInfo?.['phase_number'] ? normalizePhaseName(phaseInfo['phase_number']) : null,
|
||||
// #3171: prefer the ROADMAP's curated display name for `phase_name`. When
|
||||
// the phase directory already exists on disk, the disk-lookup path
|
||||
// (searchPhaseInDir) derives phase_name from the directory-name remainder
|
||||
|
||||
Reference in New Issue
Block a user