Repository navigation
feat(upstream): hold fork pull requests while an intake candidate lands - #931
Merged
Merged
Conversation
An Intake landing hold commit status, meant to be a required check on main, stays pending on open pull requests while an intake branch runs Fork CI or waits for promotion, and turns green when that finishes. Replaces the manual landing-hold coordination in the intake runbook.
Upstream divergenceBoth sides are compared with upstream at the in-order tip
No upstream file changes how much it differs from upstream. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
Note
While an intake branch runs Fork CI or waits for promotion, open pull requests into
mainget a pendingIntake landing holdstatus. Once it is a required check, they cannot movemainunder the candidate, and auto-merge lands them when the hold lifts. Nobody sets or releases it; each run works it out from workflow runs.Problem
An intake candidate lands by fast-forwarding
mainto the exact SHA Fork CI tested. Any fork pull request that merges while the candidate runs Fork CI or waits for approval makes promotion fail, and the branch has to be rebased, tested and promoted again. #926 removed the manual dispatch, but not this race. The runbook's answer was a manual landing hold: find the agent threads with open PRs, ask the maintainer, message each thread, then message them all again after promotion. It did not cover PRs the maintainer merges, threads started later, or work outside styal.Change
A new Intake landing hold workflow runs
scripts/upstream/landing-hold.ts, which sets theIntake landing holdcommit status on every open pull request intomain:The candidate commit itself gets a success status, so promotion's push still satisfies
main's required checks.The workflow runs on pull request updates, when Fork CI starts or finishes on an intake branch, when a promotion starts or finishes, and on dispatch. Every run recomputes the hold from workflow runs, and all runs share one queue, so a missed event is corrected by the next one and there is no hold to forget. It reads current statuses in one GraphQL query and writes only the ones that changed. Its
pull_request_targetjob checks outmain's script and never pull request code.The runbook's manual landing-hold coordination is replaced by a description of the hold.
Pushes that do not go through a pull request, such as the nightly mobile version bump and Mobile EAS Production, are not held.
Rollout
After merge:
Intake landing hold(source: GitHub Actions) to the Required CI ruleset. Until then the status is informational.Verification
landing-hold.test.tscovers the decision: Fork CI in progress on an intake push holds; Fork CI on pull requests andmaindoes not; a promotion waiting for approval holds; the gap between Fork CI passing and its promotion run appearing holds; a finished promotion releases whether it succeeded, failed or was cancelled; failed Fork CI and old passed runs without a promotion release. All 142scripts/upstreamtests pass and the scripts package typechecks.landing-hold.ts --dry-runagainst this repository read the real Fork CI and promotion runs and open pull requests, found no candidate landing (correct at the time), and listed the 15 open pull requests it would mark success, with their current status read through GraphQL.workflow_runandpull_request_targetrun only frommain's workflow file, so the first real run is the post-merge dispatch, and the first hold is the next intake push.Written by an agent (Claude Code, claude-opus-5-5).