Skip to content

Honor Retry-After on Mergify queue observations - #1563

Closed
eowca wants to merge 30 commits into
mainfrom
lean178/1499-mergify-retry-after
Closed

eowca wants to merge 30 commits into
mainfrom
lean178/1499-mergify-retry-after

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Context and goal

Retry queue observations at most once, honor Retry-After, and skip the retry when its delay exceeds the remaining wait.

Closes #1499. This draft depends on #1560.

Validation

Recorded for fe2382a4cb19

  • 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

Mergify transport and CLI fixtures passed, including persistent throttling and the original wait budget. Source +17 lines, tests +0.


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

Review

  • primary, claude, fe2382a, request_changes

eowca and others added 26 commits November 26, 2026 04:31
Architecture-Review: unchanged; remains fail-closed while trusted evidence is unavailable, with the same status context and publisher.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; remains fail-closed while trusted evidence is unavailable, with the same status context and publisher.
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; evidence and publication failures remain distinguishable within the existing hosted trust boundary.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; transient fetch diagnostics remain inside the existing isolated checkout.
Co-Authored-By: Codex <noreply@openai.com>
…e-observation-retry

# Conflicts:
#	src/loopzero/github.py
#	src/loopzero/hosted.py
#	tests/test_hosted.py
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; hosted eligibility still requires verified Git objects before accepting inherited evidence.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; remains fail-closed while trusted evidence is unavailable, with the same status context and publisher.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; evidence and publication failures remain distinguishable within the existing hosted trust boundary.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; transient fetch diagnostics remain inside the existing isolated checkout.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; hosted eligibility still requires verified Git objects before accepting inherited evidence.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; the evidence outcome changes while the existing retry and wait behavior remains in force until #1502.
Co-Authored-By: Codex <noreply@openai.com>
…safe-observation-retry

# Conflicts:
#	src/loopzero/github.py
#	src/loopzero/hosted.py
#	tests/test_hosted.py
…ervation-retry

# Conflicts:
#	src/loopzero/github.py
#	tests/test_hosted.py
Co-Authored-By: Codex <noreply@openai.com>
@eowca
eowca changed the base branch from lean178/1502-safe-observation-retry to main November 26, 2026 07:40
eowca and others added 3 commits November 26, 2026 09:07
Architecture-Review: unchanged; scoped deadlines are still applied only to reads, and non-idempotent writes keep their original outcomes.
Co-Authored-By: Codex <noreply@openai.com>
…retry-after

# Conflicts:
#	docs/ARCHITECTURE.md
#	src/loopzero/github.py

@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 fe2382a4cb19f5313eb37d8aeaefdf6dbe92fc42, 51.3s: request_changes (0 critical, 2 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.

Comment thread src/loopzero/mergify.py Resolved
Comment thread docs/ARCHITECTURE.md Resolved
Comment thread src/loopzero/mergify.py
except (OSError, ValueError, http.client.IncompleteRead):
detail, transient = "transport or invalid JSON response", True
if not retry or not transient:
raise MergifyError(f"Mergify queue lookup failed with {detail}")

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: Lost exception cause, and a missing blank line before _unmet_conditions

The MergifyError is now raised outside the except block, so the original HTTPError or OSError is no longer chained (from exc was removed). That makes transport failures harder to diagnose. Keep a reference to the caught exception (error = exc) and use raise MergifyError(...) from error, unless the chain was dropped on purpose to keep sensitive data out of diagnostics. If so, add a comment saying that. Separately, the diff removes one of the two blank lines before def _unmet_conditions (PEP 8 / flake8 E302).

Co-Authored-By: Codex <noreply@openai.com>
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.

Honor Retry-After on Mergify queue reads

1 participant