Repository navigation
Share the pending mergeability verdict with hosted eligibility - #1759
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on f61c323d413517e44c4fe614f1aec9ae44dc76cf, 62.0s: request_changes (0 critical, 1 important, 2 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Findings without a file location:
- suggestion:
eligibility.main --publishstill reports pending mergeability as failure — SETUP.md:508 documentspython -m loopzero.eligibility ... --publishas a way to publish the same hosted context. That entry point still maps every non-ready result tofailure. Hosted now mapsMERGEABILITY_PENDING(and a missing review) topendinginhosted._source_status, so a temporary UNKNOWN turns the required context red through this path but not throughloopzero.hosted. The two entry points that publish the same context now disagree. Fix: move_source_statusintoeligibilityand use it in bothhosted._runandeligibility.main(return nonzero only onfailure).
Native Claude output is retained in the restricted local review receipt.
| return True | ||
|
|
||
|
|
||
| def _source_status(result: github.Readiness, current: github.PR) -> tuple[str, str]: |
There was a problem hiding this comment.
suggestion: Mergeability re-check is duplicated between evaluate and _source_status
eligibility.evaluate already re-fetches the PR and turns a ready result into (blocker,) when mergeability_blocker(current) is set (eligibility.py:204-208). hosted._run then fetches the PR again and _source_status repeats the same check. The hosted re-fetch is needed for the head-change guard, but having the blocker check in two places invites drift. Consider keeping the mergeability check only in evaluate, so _source_status maps reasons to a state and does not need current.
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 8a9753279a38d12ebfbe6d357706226f10f2ea50, 24.3s: approve (0 critical, 0 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Findings without a file location:
- suggestion: Add a regression test for mergeability settling during candidate attestation — Dropping
mergeablefrom_source_fingerprintlooks right. The snapshot is taken from_lookup_sourcebeforesource_policyruns.hosted.policythen callseligibility.evaluate, and_source_snapshot(eligibility.py:167-174) waits for GitHub's mergeability result. Once that result settles, the field goes from null to true/false, so the recheck at candidate.py:574-578 would always raiseCandidateRaceError("metadata changed") for a source that started out unknown. The policy still checks mergeability on freshpr_viewreads (eligibility.py:204-208), so no check is lost. A conflict that appears after the policy check but before the final recheck goes unnoticed, but the merge-queue candidate would hit that conflict itself. No test in tests/candidate covers this. Smallest fix: add a test where the first source lookup returnsmergeable: nulland the recheck returnsmergeable: trueat the same head, and assert that attestation succeeds. Without it, a future change could put the field back in the fingerprint and nothing would catch it.
Native Claude output is retained in the restricted local review receipt.
|
waits for test headroom after #1663 |
Co-Authored-By: Codex <noreply@openai.com>
…rgeability-verdict
There was a problem hiding this comment.
loopzero delta review by claude on 12d2ec87ebfbdebed81418a8fb5aaaa29709bac8, 24.1s: approve (0 critical, 0 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| ancestor_review=review is not None and review["commit_id"] != head, | ||
| publishers=publishers) | ||
| if snapshot is None and source_fingerprint(github.pr_view(repo, number)) != source_fingerprint(pr): | ||
| current = github.pr_view(repo, number) if snapshot is None else pr |
There was a problem hiding this comment.
suggestion: Snapshot-less recheck uses a conditional assignment that both later guards repeat
current = github.pr_view(...) if snapshot is None else pr is followed by two separate if snapshot is None and ... checks. When a snapshot is supplied, current is never used, so the ternary branch does nothing and the same condition is checked three times. A single if snapshot is None: block that fetches current, compares fingerprints, and then applies mergeability_blocker(current) when result.ready would behave the same and be easier to read. Behaviour is correct as written: hosted callers that pass a snapshot get the same mergeability recheck in _publication_snapshot and _source_status.
…1255-share-mergeability-verdict
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Share the pending mergeability verdict with hosted eligibility
Context and goal
Closes #1255
Acceptance
Base
Base: aa563c2
Notes
Carries forward the common mergeability verdict from #1433. Keep existing hosted publication, outage handling, and candidate guards.
Validation
Recorded for
8e95c45772a8uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review