fix(#2844): verify-summary ignores future/prose path mentions; resolves project root (#2910)

* fix(#2844): verify-summary binds file-claim extraction to a creation-claim context

verify-summary's Pattern 1 matched any backticked path-like token with no
context check, so a prose mention of a future deliverable (`shared/types.ts`
in a 'next phase will add…' sentence) was checked for existence and its absence
failed the verdict on a healthy phase. #2685 added shape filtering but no
context check.

- src/verify.cts: both extraction patterns now require a claim label on the line
  (Created/Modified/Added/Updated/Edited/key-files). A bare prose mention no
  longer matches; genuine labeled claims still do.
- gsd-core/bin/gsd-tools.cjs: remove 'verify-summary' from SKIP_ROOT_RESOLUTION
  so relative claim paths resolve against the project root, not the raw cwd
  (subdirectory invocation no longer manufactures missing files).

Regression tests: prose mention not treated as a claim; prose-only SUMMARY
passes; absent claimed file still fails.

* chore(#2844): backfill changeset PR 2910

---------

Co-authored-by: Test <test@example.com>
(cherry picked from commit 42f4f184c0)
This commit is contained in:
Tom Boucher
2026-07-31 03:16:15 -04:00
committed by sim
parent e1b275766d
commit 7112c6ca47
4 changed files with 92 additions and 4 deletions

View File

@@ -3336,7 +3336,11 @@ async function main() {
// move the other at the same time (keep them consistent).
const SKIP_ROOT_RESOLUTION = new Set([
'generate-slug', 'current-timestamp', 'verify-path-exists',
'verify-summary', 'template', 'frontmatter', 'detect-custom-files',
// #2844: verify-summary was previously skipped, leaving relative file-claim
// paths resolved against the raw process.cwd() — invoking from a subdirectory
// manufactured "missing files" on an otherwise-correct SUMMARY. It now goes
// through findProjectRoot so claims resolve against the project root.
'template', 'frontmatter', 'detect-custom-files',
// #1854: restore-custom-files operates on a runtime config dir passed
// explicitly via --config-dir; it never reads .planning/.
'restore-custom-files',