ADR-3314: Pull-request workflows stay inside the Scorecard check-suite window¶
- Status: Accepted
- Date: 2026-10-14
- Deciders: Lusoris (operator decision vmafx-red-main-20261013-scorecard-plan)
- Tags: ci, scorecard, security, github-actions
Context¶
The required Scorecard PR Gate (scripts/ci/scorecard_gate.py) fails below an aggregate of 8.5. On 2026-10-13 master scored 8.404762 (882.5 of 1050 weighted points), and the SAST check stood at 7 of 10 although CodeQL runs on every pull request.
OpenSSF Scorecard v5.6.0 decides whether a merged pull request was scanned by reading the check suites of its head commit with the GraphQL field checkSuites(first: 30). Every workflow a pull_request event starts is one check suite, and the GitHub Apps that report on a pull request add their own. Master had 31 workflows with a pull_request trigger, so the CodeQL suite of many pull requests sat past the thirtieth entry and Scorecard counted the commit as unscanned.
Several of those workflows exist only to wait for a label (ci: full, autorelease: cut, run-observability-smoke, run-e2e-k8s) and start no job on most pull requests, yet each still creates a check suite. Three others (doxygen-public-api.yml, scorecard-policy.yml, upstream-consumers.yml) are single-lane workflows whose jobs fit an existing workflow.
Decision¶
doxygen-public-api.ymlbecomes a job ofdocs.yml,scorecard-policy.ymla job ofsecurity-scans.yml, andupstream-consumers.ymltheconsumersjob offfmpeg-integration.yml. Each moved job keeps its check name, so the required contexts and the aggregator list are unchanged.ci-escalate.yml,observability-compose.ymlande2e-k8s.ymllose theirpull_requesttrigger and gainworkflow_call. One new workflow,pr-label-lanes.yml, is the only workflow that listens forlabeled; its three jobs call them under the same label, draft and same-repository conditions the callees used. The callees keep their schedule andworkflow_dispatchtriggers.scripts/ci/pr_workflow_budget.pycounts the workflows whoseon:namespull_requestand fails aboveBUDGET = 27, which leaves three suites of the window to CodeQL and the GitHub Apps. It runs as a pre-commit hook and inmake lint-actions; its tests plant one workflow over the budget and an unreadable workflow.
The count falls from 31 to 26. SAST is expected to move from 7 to 8 once the merged pull requests Scorecard samples carry the new layout, about two to three days after this lands; the aggregate then passes 8.5.
Alternatives considered¶
| Option | Pros | Cons | Why not chosen |
|---|---|---|---|
| Do nothing and wait for an upstream Scorecard fix | No CI change | The gate stays red for an unknown time; every new workflow makes it worse | The window is a measured defect in the scanner, and the fix date is not ours |
| Lower the gate threshold or reweight SAST | One-line change | Hides the score drop; the operator ruled the threshold and gate math stay unchanged | Ruled out by the order |
| Fold only the three single-lane workflows | Smaller diff | Leaves 28 workflows, one above the budget, with no room for a new lane | Too close to the window |
| Fold every workflow into a few large ones | Many free suites | Loses per-workflow concurrency, permissions and readable check names; larger blast radius | Disproportionate to the gap |
| Budget of 30 | Matches the window exactly | The app suites count too, so CodeQL can still fall out | Gives no margin |
Consequences¶
- Positive: CodeQL stays inside the window; a new pull-request workflow that would push it out fails locally before review.
- Negative: a new label-gated lane needs a
workflow_callcallee and a job inpr-label-lanes.ymlinstead of its own trigger. - Neutral / follow-ups: the scanner defect itself is reported upstream through the fleet's post review; when Scorecard reads every suite, the budget can be revisited by a superseding ADR.
References¶
- See ADR-0535 for the original allocator design.
- See ADR-0628 for the remote-aware extension.
- ADR-2169 for the label-gated lanes and the fewer-runs policy.
- Source: operator decision
vmafx-red-main-20261013-scorecard-plan(paraphrased): fold the label-gated workflows into one pull-request workflow throughworkflow_calland hold the count with a budget gate that has a planted negative.