feat(2403): remove SOP tier system — single uniform gate (CTO 2026-06-07) #2407
Reference in New Issue
Block a user
Delete Branch "feat/2403-remove-sop-tier-system"
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?
Fixes #2403.
Complete removal of the SOP tier system per CTO directive 2026-06-07.
What changes
test_no_tier_regression.shgates CI if any tier artifact reappearsTest plan
REQUEST_CHANGES on #2407 current head
0337468a. Blocker: the tier artifacts are removed and the anti-regression test is real, but the new uniform gate is not fail-closed for qa/security/sop. .gitea/scripts/gitea-merge-queue.py still documents and implements qa-review/security-review/sop-checklist as NON-required governance reds when branch protection does not require them, and test_gitea_merge_queue.py::test_non_required_red_does_not_block_merge explicitly asserts a PR is ready/force-mergeable with qa-review=failure, security-review=pending, and sop-checklist=failure as long as CI is green. That is the exact bypass this PR is supposed to remove: all PRs must require qa-review + security-review + sop-checklist + CI/all-required + 2-genuine, not only BP-required contexts.Checks performed: (1) deleted sop-tier-check/sop-tier-refire workflows/scripts/tests are gone; active gate_check.py has no TIER_AGENTS/_get_pr_tier and merge queue has no _is_tier_low_pending_ok. Grep only finds expected anti-regression literals plus a historical runbook mention. (2) FAIL: uniform gate is weakened/incomplete as above. (3) PASS: test_no_tier_regression.sh passes clean and fails under a deliberate _get_pr_tier mutation. (4) CI/BP code contexts are green; legacy sop-tier-check failure is the expected bootstrap catch-22 and not the blocker.
REQUEST_CHANGES on #2407 @0337468a. Complete tier-file removal is mostly there and CI/BP contexts are green, but the new uniform gate is not fail-closed yet.
Blocker:
.gitea/scripts/gitea-merge-queue.pystill treats qa-review/security-review/sop-checklist as non-required governance reds when branch protection does not require them, andtest_gitea_merge_queue.py::test_non_required_red_does_not_block_mergeexplicitly asserts merge-ready with qa-review=failure, security-review=pending, and sop-checklist=failure as long as BP-required CI is green. That is ready-by-advisory-failure for exactly the checks this PR is meant to make uniform-required.Additional concern:
tools/gate-check-v3/gate_check.py::signal_6_cirecords non-success required contexts aspassing_required (...pending)and only blocks onfailing_requiredor combinedci_state == pending; this needs explicit fail-closed coverage for missing/pending required contexts, not absence-of-red.Per points: (1) tier artifacts/scripts/workflows deleted; active gate code has no TIER_AGENTS/_get_pr_tier/_is_tier_low_pending_ok, aside from stale comments/secret names. (2) FAIL: uniform qa+security+checklist+CI+2-genuine enforcement is incomplete. (3) anti-tier regression test is real for targeted symbols/files, but it does not cover this uniform-gate bypass. (4) BP CI green; legacy sop-tier catch-22 is not the blocker.
APPROVED on current head
bdacc3cfa9. (1) gitea-merge-queue.py now injects qa-review, security-review, and sop-checklist into the required context set for every PR; missing/pending/failing blocks before force_merge, so the prior bypass is closed. (2) Tests now assert governance reds block merge while only non-required advisory reds may force-merge. (3) gate_check.py signal_6_ci fail-closes: required failure/pending/missing blocks, only success/neutral passes. (4) Tier-removal is complete except the anti-regression test itself; targeted tests pass (66 merge-queue tests + no-tier script), and mutation probe reintroducing TIER_AGENTS fails the guard. BP/ops CI is green; legacy sop-tier-check self-hold is expected bootstrap catch-22.APPROVE on #2407 @bdacc3cf. Re-reviewed the fail-closed fix after stale RC 9455.
(1) PASS: gitea-merge-queue.py now appends GOVERNANCE_REQUIRED_CONTEXTS (qa-review, security-review, sop-checklist) to the required set for every PR; required_contexts_green blocks missing/pending/failing, and force_merge only bypasses non-required advisory reds after those required contexts are green.
(2) PASS: test_non_required_red_does_not_block_merge is replaced by governance-red-blocks behavior; tests assert qa/security/sop failures block, while unrelated advisory reds can still be force-merged only after governance is green.
(3) PASS: gate_check.py signal_6_ci now separates pending_required and returns CI_PENDING for missing/pending required contexts; no passing_required(pending) path remains.
(4) PASS: sop-tier-check/refire workflows/scripts/tests are deleted; active gate code has no TIER_AGENTS/_get_pr_tier/_is_tier_low. Remaining tier strings are explanatory comments or the anti-regression test’s forbidden literals. Mutation/anti-tier test remains intact.
BP-required CI is present+green; legacy sop-tier self-hold is the expected bootstrap catch-22 and not a code blocker.
bdacc3cfa9to3d01368ad3APPROVED on current head
3d01368ad3. Verified fail-closed uniform gate: gitea-merge-queue.py injects qa-review, security-review, and sop-checklist into required contexts for every PR, so missing/pending/failing blocks before force_merge; tests assert governance reds block while only non-required advisory reds may force-merge; gate_check.py signal_6_ci blocks required pending/failing/missing and only passes success/neutral; tier artifacts remain removed except the anti-regression test. Local targeted verification: 66 merge-queue tests passed, no-tier regression script passed, and mutation probe reintroducing TIER_AGENTS failed the guard.APPROVE: verified current head
3d01368a. Uniform gate is fail-closed: merge queue appends qa-review/security-review/sop-checklist to required contexts and blocks before force_merge when any are missing/pending/failing; tests now assert governance reds block; gate_check signal_6_ci separates pending_required and only clears explicit success/neutral required contexts; tier artifacts are removed with anti-regression test intact. No gate weakening found.