Skip to content

Document delivery exit codes and status semantics - #1572

Merged
mergify[bot] merged 1 commit into
mainfrom
lean178/1552-delivery-exit-codes
Nov 26, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
lean178/1552-delivery-exit-codes

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Document delivery exit codes and status semantics

Context and goal

  • Context: The CLI behavior was verified in the docs audit.
  • Problem: Existing guidance differs from the current CLI.
  • Goal: The failure summary records the reviewer and interrupt exit codes, and the README distinguishes status success from readiness.

Closes #1552

Acceptance

  • The failure summary records the reviewer and interrupt exit codes, and the README distinguishes status success from readiness.

Validation

Recorded for 6478724acb0d

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 6478724, approve

Architecture-Review: unchanged; the documented behavior matches the current CLI without changing the delivery interface.
Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

loopzero primary review by claude on 6478724acb0dc09bbf72820e2ca80c8ee2c42dbe, 30.8s: approve (0 critical, 0 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)

Native Claude output is retained in the restricted local review receipt.

Comment thread core/CONTRACT.md
operator-facing code wraps an error. Stop on terminal failures or quota errors.
Exit 3 means waiting: rerun the bounded waiter. Exit 5 means changes requested,
not a crash.
Exit 3 means waiting or timeout. Review exits 4 when independent review is

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Exit 3 line no longer tells the agent what to do next

I checked the new exit-code text against src/loopzero/cli.py and it is accurate. Exit 3 is used for ready/merge waits and timeouts (lines 1192–1210 and 1601–1631). Exit 4 comes from IndependentReviewerUnavailable (line 1837). Exit 5 means request_changes (line 884). Exit 130 is returned on KeyboardInterrupt (line 1847).

The problem is the wording that was dropped. The old text said "Exit 3 means waiting: rerun the bounded waiter" and "Exit 5 means changes requested, not a crash." The new text only says what each code means, not what to do. This paragraph is the agents' failure-handling guidance, so an agent that gets exit 3 or 5 no longer has a next step here. Line 46 does say to rerun the last --wait on resume, but only in the start/resume context. Exit 4 also gets no next step.

Smallest fix: put the actions back without losing the new facts, e.g. "Exit 3 means waiting or timeout: rerun the bounded waiter. Review exits 4 when independent review is unavailable and 5 when changes are requested (a verdict, not a crash). Interruption exits 130."

Comment thread README.md
`loopzero status` prints where the current branch is in that sequence. It
requires authenticated access to the configured GitHub repository even before
a PR exists.
`loopzero status` reports the branch stage and can exit 0 with `ready: no`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Status line drops 'configured repository' and doesn't mention the no-PR case

The new README wording is accurate: cmd_status always returns 0 after printing ready: yes/no (cli.py:1720–1725). It also returns 0 when the branch has no PR yet (line 1710), which the new sentence doesn't mention.

The rewrite also changed "authenticated access to the configured GitHub repository" to "authenticated GitHub access". The old wording was more precise: the account needs access to config.repo, not just any GitHub login.

Optional fix: keep "to the configured repository", and if you want, add "status exits 0 unless it errors; only ready and merge gate on readiness" to make the difference between status and readiness explicit.

@eowca
eowca marked this pull request as ready for review November 26, 2026 07:10
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as abacea4 at 07:22 UTC

11 min in the queue, 4 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 07:11 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1623
  • ✅ Merged 07:22 · abacea4 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit abacea4 into main Nov 26, 2026
18 checks passed
@eowca
eowca deleted the lean178/1552-delivery-exit-codes branch November 26, 2026 07:22
@mergify mergify Bot removed the queued label Nov 26, 2026
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.

Distinguish status success and review failures from delivery verdicts

1 participant