[bug] Match GitHub required-check conclusions for skipped, neutral, and startup failure
Summary
DeployBot's check-state reducer does not match GitHub's required-status-check semantics. It only treats SUCCESS as passing, treats every other non-failure as pending, and does not include STARTUP_FAILURE in its failure set.
GitHub's required-check documentation says successful required check statuses are success, skipped, and neutral. GitHub's GraphQL schema also exposes STARTUP_FAILURE as a check conclusion, which is a terminal failure state, not an in-progress state.
Evidence
Impact
Pull requests can be stuck forever when a required GitHub check legitimately completes as skipped or neutral. Conversely, a check run that ends with STARTUP_FAILURE is reported as pending, which hides a terminal failure and produces misleading queue status.
This makes DeployBot disagree with GitHub's own mergeability model, so the queue can either wait unnecessarily or fail late with unclear diagnostics.
Proposed fix
- Treat
SUCCESS, SKIPPED, and NEUTRAL as passing terminal states for required-check evaluation.
- Add
STARTUP_FAILURE to the terminal failed-state set.
- Add regression coverage for:
SKIPPED required check is passed.
NEUTRAL required check is passed.
STARTUP_FAILURE required check is failed.
- Update the existing skipped-check test that currently encodes the wrong behavior.
Verification
python3 -m pytest tests/test_cli.py -q
python3 -m pytest -q
[bug] Match GitHub required-check conclusions for skipped, neutral, and startup failure
Summary
DeployBot's check-state reducer does not match GitHub's required-status-check semantics. It only treats
SUCCESSas passing, treats every other non-failure as pending, and does not includeSTARTUP_FAILUREin its failure set.GitHub's required-check documentation says successful required check statuses are
success,skipped, andneutral. GitHub's GraphQL schema also exposesSTARTUP_FAILUREas a check conclusion, which is a terminal failure state, not an in-progress state.Evidence
FAILED_CHECK_STATESwithoutSTARTUP_FAILUREinsrc/agent_merge_queue/cli.pylines 77-84.check_states()returnspassedonly forSUCCESS,failedonly forFAILED_CHECK_STATES, andpendingfor everything else insrc/agent_merge_queue/cli.pylines 154-162.tests/test_cli.pylines 144-151 asserts aSKIPPEDrequired check remainspending.success,skipped, andneutral" in https://github.com/github/docs/blob/main/content/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks.md.NEUTRAL,SKIPPED,STARTUP_FAILURE,SUCCESS, andTIMED_OUTinCheckConclusionStatein https://github.com/github/docs/blob/main/src/graphql/data/fpt/schema.docs.graphql.Impact
Pull requests can be stuck forever when a required GitHub check legitimately completes as
skippedorneutral. Conversely, a check run that ends withSTARTUP_FAILUREis reported aspending, which hides a terminal failure and produces misleading queue status.This makes DeployBot disagree with GitHub's own mergeability model, so the queue can either wait unnecessarily or fail late with unclear diagnostics.
Proposed fix
SUCCESS,SKIPPED, andNEUTRALas passing terminal states for required-check evaluation.STARTUP_FAILUREto the terminal failed-state set.SKIPPEDrequired check ispassed.NEUTRALrequired check ispassed.STARTUP_FAILURErequired check isfailed.Verification
python3 -m pytest tests/test_cli.py -qpython3 -m pytest -q