ci(lint): forbid continue-on-error on required-context jobs (SOP#765) #2541
Reference in New Issue
Block a user
Delete Branch "ci/guard-no-coe-on-required"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Static workflow-shape lint making SOP#765 mechanical — forbids
continue-on-error: trueon any job that emits a REQUIRED branch-protection status context (the mc#1982 masking incident).Forbidden shape: a job in
.gitea/workflows/*.ymlthat is BOTHcontinue-on-error: trueAND emits a context in.gitea/required-contexts.txt.Why:
continue-on-error: truerolls a failed step up to a SUCCESS job status (Gitea Quirk #10). On a REQUIRED context that silently converts a real failure into a green gate — continue-on-error on platform-build masked regressions for ~3 weeks before #656 surfaced them.SSOT + drift guard:
.gitea/required-contexts.txtis the checked-in SSOT (CI cannot always read branch_protections; cp returns 403). When DRIFT_BOT_TOKEN is present the lint ALSO live-reads BP and fails if the allowlist has DRIFTED from live BP; a 403/absent token degrades gracefully to allowlist-only. core required set verified 2026-06-10 against live BP: CI / all-required, E2E API Smoke Test, Handlers Postgres Integration — all currently coe=false (clean), live cross-check passes.Fixture-catch proof: 6 pytest cases. Manually verified: injecting continue-on-error:true on all-required -> caught; dropping a BP line from the allowlist -> live drift check fails.
Guard class 3 of the cross-repo CI-bug-class lint set.
Note for reviewers: the lint-no-coe-on-required guard job itself is GREEN. The other red contexts on this PR are not caused by this change:
Ops Scripts Teststriggers only because the PR touches.gitea/scripts/**(path filter), but that job runsunittest discoveroverscripts/+scripts/ops/and a pytest suite under.gitea/scripts/tests— none of which this PR modifies. This guards tests live in top-leveltests/and run in the guards own job (green).Local Provision Lifecycle E2E (stub)is an infra-dependent E2E, unrelated to a static YAML lint.qa-review/security-review/sop-checklistare the standard SOP gate awaiting the requested reviewer + checklist ack.This PR is static analysis only (one new Python lint script + allowlist + workflow + tests).
Skipping — genuine required-context failures plus an unacked core SOP gate. Failing:
Ops Scripts Tests / Ops scripts (unittest),Local Provision Lifecycle E2E (stub)and(real image + MiniMax, advisory), and the SOP statusesqa-review / approved+security-review / approved+sop-checklist / all-items-ackedare red (ceremony not completed). Reviewer-persona GIT approvals do not flip those. Needs the e2e/ops failures resolved and the checklist acked. Not forcing over a red required gate.re-approve rebased head (main merged for #2551 Ops-Scripts fix); change unchanged
re-approve rebased head (main merged for #2551 Ops-Scripts fix); change unchanged