Skip to content

check-cross-package-test-inputs: a resolve() call whose literal sits on a following line yields no roster name — multi-line new URL() is recognised, multi-line resolve() is not #11093

Description

@os-zhuang

Observed while widening a spec pin's population on #10848 (PR #11092), measured on that branch.

The asymmetry

scanPathExpressions in scripts/check-cross-package-test-inputs.mjs recognises a read whose new URL() argument spans lines (self-test: "flags a read whose argument is a multi-line new URL()"), but a path.resolve() seed call whose relative-literal argument sits on its own line yields NO roster name. Measured, same file, same literal:

// NOT seen — glob went "held by nothing", gate exit 1:constP=path.resolve(HERE,'../../../../.claude/skills/spec-property-retirement/SKILL.md',);// seen — gate exit 0:constP=path.resolve(HERE,'../../../../.claude/skills/spec-property-retirement/SKILL.md');

This is inside the header's stated limit family ("an argument it cannot fold" yields no name, never a wrong one), and the per-glob staleness check (#10566) did catch it — the system failed safe. Two costs remain:

  1. The multi-line spelling is what a formatter produces for a long path, so the miss is the DEFAULT spelling for long relative literals, not an exotic one.
  2. The failure text for the caught case leads with "Delete the glob (and its turbo.json input) if the read is gone" — for a read that is real and merely unseen, the first-listed remedy deletes a correct declaration. The heldBy escape hatch is mentioned, but nothing in the message says "or your read may be spelled across lines; single-line it", which is the actual fix.

Suggested disposition

Either teach the resolver the line-spanning resolve()/join() argument shape (with a --self-test case, per the header's own rule), or add the multi-line spelling to the failure text's remedy list. No urgency: the reverse check holds the line today.

Refs: #9763 (the reconstruction that added the RESOLVED half) · #10566 (the per-glob staleness leg that caught this).


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions