Skip to content

test: isolate whether the rule path alone triggers the inventory gate (do not merge) - #455

Closed
Tim81 wants to merge 2 commits into
mainfrom
test/verify-inventory-trigger
Closed

Tim81 wants to merge 2 commits into
mainfrom
test/verify-inventory-trigger

Conversation

@Tim81

@Tim81 Tim81 commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Throwaway experiment, to be closed unmerged as soon as it answers its question.

PR #446 widens the inventory gate's path filter to include src/VellumPdf.Conformance/Rules/**. That PR cannot demonstrate the glob works, because its own diff touches .github/workflows/docs-inventory.yml, which is itself in the filter, so the gate fires there for either reason.

This branch removes the workflow file from both path lists and edits a comment in one rule file. The diff against main therefore touches exactly one path the filter still lists. If the Docs inventory workflow runs on this pull request, src/VellumPdf.Conformance/Rules/** is the only pattern that can have matched.

Expect the build job to be red; the point is only which workflows start.

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.
Throwaway, not for merge. Removes .github/workflows/docs-inventory.yml from
both path filters and edits a comment in one rule file. The diff against main
then touches exactly one path the filter still lists,
src/VellumPdf.Conformance/Rules/**, so if the Docs inventory workflow runs on
this pull request, that glob is the only thing that can have matched it.

The parent branch cannot show this on its own: it edits the workflow file, which
is itself in the filter, so the gate fires there for either reason.
@Tim81

Tim81 commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

Answered: the Docs inventory workflow ran on this pull request, whose only filter-matching path is src/VellumPdf.Conformance/Rules/**. So the glob in #446 works, and pull_request evaluates path filters against the head branch's workflow rather than the base branch's — the latter is pull_request_target behaviour. #446's description has been corrected accordingly. Closing unmerged, as intended.

@Tim81 Tim81 closed this Sep 9, 2026
@Tim81
Tim81 deleted the test/verify-inventory-trigger branch September 9, 2026 05:36
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