Uh oh!
There was an error while loading. Please reload this page.
feat(ci): run the org's own code-quality suite on this repo (backend#1603) - #171
Merged
Conversation
…1603) This repo publishes code-quality.yml -- and its action-pins job -- to all 19 other repos, and was the only repo that never ran it. The exemption was invisible because actionlint.yml looks like coverage: it type-checks every expression, validates needs/uses wiring, and shellchecks every run: block. What it does not do is look at action REFS. So the pinning rule this repo defines was the one rule this repo was not subject to. That is not theoretical. On 2026-08-06 .github#168 -- an otherwise correct fix -- reverted actions/checkout from its pinned commit SHA back to the mutable @v4 tag, in advance-deploy-env.yml, the most-consumed reusable workflow in the org and one that runs with PROJECTS_KANBAN_TOKEN in scope. action-pins exists to fail exactly that diff. It did not run. A human reading the diff caught it, which is the review path D10 was written to stop depending on. Armed from day one rather than soft-failed into a backlog, because the tree was measured first: shellcheck --severity=error clean over both shell scripts, house-rules.sh clean over the same, and 24 `uses:` refs across 23 workflows with zero pin violations. ruff and gitleaks could not be run locally and get their first honest look on this PR; whatever they surface is fixed or baselined here rather than the gate being softened -- the same bargain e2e-test-agent's caller records in its own comment. action-pins-soft-fail is set to false explicitly rather than left to inherit soft-fail. It is the check whose absence let #168 through, and every other repo consumes these workflows at @main and inherits whatever refs they pin, so this repo has a specific duty to enforce it on itself. actionlint.yml stays separate. The two gates have deliberately different postures -- actionlint blocks from day one against a tree cleaned in the same change; code-quality ships soft-fail: true for repos still clearing backlog -- and folding them together would force one posture onto both. No paths: filter, so the check can be made required without leaving workflow-free PRs waiting on a status that never reports. Refs backend#1603, backend#1491 (D10), backend#1276.
First push of this branch produced a startup_failure on the reusable call (run 31086491251): every other check reported normally and `Code quality` never started. Cause: `action-pins` and `action-pins-soft-fail` were added in #159, which is on `develop`; `main` still carries the five-job version of code-quality.yml. Callers must reference @main (Q3), and passing an input the @main callee does not declare fails the entire call before any job runs. Same merge-order trap as the #160 audit red: a change becomes consumable by @main callers when it is PROMOTED, not when it is merged. The other five jobs still run armed, so most of backend#1603 closes now. The arming diff is written verbatim in the file so the follow-up is mechanical once #159 reaches main. Refs backend#1603.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 6, 2026
LukasWodka added a commit
that referenced
this pull request
Aug 6, 2026
…backend#1603 step 2) (#178) The second half of backend#1603. When code-quality-caller.yml landed in #171 it could not arm action-pins: the job and its two inputs were added in #159 and existed on `develop` only, and a caller must reference @main (Q3). Passing an input the @main callee does not declare kills the entire reusable call with a startup_failure - not the one job, the whole call - measured on that branch's first push, run 31086491251. #159 has since promoted, and `main` now carries the six-job version with both inputs. Verified against the @main copy before flipping, rather than assuming the promotion carried what it looks like it carried. Hard-armed rather than left to inherit soft-fail. This is the check whose absence let .github#168 revert actions/checkout from a pinned commit SHA to the mutable @v4 tag with nothing in CI to object - in advance-deploy-env.yml, the most-consumed reusable workflow in the org, running with PROJECTS_KANBAN_TOKEN in scope. Every other repo consumes these workflows at @main and inherits whatever refs they pin, so this repo has a specific duty to enforce the rule it publishes. Re-measured the tree before arming: 24 `uses:` refs across 23 workflows, zero violations. Arming imports no backlog.
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 freeto 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 backend#1603.
The gap
tracebloc/.githubpublishescode-quality.yml— including theaction-pinsjob from #159 — to all 19 other repos, and never ran it on itself. Its only repo-local CI isactionlint.yml, whose own header scopes it: "Repo-local CI for this repo's OWN workflow files." actionlint type-checks expressions, validatesneeds:/uses:wiring and shellchecks everyrun:block — but it does not inspect action refs at all. That is why the exemption was invisible: there was a green check sitting where the missing one should be.It already cost us
#168 — an otherwise correct fix for backend#1600 — reverts
actions/checkoutfrom its pinned commit SHA to the mutable@v4tag, inadvance-deploy-env.yml: the most-consumed reusable workflow in the org, running withPROJECTS_KANBAN_TOKENin scope.action-pinsexists to fail precisely that diff, and it didn't run. A human reading the diff caught it — the review path D10 was written to stop relying on.Armed from day one, because the tree was measured first
developbefore writing thisaction-pinsuses:refs across 23 workflows, zero violationsshellcheck --severity=errorhouse-rules.shruff,gitleaksSo
soft-fail: falsefrom the start. If ruff or gitleaks surfaces anything, it gets fixed or baselined in this PR rather than the gate being softened — the same bargain e2e-test-agent's caller records in its own comment. Expect this PR to be red until that's settled; that's the point of arming before merging.action-pins-soft-fail: falseis set explicitly rather than inherited, because it's the specific check whose absence let #168 through, and because every other repo consumes these workflows at@mainand inherits whatever refs they pin.Two decisions recorded in the file
actionlint.ymlstays separate. The gates have deliberately different postures — actionlint blocks from day one against a tree cleaned in the same change; code-quality shipssoft-fail: truefor repos still clearing backlog. Folding them would force one posture on both. #1603 asked for this to be a decision rather than an accident.paths:filter. A path-filtered job never reports on a PR that touches nothing it watches, and a required check that never reports leaves that PR waiting forever — the trapactionlint.yml's own header warns about. This keeps the check eligible to be made required under #1276.Also no
secrets: inherit, per RFC-BACKEND-1405 Q5 — same-repo caller or not, the rule is about what a latersecrets.Xreference would silently gain.Parent backend#1405.
Note
Low Risk
CI-only change that adds quality gates; may block PRs until ruff/gitleaks findings are fixed or baselined, with no runtime or security logic changes.
Overview
Adds
code-quality-caller.ymlso this repo finally runs the samecode-quality.ymlreusable workflow it publishes to the rest of the org (closes backend#1603).actionlintstays a separate required gate; this caller does not replace it.The new workflow triggers on pull requests (opened/reopened/sync/ready_for_review) and
workflow_dispatchwith an optional whole-repoall-filesscan. It callstracebloc/.github/.github/workflows/code-quality.yml@mainwithpython: true,shell: true, andsoft-fail: falseso shellcheck, house-rules, ruff, and gitleaks run as hard gates from day one.action-pinsinputs are deliberately omitted until the six-job callee is onmain, because unknown inputs cause astartup_failureon@maincallers.Concurrency cancels in-flight runs; permissions are
contents: readonly, with nosecrets: inheritand nopaths:filter so the check can be made required without silent skips.Reviewed by Cursor Bugbot for commit d093a88. Bugbot is set up for automated code reviews on this repo. Configure here.