From a22602e276b9efee54adfb0db68e33d86c065256 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Fri, 10 Jul 2026 01:07:00 -0400 Subject: [PATCH] docs(#2126): correct malformed_roadmap prior-behavior note (re-review) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-review found the test comment + changeset prose inaccurately claimed a bare query "always" surfaced malformed_roadmap. Empirically, on origin/next a project-code-prefixed checklist entry was a silent {found:false} for BOTH query forms — the prefixed pass discarded its malformed candidate and the bare regex could not match the PROJ- prefix at all. The unified 3-source lookup newly grants the diagnostic to both forms; correct the prose to say so. No logic change. Co-Authored-By: Claude Opus 4.8 --- .changeset/quick-seals-parade.md | 2 +- tests/roadmap.test.cjs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.changeset/quick-seals-parade.md b/.changeset/quick-seals-parade.md index 6e31c63fe..32e846f75 100644 --- a/.changeset/quick-seals-parade.md +++ b/.changeset/quick-seals-parade.md @@ -2,4 +2,4 @@ type: Fixed pr: 0 --- -**`roadmap get-phase` resolves project-code-prefixed headings by bare number** — a bare-number query (e.g. `29`) now resolves a drifted `### Phase AB-29:` heading, matching the internal resolver used by `init.phase-op`; previously the CLI returned empty. A bare sibling (`### Phase 29:`) still takes precedence. A project-code-prefixed query against a checklist-only roadmap now reports the same `malformed_roadmap` diagnostic a bare query always did, instead of a silent empty result. (#2114) +**`roadmap get-phase` resolves project-code-prefixed headings by bare number** — a bare-number query (e.g. `29`) now resolves a drifted `### Phase AB-29:` heading, matching the internal resolver used by `init.phase-op`; previously the CLI returned empty. A bare sibling (`### Phase 29:`) still takes precedence. A project-code-prefixed heading present only as a summary/checklist line (no matching detail section) now reports a `malformed_roadmap` diagnostic — for both prefixed and bare-number queries — instead of a silent empty result. (#2114) diff --git a/tests/roadmap.test.cjs b/tests/roadmap.test.cjs index c52cad759..d401b0c5a 100644 --- a/tests/roadmap.test.cjs +++ b/tests/roadmap.test.cjs @@ -2122,14 +2122,14 @@ describe('bug #2114: roadmap get-phase resolves drifted prefixed headings by bar assert.strictEqual(payload30.phase_name, 'Plain'); }); - test('prefixed query surfaces malformed_roadmap when only a checklist entry exists (parity with bare)', () => { - // #2121/#2114 route all three resolvers through the shared 3-source lookup, so a - // project-code-prefixed query now surfaces the SAME `malformed_roadmap` diagnostic a - // bare numeric query always did: a `**Phase PROJ-42:**` summary line with no matching - // `### Phase PROJ-42:` detail heading is malformed for BOTH query forms. Before the - // consolidation the prefixed form silently returned `{found:false}` with no diagnostic - // (the exact-prefix pass discarded its malformed candidate) — this test fails on that - // prior behavior and locks the unified, more-informative result. + test('project-code-prefixed checklist-only entry surfaces malformed_roadmap for both query forms', () => { + // #2121/#2114 route all three resolvers through the shared 3-source lookup. A + // `**Phase PROJ-42:**` summary line with no matching `### Phase PROJ-42:` detail heading + // is a malformed ROADMAP. Before the consolidation this project-code-prefixed checklist + // was reported as a silent `{found:false}` for BOTH query forms — the prefixed pass + // discarded its malformed candidate, and the bare pass could not match the `PROJ-` prefix + // at all. The unified lookup newly surfaces the malformed_roadmap diagnostic for both, so + // this test fails on the prior silent-empty behavior for the prefixed AND the bare form. fs.writeFileSync( path.join(tmpDir, '.planning', 'ROADMAP.md'), [