Skip to content

feat(ci): run the org's own code-quality suite on this repo (backend#1603) - #171

Merged
LukasWodka merged 2 commits into
developfrom
feat/1603-code-quality-caller
Aug 6, 2026
Merged

feat(ci): run the org's own code-quality suite on this repo (backend#1603)#171
LukasWodka merged 2 commits into
developfrom
feat/1603-code-quality-caller

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closes backend#1603.

The gap

tracebloc/.github publishes code-quality.yml — including the action-pins job from #159 — to all 19 other repos, and never ran it on itself. Its only repo-local CI is actionlint.yml, whose own header scopes it: "Repo-local CI for this repo's OWN workflow files." actionlint type-checks expressions, validates needs:/uses: wiring and shellchecks every run: 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/checkout from its pinned commit SHA to the mutable @v4 tag, in advance-deploy-env.yml: the most-consumed reusable workflow in the org, running with PROJECTS_KANBAN_TOKEN in scope. action-pins exists 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

checkmeasured on develop before writing this
action-pins24 uses: refs across 23 workflows, zero violations
shellcheck --severity=errorclean over both shell scripts
house-rules.sh"no findings across 2 file(s)"
ruff, gitleaksnot runnable locally — this PR is their first honest look

So soft-fail: false from 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: false is 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 @main and inherits whatever refs they pin.

Two decisions recorded in the file

  1. actionlint.yml stays separate. The 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. Folding them would force one posture on both. #1603 asked for this to be a decision rather than an accident.
  2. No 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 trap actionlint.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 later secrets.X reference 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.yml so this repo finally runs the same code-quality.yml reusable workflow it publishes to the rest of the org (closes backend#1603). actionlint stays 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_dispatch with an optional whole-repo all-files scan. It calls tracebloc/.github/.github/workflows/code-quality.yml@main with python: true, shell: true, and soft-fail: false so shellcheck, house-rules, ruff, and gitleaks run as hard gates from day one. action-pins inputs are deliberately omitted until the six-job callee is on main, because unknown inputs cause a startup_failure on @main callers.

Concurrency cancels in-flight runs; permissions are contents: read only, with no secrets: inherit and no paths: 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.

…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.
@LukasWodka
LukasWodka merged commit 7316f8a into developAug 6, 2026
7 of 9 checks passed
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.
@LukasWodka
LukasWodka deleted the feat/1603-code-quality-caller branch August 14, 2026 13:53
Sign up for freeto 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

@LukasWodka