Repository navigation
CI: cover every input of the nine path-filtered workflows, and check the filters with a guard test - #542
Merged
Conversation
Agent: codex/gpt-6.1-terra
Agent: codex/gpt-6.1-terra
Agent: codex/gpt-6.1-terra
Agent: codex/gpt-6.1-terra
teddashh
added a commit
that referenced
this pull request
Nov 15, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Nine workflows have
pathsfilters: at-members, at-secops, at-usage, backup, contracts, dns, fleetupdate, installer and portal. They run only when a changed file matches the filter. Their filters missed many of the files their jobs build, test, format or read, so a change to one of those files did not run the jobs. For example, at-members listed onlytests/e2e/at/members/**,docs/e2e/at/members/**,mk/at-members.mkand its own workflow file, while its jobs also use files underapps/,contracts/anddb/.What changes:
A guard test.
TestWorkflowPathsintests/ci/runs in the Go job'sgo test ./.... For each job of the nine workflows, it derives the job's inputs:maketargets build, test or vet, read frommake -n, with their dependencies fromgo list -depsfor amd64 and arm64 and for each build tag;gofmtcommand in the steps and recipes, in three forms:$(git ls-files …)with git pathspecs,$(rg --files … -g '*.go'), and plain paths.It then requires the job's filter to match every input file, on each of the workflow's
pull_requestandpushevents. A miss fails the test, naming the workflow, job, event and file. The test also fails on agofmtcommand in any other form, on a pattern the matcher does not support ([,],+or\), and when its root is not the top level of a git checkout.The filters gain the missing inputs. Patterns per list, before and after: at-members 4 → 77, at-secops 4 → 52 and at-usage 4 → 82 (these three filter
pull_requestonly); backup 9 → 14, contracts 11 → 14, dns 19 → 53, fleetupdate 11 → 40, installer 9 → 47 and portal 10 → 16. Nothing outside thepathslists changes.'**/*.go'. Its job runsmake go-lint, whosegofmtchecks every tracked Go file, so any Go change can fail it.deploy/**becomesdeploy/backup/**anddeploy/devstack/**: its job reads no otherdeploy/files.<dir>/*) instead of the whole tree.Tests: unit tests cover the matcher (a leading
**/,go.*, and each rejected character), the extraction of Go commands frommake -n, the threegofmtforms and an unknown form, the pinned wiring, and the YAML parser's reading of theonkey.Deliberate breakages, each reverted afterwards. Each made
TestWorkflowPathsfail with a message naming the place:'**/*.go'from fleetupdate'spull_requestlist: 117 misses onpull_requestin 11 directories, none onpush. Removing it from thepushlist only: 117 misses, all onpush;tests/installerto the files of agofmtcommand inmk/dns.mk: 10 misses on each of dns's two events;gofmtits files from$(find tests/e2e/at/secops -name '*.go'):unsupported file-list command;'tests/[ab]/**'to contracts'spull_requestlist, and'a/+b'to at-secops's:unsupported syntax in pattern.Validation: on the exact source
344deb5f:on.<event>.pathseach equals its version at2f5159f3;tests/ci: each of its 6 top-level tests passed once, none failed or skipped, and all 9 formatter sets were logged;go vetandgofmtare clean;internal/db(3 packages ok), and the DNS lint, build, unit and publish steps (12 packages ok);go-lint,go test ./...(95 packages ok; 35 of them came from Go's test cache, which reuses a pass of the same test binary with the same inputs;tests/ci, the only Go package this change touches, ran fresh), the build of every command for amd64 and arm64, and the tidy check;fvpn-controlandfvpn-worker(12 tests passed, none failed, flaky or skipped);Then the same checks on a temporary merge of this source into main
f0f10c9b, which merged without conflicts:on.<event>.pathseach equals its version atf0f10c9b;tests/ci: each of its 6 top-level tests passed once, none failed or skipped, and all 9 formatter sets were logged;go vetandgofmtare clean;internal/db(3 packages ok), and the DNS lint, build, unit and publish steps (12 packages ok);go-lint,go test ./...(96 packages ok; 2 of them came from Go's test cache in the same way;tests/ciran fresh), the build of every command for amd64 and arm64, and the tidy check;fvpn-controlandfvpn-worker(12 tests passed, none failed, flaky or skipped);These are local runs; no CI result is claimed here. Every one of the nine workflow files changes, so this pull request runs all nine workflows. Their container and network-namespace jobs were not run locally; the steps of those jobs are unchanged.
Review: An independent review of the first version found three problems. fleetupdate's lists missed 117 Go files in 11 directories that its
make go-lintformats, and the guard did not derive formatter inputs. At-secops'sdeploy/**was broader than what its job reads. And[,]and+were matched as literal characters. The third commit fixes all three. A second review, of that commit, approved it with no findings. A local run of the Go job's tests then failed:TestGofmtInputExtractionexpects the guard to refuse a directory outside a git checkout, butmake go-testputs its temporary directories inside the checkout, where git finds the enclosing repository. The fourth commit makes the guard require the top level of a checkout and adds a test for a subdirectory. A third review, of that commit, approved it.Agent: codex/gpt-6.1-terra
🤖 Generated with Claude Code