fix(ci): two checks that are wrong on a release PR - #347
Merged
Conversation
added 2 commits
August 1, 2026 17:57
docker-scan was gated on `schedule || push to main`, so it never ran on a PR into main. Two consequences. The one that shows: code scanning compares a PR against the configurations present on the base branch, and main expects a Trivy analysis from this job. With the job skipped, every release PR reported "1 configuration present on refs/heads/main was not found" and the Trivy check went red — on ui#345 among others. The one that matters: the container image was only ever scanned after it had been pushed to main, which for this repo means after the tag that publishes it. For a security product that is the wrong order. The job builds the image itself (push: false, load: true) rather than pulling a published one, so there is nothing stopping it running while the release is still reviewable — it just was not asked to. Costs one extra image build per release PR, which is a handful per year.
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.
Two CI checks fail on a
develop → mainrelease PR for reasons that havenothing to do with the release. Both were red on ui#345.
1. The palette gate flags a month of already-gated code
The gate I added in ui#340 turned Quality Checks red on ui#345:
None of those lines are in that PR. The gate diffs against the PR's base:
developmainmainis v0.3.0 from 2026-07-03 anddevelopis 140 commits ahead, so the gatereported a month of other people's styling as if the release author had just
typed it. It would do that on every release, forever.
Why skipping is right here, not a cop-out. Every line in a release range
already passed this gate on its way into
develop. Re-checking them at releasetime is double jeopardy, and it is unactionable — the person cutting the release
cannot go fix a month of someone else's styling, so the only move available is
to override the check. A gate that always has to be overridden has stopped
meaning anything, and the next genuinely-red check on a release PR gets
overridden with it.
This is a different thing from the failure the script already guards against a
few lines below. That one — unresolvable base ref,
exit 0— hides a brokengate, which is why ui#340 made it fail loudly in CI. This one declares a scope
out loud, on stdout, every time it applies.
Verified, all four paths
origin/main, violation present in the rangeorigin/develop, violation committedbg-gray-100×2,text-gray-500×2origin/develop, clean branchCI=1, base cannot be resolvedRow 2 is the one that matters: the gate still does its job on the PRs it was
built for. I checked it by committing a real violation, not by staging one —
git diff base...HEADonly sees commits, and my first attempt reported "noadded source lines" and would have let a broken gate through.
2. The release-candidate image is never scanned
docker-scanwas gated onschedule || push to main, so it never ran on a PRinto main.
The symptom: code scanning compares a PR against the configurations present
on the base branch, and
mainexpects a Trivy analysis from this job. With thejob skipped, every release PR reported
1 configuration present on refs/heads/main was not foundand the Trivy check went red.The part that actually matters: the container image was only ever scanned
after it reached main — which for this repo means after the tag that publishes
it. For a security product that is the wrong order. The job builds the image
itself (
push: false, load: true) rather than pulling a published one, sonothing stopped it running while the release is still reviewable. It just was
not asked to.
Costs one extra image build per release PR — a handful per year.
apihas the identical condition and the same gap; it is not red there onlybecause
mainhas no recorded Trivy analysis to compare against. Worth the samechange, in its own PR.