Repository navigation
ci: enforce formatting, and reformat the file that proved it was not - #910
Merged
Merged
Conversation
`make format-check` was red on main. `e2e/multiprotocol.sh` landed in #901 with two-space indentation against shfmt's tabs, CI green, and sat unformatted. The cause is that NO job ran the formatter. ci.yaml had twelve jobs and none of them invoked //:format.check; the only reference to it anywhere in the repo was the Makefile target. So the repo had formatters configured (gofumpt, buildifier, shfmt, buf in bazel/format/BUILD.bazel), a documented `make format-check` in CLAUDE.md, and nothing that made either matter. This is the #853 family again: a check that exists, is documented, and never runs. Its greenness carried no information because it was never capable of turning red. What made it easy to miss is worth recording: the `shell` job DID shellcheck that exact file, and passed. Lint coverage was real; format coverage was absent. A green shell job is not evidence a file was formatted. The new job asserts the SET OF LANGUAGES the formatter ran, not just its exit code. //:format.check prints one "Formatted <language>" line per configured language and exits 0 regardless of how much it inspected, so a language dropped from bazel/format/BUILD.bazel would otherwise leave the job green while checking less than it claims. That is the same tripwire the shell job uses for its empty query. Both arms demonstrated red before being trusted: formatting violation -> ::error::formatting violations — run 'make format' language dropped -> ::error::the formatter never ran for: Shell and green once restored. Closes #906 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
enabled auto-merge (squash)
September 23, 2026 10:13
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.
Closes #906.
The finding
make format-checkwas red onmain.e2e/multiprotocol.shlanded in #901 with two-space indentation against shfmt's tabs, withciandproxyboth green, and sat unformatted.The cause: no job ran the formatter.
ci.yamlhad twelve jobs —changes,diff,chart-version-bump,deps-audit,shell,envoy-api-parity,proxy-pin,test,race,integration,e2e,ci— and none invoked//:format.check. The only reference to it in the entire repo was theMakefiletarget.So the repo had formatters configured in
bazel/format/BUILD.bazel, a documentedmake format-checkin CLAUDE.md, and nothing that made either matter.Why this is the #853 family
A check that exists, is documented, and never runs. Its greenness carried no information because it was never capable of turning red — the same shape as the shellcheck aspect that linted zero files (#853) and the counter whose zero meant nothing because it was unseeded (#882).
One detail worth recording, because it is what made this easy to miss: the
shelljob did shellcheck that exact file, and passed. Lint coverage was real; format coverage was absent. A greenshelljob is not evidence a file was formatted.The job
Modelled on
shell, including its anti-vacuity discipline. It asserts the set of languages the formatter actually ran, not merely the exit code —//:format.checkprints oneFormatted <language>line per configured language and exits 0 regardless of how much it inspected, so a language quietly dropped frombazel/format/BUILD.bazelwould otherwise leave this job green while checking less than it claims.Added to the required
ciaggregate gate.control_planematches**, so it runs on any non-proxy change.Both arms demonstrated red before being trusted
1 — formatting violation (appended an unformatted block to a real script):
2 — anti-vacuity arm (fed the checker's output with Shell removed, exit code still 0, simulating a language dropped from the config):
Restored → green:
The reformat
bazel run //:formattouched exactly one file —e2e/multiprotocol.sh, 28 insertions / 19 deletions, whitespace only. That it is the sole offender is itself mild evidence the tree was otherwise kept clean by hand.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr