Skip to content

Fix duplicate required check identity handling#22

Merged
mberman84 merged 1 commit into
Forward-Future:mainfrom
coygeek:droid/issue-17-required-check-identity
Jun 22, 2026
Merged

Fix duplicate required check identity handling#22
mberman84 merged 1 commit into
Forward-Future:mainfrom
coygeek:droid/issue-17-required-check-identity

Conversation

@coygeek

@coygeek coygeek commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve check run vs commit status identity when reducing status-check rollup entries.
  • Aggregate same-name required contexts fail-closed so failed entries block and pending entries wait.
  • Add regression coverage for passing check runs paired with failed or pending same-name commit statuses.

Closes #17

Validation

  • PYTHONPATH=src python3 -m pytest tests/test_cli.py -q
  • PYTHONPATH=src python3 -m pytest -q
  • PYTHONPATH=src python3 -m ruff check src tests
  • PYTHONPATH=src python3 -m unittest discover -s tests -v
  • PYTHONPATH=src python3 -m build
  • autoreview --mode local: clean, no accepted/actionable findings

@mberman84 mberman84 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for a regression against current main's exact-commit fallback. Please normalize check identity consistently across the GraphQL rollup and REST check-run feeds (or let exact data replace the corresponding rollup entry), add coverage for a stale pending rollup plus a successful exact check, and compose this with #21's PASSED_CHECK_STATES. GitHub CI is still action_required; re-request review after updating the head.

Comment thread src/agent_merge_queue/cli.py Outdated
app_slug = app.get("slug") if isinstance(app, dict) else ""
source = str(
app_slug
or check.get("workflowName")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statusCheckRollup CheckRun entries use workflowName, while commit_check_runs() REST entries use app.slug. The exact-check fallback concatenates those feeds, so one CI run becomes two identities: a stale pending rollup plus an exact successful REST run still reduces to pending. Normalize a stable identity across both shapes, or replace the rollup identity with exact data, and add that regression case.

@coygeek
coygeek force-pushed the droid/issue-17-required-check-identity branch from 91d0354 to 4f67689 Compare June 21, 2026 16:28
@coygeek

coygeek commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback in the updated head. The exact-check fallback now treats rollup CheckRun data and REST exact CheckRun data for the same named run as the same CheckRun identity, while still evaluating same-name commit statuses separately as GitHub requires. Added regression coverage for the stale rollup plus exact REST CheckRun case.

Verification: PYTHONPATH=src uv run --with pytest --with ruff python -m pytest tests/test_cli.py -q and uv run --with ruff ruff check src tests both pass.

Aggregate same-name check runs and commit statuses fail-closed after reducing each identity to its latest state so DeployBot does not mark a required context passed while another matching entry is failed or pending.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@mberman84
mberman84 force-pushed the droid/issue-17-required-check-identity branch from 4f67689 to 457fd0a Compare June 22, 2026 14:22

@mberman84 mberman84 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed after rebasing onto #21. The reducer now keeps separate CheckRun/status identities while accepting SUCCESS, SKIPPED, and NEUTRAL only when every retained identity passes. Full suite: 222 passed, 3 skipped, 202 subtests; Ruff clean; structured autoreview clean.

@mberman84
mberman84 merged commit 66ab838 into Forward-Future:main Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Required check names collapse checks and statuses that GitHub requires separately

2 participants