Skip to content

[finding] dispatch-gates never names check:doc-anchors for a content/** card — its population root 'content' is not "pathy" #9626

Description

@claude

Noticed while deriving the local gate list for #9430 (a content/docs/deployment/cli.mdx edit, PR #9624).

What happens

node scripts/pm/dispatch-gates.mjs content/docs/deployment/cli.mdx places pnpm check:doc-anchors in the silent bucket:

- pnpm check:doc-anchors [lint.yml] names: scripts/check-doc-anchors.mjs

That gate is required in lint.yml and it is the one gate a docs edit that adds a link most needs — it resolves every internal #fragment against the real Fumadocs heading ids, and check-links.yml explicitly does not do the fragment half (include_fragments = "none"). On this card it mattered in practice: the diff added three fragment links, the derived list named the gate nowhere, and running it anyway was a judgment call rather than a derivation. Reverse-verified on that PR: breaking one of the new fragments turns the gate red, so it does read content/** links.

Why the derivation misses it

scripts/pm/dispatch-gates.mjs decides what counts as a path hint at the extraction site:

constlooksPathy=s.includes('/')||/^\.(claude|changeset|github|gitattributes)\b/.test(s);

A quoted literal with no / is not pathy. scripts/check-doc-anchors.mjs spells its population root as exactly that:

/** The Fumadocs content root — what `/` means in a site route, and what the ... */constCONTENT_ROOT='content';

So the gate's real input surface contributes no hint, the only surviving literal is the script's own filename, and the family scores silent for every card under content/**.

This is narrower than the caveat the script already prints about gates that compute their own population: check-doc-anchorsdoes name its root as a string literal — the extractor just does not recognise a single-segment directory as a path.

Shapes, no recommendation

  1. Widen the extractor: treat a single-segment literal as a hint when a directory of that name exists at the repo root. Cheap; the header's own measurement history warns that widening the hint scan is where false leads come from, so it wants the same fixture treatment the existing rules got.
  2. Leave the extractor alone and let the gate declare its surface — e.g. spell the root 'content/' so it is pathy, in the file that owns it.
  3. Do nothing mechanical and let docs cards carry the gate by convention, accepting that the derived list is silent on it.

Whichever way, the check would be that dispatch-gates.mjs content/docs/any-page.mdx lists check:doc-anchors, and that no card outside content/** and the other link-source globs gains a false lead.

Filed unassigned, no pm:queue — an observation, triage's call.


Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions