Repository navigation
Show how to act on terminal required-check failures - #1507
Conversation
Architecture-Review: unchanged; Only refusal rendering changes, with the recorded readiness reasons left intact. Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 677c87b4c5592104dccf841e97124c3eccc5ebe1, 45.4s: approve (0 critical, 0 important, 4 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.
| if (separator and check.startswith("required check '") and conclusion not in {"pending", "skipped"} | ||
| and reason not in readiness.waitable_failures): | ||
| yield (f"{reason}. Inspect {pr.url}/checks. Fix reproducible failures before retrying. " | ||
| "Rerun the failed job only for a transient failure. Once green, run `loopzero ready --wait`.") |
There was a problem hiding this comment.
suggestion: Merge refusals tell the builder to run loopzero ready --wait instead of a merge command
Both merge paths use _readiness_messages: cmd_merge (line 1626) and _merge_with_mergify (line 1545). In both, a failed required check ends with "Once green, run loopzero ready --wait". Someone who ran loopzero merge on a non-draft PR wants to merge, and ready --wait only reports readiness. They then have to work out that they still need loopzero merge. The existing hints in _merge_check_hint already say loopzero merge --wait. Smallest fix: give _readiness_messages a next_command parameter (or similar) and pass loopzero merge --wait from both merge callers.
| check, separator, conclusion = reason.rpartition("' is ") | ||
| if (separator and check.startswith("required check '") and conclusion not in {"pending", "skipped"} | ||
| and reason not in readiness.waitable_failures): | ||
| yield (f"{reason}. Inspect {pr.url}/checks. Fix reproducible failures before retrying. " |
There was a problem hiding this comment.
suggestion: The recovery paragraph repeats once per failed check
The four-sentence guidance is added to every failing required check. With two or more terminal failures, ready prints the same paragraph on each not ready: line. Merge refusals join them with "; ", so one error line contains the paragraph several times. Consider adding the per-check URL and guidance once, after all reasons, for example as a single trailing next: line or suffix. That would also fit the ; next: ... style that _merge_check_hint already uses.
|
|
||
| def _readiness_messages(pr: github.PR, readiness: github.Readiness) -> Iterator[str]: | ||
| for reason in readiness.reasons: | ||
| check, separator, conclusion = reason.rpartition("' is ") |
There was a problem hiding this comment.
suggestion: Terminal failures are found by parsing a message string built in another module
_readiness_messages uses rpartition("' is ") and a startswith test to take apart the f"required check '{name}' is {conclusion}" text built at github.py:1309. If someone rewords that text in github.readiness, the guidance silently stops appearing, and no type check catches it. _pending_checks already relies on string matching, but Readiness exposes waitable_failures and stale_verdicts as structured fields. A sturdier fix is a parallel field, for example terminal_failures, computed where the reason is built. _readiness_messages could then check membership instead of parsing text.
| "name": "checks", "status": "completed", "conclusion": "failure", | ||
| "check_suite": {"id": 10}}]) | ||
| code, out, _ = run(capsys, "ready") | ||
| out = out.replace(FAILED_CHECK_HINT, "") |
There was a problem hiding this comment.
suggestion: No test checks that a waitable failure keeps its plain message
Acceptance requires waitable failures to stay unchanged, and the code handles this with reason not in readiness.waitable_failures. The updated tests only cover terminal failures, plus pending and skipped checks through tests that were already there. None renders a final not ready: line, or a merge refusal, for a stale or superseded failure listed in waitable_failures. Add one case, for example a stale verdict without --wait, asserting that the line has no FAILED_CHECK_HINT and that next: loopzero ready --wait or loopzero merge --wait is still printed. Also consider asserting the hint directly in test_ready_not_ready_lists_reasons rather than deleting it with out.replace, which hides where the hint appears.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Show how to act on terminal required-check failures
Context and goal
Closes #1467
Acceptance
Base
Base: 29a3f88
Validation
Recorded for
677c87b4c559uv 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