Repository navigation
ci: run the inventory gate on the directory its generator reads - #446
Merged
Merged
Conversation
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
force-pushed
the
ci/docs-inventory-rules-trigger
branch
from
September 9, 2026 05:34
64e38a0 to
6cb21e9
Compare
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The generated-inventory gate never ran on the directory its own generator reads. Refs #418.
docs-inventory.ymltriggered on three paths:docs/pdf20-conformance.md, the generator, and itself. Butrule_class_provenance()in that generator readssrc/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. Apull_requestrun uses the head branch's workflow, path filters included.Verified rather than argued. Throwaway PR #455 removed
.github/workflows/docs-inventory.ymlfrom both filters and edited a comment in one rule file, leavingsrc/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
--checkregenerates 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:38hand-types the same figures from outsideRules/, where nothing derives or gates them and this filter cannot help. Filed as #454.No source, no tests and nothing shipped is touched.