Repository navigation
Hold a watch's "checks passed" until every required check has reported - #962
Merged
Merged
Conversation
GitHub creates a job that waits on others only once they finish. Since #941 CI's required platform checks are such jobs, so for minutes at a time the head showed every required check reported so far as passed while macOS arm64 and Windows x64 did not exist yet, and the watch woke the agent mid-run. When the checks read would pass, the GitHub detail read now adds the checks the base branch requires but that have not reported, as pending: those of its rulesets come with the GraphQL detail, those of its branch protection from REST, which any reader may see (GraphQL shows them to admins alone). Core owns the gate both use.
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.
Summary
Since #941, the required checks
Linux x64/macOS arm64/Windows x64are jobs gated onneeds, and GitHub creates them only once their dependencies finish. On #953's head, from 16:59 to 17:04 every required check reported so far had passed whilemacOS arm64andWindows x64did not exist yet. The watch judged "required checks all passed" from the checks it could see, so it woke the agent in the middle of the run (and again as each late check appeared).The required set is read only when the checks seen would pass, because it can only hold that verdict back. A 403 or 404 on the branch read leaves the protected checks unknown, which is the behaviour before this change. GitHub Enterprise Server has no
isRequired, so it is left as it was.Evidence
checks_pass_only_once_every_check_main_requires_has_reported(runtime, via the real sweep and HTTP fixture):Webhas passed whileLinux x64(branch protection) andmacOS arm64(ruleset) have not reported → no wake.Linux x64arrives → still no wake.macOS arm64arrives → one wake,All 3 required checks passed.Linux x64, which the branch protection requires, has not reported.cargo fmt --check,cargo clippy --workspace --all-targets --locked -D warnings,cargo nextest run --workspace --locked: 1284 passed (macOS).baseRef.rules) runs against Embed the preview browser on iOS; require macOS 27, iOS 27 and Windows 11 #953, andbranches/{base}with a%2F-encodeddependabot/...branch resolves. As a non-admin,branches/{base}showscli/cli's andmicrosoft/vscode's required contexts while GraphQLbranchProtectionRuleisnull.Merge Danger
Door: two-way
Blast Radius: PR watch
On github.com, each detail read whose checks would pass costs one more REST request. A required check that never reports on a PR (for example, a path-filtered workflow) now holds back the "passed" wake, which matches GitHub keeping the merge blocked.