feat(github): store born-held checks while a preflighted apply changes the target - #942
Draft
aparajon wants to merge 1 commit into
Draft
feat(github): store born-held checks while a preflighted apply changes the target#942aparajon wants to merge 1 commit into
aparajon wants to merge 1 commit into
Conversation
This was referenced Aug 5, 2026
…s the target Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aparajon
force-pushed
the
armand/check-plan-time-hold
branch
from
August 5, 2026 15:14
bcd6aa4 to
4d42d5f
Compare
aparajon
force-pushed
the
armand/check-preflight-gate
branch
from
August 5, 2026 15:14
aeae2bb to
44166f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters
The preflight fan-out holds every sibling check that exists when an apply starts — but a sibling that pushes a commit (or runs a manual plan) mid-apply gets a fresh plan against the mid-change schema, and a passing verdict from that plan would mint a fresh green check that sidesteps the hold entirely. This closes the last first-party gap in the merge gate: plan-time writes now know when the target is mid-apply. Stack 7/7, on top of #941.
What it does
upsertPlanCheckRecord— the single choke point every plan-time stored-check write funnels through (auto plans, manual plans, and the settle fan-out's re-plans) — consultsHasActivePreflightedApplyOnTargetbefore storing a verdict that would pass. If a preflighted apply is active on the (environment, database type, database) target, the check is stored born held:action_requiredwith the sameapply_in_flight_on_targetblocking reason the preflight fan-out writes, so the aggregate check and its release path are identical to any other hold.schemabot.merge_gate.plan_time_holds_total— a sustained rate with no matching settle re-plans means holds are piling up on a target; check the merge gate processor's logs.How it moves us toward the northstar
With this, every path that can produce a passing check during an apply window is closed at the source: existing checks are held by the preflight fan-out, and new checks are born held. The merge gate on a busy target is now airtight against first-party surfaces — what remains (admin overrides, unprotected branches) is outside the code host's checks and is handled by drift detection and, eventually, merge-time revalidation.
The chain: #867 (storage) → #868 (drive-tail recording) → #866 (settle re-plan processor) → #939 (request kinds + hold storage) → #940 (preflight hold fan-out) → #941 (apply-start gate) → this PR (plan-time holds). Merges bottom-up; each PR retargets to
mainas its base merges.🤖 Generated with Claude Code