Skip to content

Consolidate GitHub response parsing and Mergify retries - #1917

Merged
mergify[bot] merged 2 commits into
mainfrom
lean178/575-github-mergify-cut
Nov 26, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
lean178/575-github-mergify-cut

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Consolidate GitHub response parsing and Mergify retries

Context and goal

  • Context: The loop-zero source cap limits the changes that can land.
  • Problem: HTTP response parsing repeats its fallback, and the Mergify retry loop splits error classification from handling.
  • Goal: Remove at least 25 counted source lines while preserving behavior and every existing test assertion.

Refs #575

Acceptance

  • Change only the GitHub and Mergify adapters.
  • Preserve request endpoints, retry and pagination limits, validation errors, and evidence handling.
  • Keep every test file unchanged.

Base

Base: 48edeec

Validation

Recorded for 948962613029

  • 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

(filled by loopzero check)

Review

(filled by loopzero review)


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

  • primary, claude, 9489626, approve

Focused proof

eowca and others added 2 commits November 26, 2026 14:56
Architecture-Review: unchanged; response validation, pagination bounds, retry budgets, and transport contracts remain intact.
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 9489626130295f792fd966e742cab3bbe5e81cb2, 26.7s: 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.

Comment thread src/loopzero/github.py
else message or body.strip() or stderr.strip().removeprefix("gh:").strip())
message = " ".join(_redact_tokens(message, token).split())[:400] or "no response message"
path = (args[1] if len(args) > 1 else "").split("?", 1)[0]
if "://" in path:

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: Inlining _api_path makes _api_error_detail longer to save a few lines

_api_path was a small pure helper with a clear name. Moving its logic into _api_error_detail makes a function that already handles status, request ID, payload decoding and redaction even longer, and the parsing logic loses its name. I checked the behavior and it is unchanged. Nothing else references _api_path, so this does no harm right now. Still, if you later need to parse endpoints anywhere else, this inlined code will tempt someone to copy it. Smallest fix: keep the helper, and save lines elsewhere if the budget allows.

@eowca
eowca marked this pull request as ready for review November 26, 2026 14:21
@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 1351a5c at 14:27 UTC

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

So far

  • ✅ Entered the queue Thu 26 Nov, 14:22 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1932
  • ✅ Merged 14:27 · 1351a5c · 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 1351a5c into main Nov 26, 2026
18 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/575-github-mergify-cut branch November 26, 2026 14:28
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.

1 participant