Skip to content

ci: make the control_plane path filter's negations effective (#772) - #789

Merged
bpalermo merged 2 commits into
mainfrom
ci/772-control-plane-filter
Sep 16, 2026
Merged

bpalermo merged 2 commits into
mainfrom
ci/772-control-plane-filter

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Follow-up to #772 C1. Note: this PR's own run cannot exercise the new false path (ci.yaml changes are control-plane); verified after merge with a throwaway proxy-only PR.

ci: make the control_plane path filter's negations effective (#772)

ci.yaml's changes job has always claimed to scope the control-plane legs to
"any changed file outside proxy/". It never did. dorny/paths-filter's default
predicate-quantifier is some: the rule items are OR-ed, and picomatch
compiles a leading ! into a matcher for "everything the positive pattern does
NOT match". So '!proxy/**' matched agent/..., docs/..., charts/... —
every file — and the whole filter was true for any change whatsoever.
control_plane has never once evaluated to false since it was written, and
every proxy-only PR has been paying for diff (bazel-diff + Java + full
history), chart-version-bump and deps-audit for nothing.

v4 ships predicate-quantifier: 'some-with-excludes' for exactly this: a file
counts when at least one positive pattern matches and no negated pattern does.
Set it. This is the same fix C1 applied to proxy.yml in 17ac1f3.

Scope of the exclusions — deliberately still just the proxy workspace:

  • Documentation is NOT excluded. //:website_docs (BUILD.bazel:27-38) feeds
    README.md, AGENTS.md, charts/README.md, docs/**/*.md and
    .github/workflows/e2e.yaml into //website:site_test, and website/**
    is a normal Bazel package. That is on purpose (see website/BUILD.bazel:5-10)
    so a dead link or a reintroduced CDN reference fails review rather than
    production. Excluding docs/**, website/** or *.md here would delete
    that gate, so they stay in and bazel-diff keeps doing the fine scoping.

  • '!proxy/**' becomes '!proxy/**/!(*.md)' for the same reason.
    website/staged/proxy-README.md is a symlink to proxy/README.md (proxy/
    is in .bazelignore, so the symlink is how the one copy of that document
    reaches the site), which makes it an input to //website:site_test too.
    With C1's change, proxy.yml no longer runs the Envoy compile for Markdown
    under proxy/, so a blanket '!proxy/**' would leave proxy/README.md with
    no gate at all. Only a leading ! negates a pattern in this action; the
    !( ) extglob inside is ordinary picomatch syntax.

  • An exclusion is final: the action returns false the moment one matches, so a
    later positive pattern cannot add a path back. Exclusion is per changed file,
    so a PR touching both proxy/MODULE.bazel and a Go file is control-plane.

Simulated against the action's own logic (v4 dist/index.js: Filter.isMatch's
SOME_WITH_EXCLUDES branch plus createRuleItem's isInclude/isExclude
split) driven by picomatch with the action's {dot: true}:

PR shape control_plane jobs that run
before / after
(a) docs-only true / true diff, chart-version-bump,
deps-audit, test (impacted =
//website:site_test)
(b) proxy-only source true / FALSE envoy-api-parity, proxy-pin only
(b') proxy/README.md only true / true diff -> //website:site_test
(b'') proxy.yml /
proxy-release.yml only true / FALSE envoy-api-parity, proxy-pin only
(c) Go change true / true all legs, bazel-diff scoped
(d) ci.yaml change true / true all legs, bazel-diff scoped
(e) charts/** change true / true incl. chart-version-bump
(f) website-only true / true diff -> //website:site_test
(g) .proto change true / true all legs, bazel-diff scoped
(h) proxy + Go true / true all legs (the Go file includes it)

The ci fan-in needs no change, and case (b) is the first time its skip path
becomes reachable from the path filter, so it was re-checked: ci is
if: always() over all ten legs and fails only on
contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled').
skipped is deliberately absent — a skipped required check reads as missing to
GitHub and would wedge the PR forever, which is why the gate is a separate
fan-in job at all. This is not theoretical: run 35032050712 reports ci = success
with e2e = skipped. Added a comment saying so, since it is now load-bearing for
a whole class of PR rather than for one leg.

e2e.yaml and main.yaml were checked for the same bug and do not have it:
neither uses dorny/paths-filter (e2e.yaml is schedule + workflow_dispatch;
main.yaml documents at main.yaml:53 that it deliberately has no coarse filter).
proxy-release.yml and pages.yaml use GitHub-native paths:, which has
first-match-wins ordered semantics, not picomatch OR — C1 already covered
proxy-release.yml.

Verification: every workflow parses under python3 -c 'import yaml,sys; yaml.safe_load(open(sys.argv[1]))'; the filter table above from the picomatch
simulation of the action's matcher; predicate-quantifier: some-with-excludes
confirmed present in the pinned v4 dist/index.js. No Bazel target is affected —
.github/workflows/ci.yaml appears in no BUILD file (only e2e.yaml does, via
//:website_docs) and there is no YAML formatter in //bazel/format.

KNOWN GAP in this PR's own run: this commit changes ci.yaml, which is itself a
control-plane path, so control_plane will be true here and the PR will NOT
exercise the new false path. Verify after merge with a throwaway PR that
touches ONLY a non-Markdown file under proxy/ (a comment in
proxy/MODULE.bazel will do -- NOT proxy/README.md, which case (b') keeps as
control-plane on purpose): expect changes = success,
diff/chart-version-bump/deps-audit/test/race/integration/e2e =
skipped, envoy-api-parity/proxy-pin = success, and the required ci = success.
ci.yaml has no workflow_dispatch trigger, so there is no way to force that
run from the Actions tab.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

bpalermo and others added 2 commits September 15, 2026 21:43
`ci.yaml`'s `changes` job has always claimed to scope the control-plane legs to
"any changed file outside proxy/". It never did. dorny/paths-filter's default
`predicate-quantifier` is `some`: the rule items are OR-ed, and picomatch
compiles a leading `!` into a matcher for "everything the positive pattern does
NOT match". So `'!proxy/**'` matched `agent/...`, `docs/...`, `charts/...` —
every file — and the whole filter was true for any change whatsoever.
`control_plane` has never once evaluated to `false` since it was written, and
every proxy-only PR has been paying for `diff` (bazel-diff + Java + full
history), `chart-version-bump` and `deps-audit` for nothing.

v4 ships `predicate-quantifier: 'some-with-excludes'` for exactly this: a file
counts when at least one positive pattern matches and no negated pattern does.
Set it. This is the same fix C1 applied to `proxy.yml` in 17ac1f3.

Scope of the exclusions — deliberately still just the proxy workspace:

  * Documentation is NOT excluded. `//:website_docs` (BUILD.bazel:27-38) feeds
    `README.md`, `AGENTS.md`, `charts/README.md`, `docs/**/*.md` and
    `.github/workflows/e2e.yaml` into `//website:site_test`, and `website/**`
    is a normal Bazel package. That is on purpose (see website/BUILD.bazel:5-10)
    so a dead link or a reintroduced CDN reference fails review rather than
    production. Excluding `docs/**`, `website/**` or `*.md` here would delete
    that gate, so they stay in and bazel-diff keeps doing the fine scoping.

  * `'!proxy/**'` becomes `'!proxy/**/!(*.md)'` for the same reason.
    `website/staged/proxy-README.md` is a symlink to `proxy/README.md` (proxy/
    is in .bazelignore, so the symlink is how the one copy of that document
    reaches the site), which makes it an input to `//website:site_test` too.
    With C1's change, `proxy.yml` no longer runs the Envoy compile for Markdown
    under proxy/, so a blanket `'!proxy/**'` would leave `proxy/README.md` with
    no gate at all. Only a *leading* `!` negates a pattern in this action; the
    `!( )` extglob inside is ordinary picomatch syntax.

  * An exclusion is final: the action returns false the moment one matches, so a
    later positive pattern cannot add a path back. Exclusion is per changed file,
    so a PR touching both `proxy/MODULE.bazel` and a Go file is control-plane.

Simulated against the action's own logic (v4 `dist/index.js`: `Filter.isMatch`'s
`SOME_WITH_EXCLUDES` branch plus `createRuleItem`'s `isInclude`/`isExclude`
split) driven by picomatch with the action's `{dot: true}`:

  PR shape                     control_plane   jobs that run
                               before / after
  (a) docs-only                true  / true    diff, chart-version-bump,
                                               deps-audit, test (impacted =
                                               //website:site_test)
  (b) proxy-only source        true  / FALSE   envoy-api-parity, proxy-pin only
  (b') proxy/README.md only    true  / true    diff -> //website:site_test
  (b'') proxy.yml /
        proxy-release.yml only true  / FALSE   envoy-api-parity, proxy-pin only
  (c) Go change                true  / true    all legs, bazel-diff scoped
  (d) ci.yaml change           true  / true    all legs, bazel-diff scoped
  (e) charts/** change         true  / true    incl. chart-version-bump
  (f) website-only             true  / true    diff -> //website:site_test
  (g) .proto change            true  / true    all legs, bazel-diff scoped
  (h) proxy + Go               true  / true    all legs (the Go file includes it)

The `ci` fan-in needs no change, and case (b) is the first time its skip path
becomes reachable from the path filter, so it was re-checked: `ci` is
`if: always()` over all ten legs and fails only on
`contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')`.
`skipped` is deliberately absent — a skipped *required* check reads as missing to
GitHub and would wedge the PR forever, which is why the gate is a separate
fan-in job at all. This is not theoretical: run 35032050712 reports `ci` = success
with `e2e` = skipped. Added a comment saying so, since it is now load-bearing for
a whole class of PR rather than for one leg.

`e2e.yaml` and `main.yaml` were checked for the same bug and do not have it:
neither uses dorny/paths-filter (e2e.yaml is `schedule` + `workflow_dispatch`;
main.yaml documents at main.yaml:53 that it deliberately has no coarse filter).
`proxy-release.yml` and `pages.yaml` use GitHub-native `paths:`, which has
first-match-wins ordered semantics, not picomatch OR — C1 already covered
proxy-release.yml.

Verification: every workflow parses under `python3 -c 'import yaml,sys;
yaml.safe_load(open(sys.argv[1]))'`; the filter table above from the picomatch
simulation of the action's matcher; `predicate-quantifier: some-with-excludes`
confirmed present in the pinned v4 `dist/index.js`. No Bazel target is affected —
`.github/workflows/ci.yaml` appears in no BUILD file (only `e2e.yaml` does, via
`//:website_docs`) and there is no YAML formatter in `//bazel/format`.

KNOWN GAP in this PR's own run: this commit changes `ci.yaml`, which is itself a
control-plane path, so `control_plane` will be `true` here and the PR will NOT
exercise the new `false` path. Verify after merge with a throwaway PR that
touches ONLY a non-Markdown file under `proxy/` (a comment in
`proxy/MODULE.bazel` will do -- NOT `proxy/README.md`, which case (b') keeps as
control-plane on purpose): expect `changes` = success,
`diff`/`chart-version-bump`/`deps-audit`/`test`/`race`/`integration`/`e2e` =
skipped, `envoy-api-parity`/`proxy-pin` = success, and the required `ci` = success.
`ci.yaml` has no `workflow_dispatch` trigger, so there is no way to force that
run from the Actions tab.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit 75dd262 into main Sep 16, 2026
20 checks passed
@bpalermo
bpalermo deleted the ci/772-control-plane-filter branch September 16, 2026 01:19
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