ci(audit-force-merge): align REQUIRED_CHECKS_JSON with branch protection #3037
Reference in New Issue
Block a user
Delete Branch "fix/audit-force-merge-required-checks-drift"
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 #1207.
Adds the three contexts present in
mainbranch protection but missing from.gitea/workflows/audit-force-merge.ymlREQUIRED_CHECKS_JSON:E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request)Secret scan / Scan diff for credential-shaped strings (pull_request)template-delivery-e2e / Template-asset delivery (fresh seo-agent — config+prompts via asset channel, seo-all via plugin reconcile) (pull_request)This closes the F3 drift gap so the audit emitter correctly evaluates force-merges against the real required-check set.
Validation
python3 -c "import yaml; yaml.safe_load(open(".gitea/workflows/audit-force-merge.yml"))"passes.python3 -m pytest .gitea/scripts/tests/test_ci_required_drift.pypasses locally (23/23).SOP Checklist
Comprehensive testing performed
Local-postgres E2E run
N/A: workflow-only config change, no DB surface.
Staging-smoke verified or pending
N/A: workflow-only config change; force-merge audit path is exercised on every future merge.
Root-cause not symptom
#1207 detected that
audit-force-merge.ymlREQUIRED_CHECKS_JSON drifted from branch protectionstatus_check_contexts, so real force-merges could be missed. Align the two lists.Five-Axis review walked
No backwards-compat shim / dead code added
Yes. No shim; only adds missing required contexts.
Memory consulted
reference_obs_stack_phase1(audit-force-merge emits to runner stdout/Loki).Fixes #1207
APPROVED after independent 5-axis review.
Correctness:
audit-force-mergenow includes the current main-branch protection contexts beyondCI / all-required, E2E API smoke, and handlers Postgres: peer visibility, secret scan, and template delivery. Robustness/security: this reduces force-merge audit blind spots rather than weakening checks. Performance: static JSON env expansion only. Readability: small, explicit list alignment.APPROVED. 5-axis review on head
cf25a86c.Correctness: audit-force-merge REQUIRED_CHECKS_JSON now includes the three branch-protection contexts called out in #1207: peer visibility, secret scan, and template-delivery-e2e. The change is workflow/config-only and aligns the audit emitter with the real required-check set.
Robustness/security/performance: no runtime application path or credentials touched; this reduces audit blind spots for force-merge evaluation. Performance impact is negligible. Readability is acceptable and the JSON block remains parseable. CI / all-required is green, including workflow lint/drift checks.