Skip to content

ci: run the inventory gate on the directory its generator reads - #446

Merged
Tim81 merged 1 commit into
mainfrom
ci/docs-inventory-rules-trigger
Sep 9, 2026
Merged

Tim81 merged 1 commit into
mainfrom
ci/docs-inventory-rules-trigger

Conversation

@Tim81

@Tim81 Tim81 commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

The generated-inventory gate never ran on the directory its own generator reads. Refs #418.

docs-inventory.yml triggered on three paths: docs/pdf20-conformance.md, the generator, and itself. But rule_class_provenance() in that generator reads src/VellumPdf.Conformance/Rules/ and derives six of the figures published on the page, among them how many rule classes claim clean-room derivation and how many of those also name veraPDF.

So a pull request editing only rule comments moved the published figures with the gate silently skipped. The workflow's own header said the filter limited it to "the two files that can" cause drift, which stopped being true once the generator started reading source, and was already off by one before that. The header now lists what the filter actually covers.

Why now

Every batch of the #418 and #428 re-derivation edits exactly those comments. The disclosure that measures the sweep's own progress would have drifted as the sweep ran, and the gate that exists to catch that would have stayed quiet. PR #445 already moved one of those figures, from 50 to 49; the gate ran there only because that PR also touches the generated page itself.

Verified, by isolating the glob

An earlier version of this description claimed the change could not be tested before merge, on the grounds that GitHub evaluates pull-request triggers against the base branch's workflow. That is wrong: it describes pull_request_target. A pull_request run uses the head branch's workflow, path filters included.

Verified rather than argued. Throwaway PR #455 removed .github/workflows/docs-inventory.yml from both filters and edited a comment in one rule file, leaving src/VellumPdf.Conformance/Rules/** as the only pattern its diff could match. The Docs inventory workflow ran and succeeded, so the glob works. That PR is closed unmerged and its branch deleted.

This PR alone could not have shown it, because its own diff touches the workflow file, which is in the filter, so the gate fires here for either reason.

What the wider filter costs, now stated in the header

Ordinary source edits pay a run, which downloads roughly 38 MB. And because --check regenerates the whole page, upstream drift in the PDF Association datasets can now fail a pull request that caused no drift of its own. That is a false red on a contributor's change rather than a missed one, which is the safer direction, but it is real.

A cheaper design exists and is worth considering separately: the provenance figures are the only part of the page derived from the tree and need no network, so a check limited to those six could run in the main CI workflow at zero download. That is a second code path, so not folded in here.

Not addressed

Review of this PR turned up that ConformanceCatalog.cs:38 hand-types the same figures from outside Rules/, where nothing derives or gates them and this filter cannot help. Filed as #454.

No source, no tests and nothing shipped is touched.

docs-inventory.yml triggered on docs/pdf20-conformance.md, the generator, and
itself. But rule_class_provenance() in that generator reads
src/VellumPdf.Conformance/Rules/ and derives six of the figures published on the
page, among them how many rule classes claim clean-room derivation and how many
of those also name veraPDF.

So a pull request that edited only rule comments changed the generated output
and the --check gate did not run. The workflow header said the filter limited it
to "the two files that can" cause drift, which stopped being true once the
generator started reading source, and was already off by one before that. The
header now lists what the filter actually covers, and owns the trade rather than
layering a correction under a sentence that contradicts it.

This matters now rather than in the abstract. Every batch of the #418 and #428
re-derivation edits exactly those comments, so the disclosure that measures the
sweep's own progress would have drifted as the sweep ran, and the gate that
exists to catch that would have stayed silent.

Two costs, both now stated in the header. Ordinary source edits pay a ~38 MB
download and a run. And because --check regenerates the whole page, upstream
drift can fail a pull request that caused none of its own, which is a false red
on a contributor's change rather than a missed one.

Refs #418.
@Tim81
Tim81 force-pushed the ci/docs-inventory-rules-trigger branch from 64e38a0 to 6cb21e9 Compare September 9, 2026 05:34
@Tim81
Tim81 merged commit f411258 into main Sep 9, 2026
5 checks passed
@Tim81
Tim81 deleted the ci/docs-inventory-rules-trigger branch November 21, 2026 06:37
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.

1 participant