Repository navigation
Deduplicate review and check internals - #1512
Conversation
Architecture-Review: unchanged; existing subprocess, sandbox and candidate checks preserve their interfaces, trust boundaries and receipt formats. Co-Authored-By: Codex <noreply@openai.com>
1291c1d to
e00eec6
Compare
There was a problem hiding this comment.
loopzero primary review by claude on e00eec6fc4b823fed911b0294beb590f60fc3659, 39.8s: request_changes (0 critical, 1 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.
| _AUTH_FAILURE = re.compile( | ||
| r"not logged in|please run /login|please (?:run )?`?codex login`?|invalid api key" | ||
| r"|authentication[_ ]error|OAuth access token has expired|Failed to authenticate|token expired" | ||
| r"|\b401\b.*unauthori[sz]ed|login required|not authenticated|missing credentials", re.IGNORECASE, |
There was a problem hiding this comment.
important: Merged auth regex drops the 'unauthorized … 401' alternative
The old _AUTH_PATTERNS matched \b401\b.*unauthori[sz]ed|unauthori[sz]ed.*\b401\b. The merged _AUTH_FAILURE regex only keeps \b401\b.*unauthori[sz]ed. Provider output where the word comes before the status code, such as Unauthorized (401) or HTTP error: unauthorized, status 401, no longer counts as an auth failure in _looks_like_auth_failure. It falls through to the generic bad-output or failure path instead of the auth diagnostic. That changes CLI behavior and diagnostics, which the task says must stay the same. The existing test at tests/test_runners.py:758 only covers 401 Unauthorized, which is why this passes. Fix: add |unauthori[sz]ed.*\b401\b back into the alternation, and add a parametrized case such as Unauthorized (401).
| repository=repository, | ||
| expected_identity=expected_identity, | ||
| ) | ||
| def recheck_candidate(message: str = "GitHub candidate lookup returned an invalid payload") -> None: |
There was a problem hiding this comment.
suggestion: Nested recheck_candidate has no blank line before it and a loose message parameter
def recheck_candidate(message=...) comes straight after the candidate_path assignment with no blank line, and its message changes between call sites (the default versus "Invalid candidate lookup"). The behavior is the same as before, but splitting one diagnostic across a default argument is easy to get wrong in later edits. Consider adding a blank line before the def, and either use one message everywhere if the tests allow it, or pass the message explicitly at every call site.
Architecture-Review: unchanged; the original provider authentication diagnostics remain intact. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 4c95f3b58b27379e449d7fcf5407823d2d756e22, 13.9s: 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 test for the
unauthorized … 401ordering this commit restores — This commit puts back theunauthori[sz]ed.*\b401\balternative. A deduplication pass dropped it once without anything failing, becausetest_auth_phrases_only_fail_on_nonzero_exitonly checks"401 Unauthorized". If it gets dropped again, a codex stderr such asUnauthorized (HTTP 401)would no longer count as an auth failure. It would show up as a generic runner error, notRunnerAuthFailed. Smallest fix: add("codex", "Unauthorized: HTTP 401")to that parametrize list. The other changes in this diff are safe: movinglogin requireddoesn't change what the regex matches, and the line count stays the same, so the net-reduction target isn't affected.
Native Claude output is retained in the restricted local review receipt.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Context and goal
Free 150 source lines for the Lean178 landing wave. Share repeated candidate lookups, review receipt validation and sandbox setup while preserving existing CLI behavior and diagnostics.
Refs #575
Acceptance
src/loopzero.The architecture guide still describes the delivery interfaces, trust boundaries and receipt formats.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review
Validation
Recorded for
4c95f3b58b27uv 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 0