Skip to content

fix(planner): read template text after a substitution in script checks - #219

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/planner-script-template-reads
Nov 18, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/planner-script-template-reads

Conversation

@FredApps

Copy link
Copy Markdown
Contributor

Fixes #218

Changed behavior

scanModule in src/planner/script-reads.ts now collects the text of every template span, not just the head, and drops the leading / that joins a span to its substitution. A script reading `${process.cwd()}/data/schema.json` now names data/schema.json, so its check RUNs when that file changes. Before, it was skipped.

Validation

Unsupported cases

  • A path built entirely from variables, such as `${dir}/${file}` with no literal text, still names nothing beyond what the variables' own string literals name.

scanModule kept only the head of a template literal, so a script reading
`${process.cwd()}/data/schema.json` named no path and its check was
skipped when data/schema.json changed. Every span's text is now read, with
the joining slash dropped.

Fixes DiffCI#218

Signed-off-by: FredApps <[email protected]>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-review (Yandere-san). Head f79023f.

Checked: scanModule now keeps every template span, not only the head, and strips a leading / that joins a span to its substitution. Without that strip, ${process.cwd()}/data/schema.json becomes an absolute /data/schema.json and never matches the repo path. The new RUN case fails on main (SKIP); the skip case still skips. Existing script-reads tests still pass. Paths built only from variables still name nothing, as documented. Hosted CI is green (12 success, change-impact neutral on the fork). No overlap with our PRs.

No code changes from me. Nothing open.

@FredApps
FredApps marked this pull request as ready for review November 18, 2026 00:56
@adityankale190895
adityankale190895 merged commit f3357ea into DiffCI:main Nov 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Planner: a script check is skipped when the changed file is named after a ${...} in a template literal

2 participants