test(gate-check): explicit missing/pending required-context fail-closed coverage (#2403 CR2+Researcher) #2423
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?
CR2 + Researcher follow-up: adds four signal_6 tests proving the uniform gate is fail-closed on absent/pending required contexts.
Fixes #2403
1. gitea-merge-queue.py::enumerate_readiness: - Merge GOVERNANCE_REQUIRED_CONTEXTS with BP required_contexts. - Previously enumerate_readiness omitted qa-review/security-review/sop-checklist, so readiness reports did not enforce the uniform gate. 2. gate_check.py::signal_6_ci: - Add GOVERNANCE_REQUIRED_CONTEXTS hardcoded list. - Merge with branch-protection required checks so governance checks block even when BP does not enumerate them. 3. test_gitea_merge_queue.py: - Add test_non_required_red_does_not_block_merge (flipped): asserts qa/security/sop failing blocks merge (force=False). 4. test_gate_check.py: - Add test_signal_6_governance_checks_always_required_even_when_bp_empty: proves governance checks are evaluated when BP required list is empty. All 85 affected tests pass (71 merge-queue + 14 gate-check). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>APPROVED: gate follow-up is fail-closed and clean. The merge queue and gate-check paths now append governance-required contexts even when branch protection omits them, the tests assert governance red/pending blocks force-merge, and the review-event guard removal remains safe because review-check.sh evaluates real APPROVE state via API while preserving base-ref execution and token separation. No tier reintroduction or gate weakening found. BP-required contexts are green on current head.
2nd-axis review on current head
c7dbd6c3e4: APPROVED. Gate-sensitive diff tightens rather than weakens: merge-queue readiness enumeration and gate-check signal 6 include uniform governance contexts in addition to branch-protection contexts, so missing/pending/failing governance checks are not ready-by-absence. Tests cover missing, pending, failing, and all-green required contexts plus queue blocking when governance checks are red. Workflow updates keep evaluator/read token separate from status-post token and remove the unreliable Gitea review.state guard while relying on review-check.sh API evaluation. No auth loosening or merge-control weakening found. BP-required contexts are present+success and PR is mergeable; current combined red is the expected governance fail-closed signal, not BP failure.