ci(docs): run the docs gate when the example checker's helpers change

Merged
DE
1mo ago
+5-0

What and why

.github/filters.yml decides which suites a pull request runs. The docs block lists the four checker scripts as scripts/check-docs-*.ts, and two modules those checkers import fall outside that pattern, so a change to either one leaves the filter output false and the build job in .github/workflows/docs.yml:38 is skipped.

scripts/check-docs-examples.ts:23 imports ./docs-examples.ts for the example list, and scripts/docs-examples.ts:17 takes REPO_ROOT from ./public-packages.ts. Neither path matches scripts/check-docs-*.ts, docs/**, skills/e2e/**, or any other entry in the block, and the check script in docs/package.json is what runs them.

Nothing reports the skip. A skipped job passes the required docs gate on purpose (.github/workflows/docs.yml:58, needs: [changes, build], if: always()), docs.yml runs on pull requests, merge queue entries, and manual dispatch only, with no push trigger, and spec.yml runs its own steps one by one instead of the root pnpm check that does include docs:check. So the check that consumes those modules never runs, neither on the pull request nor on main afterwards.

The pattern was correct when it was written. PR #931 wrote the docs block for the four check-docs-*.ts checkers. PR #1017 later moved the example list into docs-examples.ts, which reads the repository root from the older public-packages.ts, and the block was never extended. AGENTS.md asks for the opposite ("A new build input or benchmark dependency goes into filters.yml in the same change"), and PR #886 is this same fix for the mobile block, where packages/github/** was missing.

What the two modules do, so the stakes are concrete. docs-examples.ts is what turns an example file that no docs page shows into a failure instead of an unchecked file, and public-packages.ts is where that walk gets the repository root. A regression in either one reads as a green docs gate.

What changed

Two entries and a comment in the docs block:

docs:
  - 'docs/**'
  - 'skills/e2e/**'
  # The docs check and the modules it imports: `check-docs-examples.ts` reads
  # the example list from `docs-examples.ts`, which takes the repository root
  # from `public-packages.ts`.
  - 'scripts/check-docs-*.ts'
  - 'scripts/docs-examples.ts'
  - 'scripts/public-packages.ts'

What each path does to the docs suite:

changemainthis branch
scripts/docs-examples.tsskippedruns
scripts/public-packages.tsskippedruns
scripts/check-docs-examples.tsruns, through check-docs-*.tsruns
docs/** and skills/e2e/**runsruns
packages/e2e/src/**skippedskipped

public-packages.ts is in the block because the docs check reaches it through docs-examples.ts. Four other gates read it too (check-error-codes, check-peer-ranges, check-install-scripts, check-changeset-bumps), and all of them run in the unfiltered spec.yml, so their coverage does not depend on this block.

CI only. No changeset, and nothing changes for anyone consuming the published packages.

Verified

Ran it locally: yes

  • Matched both versions of the block against the four script paths with Node 24's glob matcher (node:path.matchesGlob). On main both helper modules report no match, which is the skip; here both match, and the four checkers keep matching through the existing check-docs-*.ts pattern. picomatch, the matcher dorny/paths-filter itself uses, is not installed in this checkout, and the change only adds positives to a block that carries no negatives.
  • Re-parsed the file after the edit with a YAML parser. The top-level keys runner, web, mobile, and docs are intact, and the *runner anchor still merges into the web and mobile blocks.
  • Ran the checkers the docs suite runs, at this revision:
check-docs-examples          exit 0  docs examples: 19 files shown verbatim in docs/reference/runner.mdx, docs/integrations/limrun.mdx, ...
check-docs-package-managers  exit 0  docs package managers: every command block in 60 pages offers npm, pnpm, bun
check-docs-logos             exit 0  docs logos: 15 vendor pages have a sidebar icon and card logos
check-docs-anchors           did not run: @sindresorhus/slugify (root package.json:51) is missing from this checkout
  • This PR edits filters.yml, which every list includes on purpose so a change to the gate runs what it gates, so its own CI run exercises the docs workflow.

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.