Kevin

Merge Gate - required checks, and the statuses that lie

What actually stops a merge on main. The set of required checks is queried from branch protection at run time rather than listed in any script, because that set has grown twice. A merge is refused when a check is not green, and separately when the branch truly conflicts. Two ways a reported status misleads a reader: a check that self-skips still reports success in seconds while having tested nothing, and a cancelled job reports failure while having reached no verdict at all.

Merge Gate - required checks, and the statuses that lie (v2026-08-28T202227Z-905c329c98) 2026-08-30 | What actually stops a merge on main. The set of required checks is queried from branch protection at run time rather than listed in any script, because that set has grown twice. A merge is refused when a check is not green, and separately when the branch truly conflicts. Two ways a reported status misleads a reader: a check that self-skips still reports success in seconds while having tested nothing, and a cancelled job reports failure while having reached no verdict at all. 1 - QUERY REQUIRED CHECKS - Fetch required checks from branch protection GET /api/v1/repos/spw1/antigravity/branch_protections/main branch_protections/main status_check_contexts 2 - CHECK PR STATUS - Verify PR status against required checks tools/holon_worker/wait_for_checks.py wait_for_checks.py latest_by_context classify PR statuses PR statuses mergeable: false PR status 3 - MERGE PR - Merge PR if all checks are green tools/holon_worker/merge_safe.py merge_safe.py can_merge_pr merge_pr Gitea API POST /api/v1/repos/spw1/antigravity/pulls/{n}/merge GET /api/v1/repos/spw1/antigravity/pulls?state=open&limit=100 merge decision 1. Fetch required checks 2. Verify PR status 3. Merge PR if green 4. Handle merge conflicts 5. Report merge result 6. Clean up Required checks response { "status_check_contexts": [ "mona CI / lint-and-test (pull_request)", "ticket guard / duplicate-labels (pull_request)", "daemon CI / smoke (pull_request)" ] } PR status response { "context": "mona CI / lint-and-test (pull_request)", "status": "success", "description": "Successful IN 1m22s" } The required checks are dynamically fetched from branch protection to ensure the list is always up-to-date. The merge process handles both required checks and merge conflicts, ensuring a PR can only be merged if all checks are green and there are no conflicts. Legend actor = initiates work · process = code path · store = state on disk · bus = durable queue · dashed = separate process cyan = request flow · pink = state read/write · dashed green = pull / return path · red = refusal As of 2026-08-30 10:19 UTC, from commit 71f2355

Provenance

This drawing is generated, not drawn. It is rebuilt from the source files below, so when they change the picture changes — a diagram here cannot quietly describe a system that no longer works this way.

Owner
Kevin
Slug
merge-gate
Rendered
2026-08-28T202227Z
From commit
905c329c98
Updated
30 Aug 2026, 10:19 UTC
Sources at
71f2355
Watches
5 paths
  • backlog/MERGE_PROTOCOL.md
  • tools/holon_worker/wait_for_checks.py
  • tools/holon_worker/wait_for_run.py
  • tools/holon_worker/merge_safe.py
  • .gitea/workflows/daemon-ci.yml