Repository navigation
Conversation
Refs #1087 Co-Authored-By: Codex <noreply@openai.com>
2fc9fc7 to
fcf003c
Compare
Architecture-Review: unchanged; keeps the upstream Claude payload parser and the private bounded diagnostic Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on bbcb945ebedb962f5ac5caba6a2f821272e1fe17, 41.8s: request_changes (0 critical, 1 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.
| return code, captured.out, captured.err | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("save", [True, False]) |
There was a problem hiding this comment.
important: Change pushes tests over the size-budget cap, so the shared gate fails
scripts/size_budget.sh sets TESTS_CAP=13850. It fails when the test line count is over the cap and has grown against the base. The task notes say the merged head has 13,888 test lines, and this diff adds 37 test lines, so loopzero check/CI fails on this branch. The size-budget check is part of acceptance, so this cannot merge as is. Smallest fix: make the new tests shorter. For example, drop the parametrized save split into one test with two compact assertions. Or fold test_codex_schema_error_keeps_the_rejected_message into the existing strict-schema test. Do not raise the cap without a justification.
| provenance, raw = _codex_provenance(done.stdout, done.stderr, message, home=home) | ||
| if not message.strip(): | ||
| raise RunnerBadOutput("codex: no final message written", _tail(done.stdout + done.stderr)) | ||
| raise RunnerMalformedOutput("codex: no final message written", _tail(done.stdout + done.stderr)) |
There was a problem hiding this comment.
suggestion: Codex runtime diagnostics reclassified as malformed lose their terminal line
codex: no final message written and codex: execution output lacks session/token provenance (line 1090) carry the tail of codex stdout+stderr. That is the runtime event stream, not a rejected review message. These are now RunnerMalformedOutput, so _review_failure keeps only the first line, and the stderr/event excerpt that was shown before is visible only in the private file. The task says runtime diagnostics keep their existing output. If codex exits 0 after a turn/stream failure, the operator loses the inline hint. Smallest fix: keep these two as plain RunnerBadOutput. Reserve RunnerMalformedOutput for payloads the model produced (parse_review, final message not JSON/UTF-8, claude result/envelope parsing).
| return "" | ||
| path = wt / ".loopzero" / f"reviewer-output-{head[:12]}-{kind}.json" | ||
| try: | ||
| path.parent.mkdir(parents=True, exist_ok=True, mode=0o700) |
There was a problem hiding this comment.
suggestion: Diagnostic writer skips the directory hardening that _save_review applies
mkdir(mode=0o700, exist_ok=True) leaves an existing .loopzero/ with its current permissions. _save_review (cli.py:1115-1121) also calls path.parent.chmod(0o700) and refuses a symlinked target. The file itself is created 0o600 by NamedTemporaryFile, so the exposure is small. Still, the two writers to the same private directory now disagree on how they protect it. Smallest fix: move the mkdir+chmod into a shared helper and call it from both _save_review and _save_review_failure_output.
Architecture-Review: unchanged; the existing delivery structure and command roles still apply. Co-Authored-By: Codex <noreply@openai.com>
Keep malformed reviewer output in a private diagnostic file
Context and goal
Closes #1087
Acceptance
Transcript size
The baseline is
234ac2e0. Focused CLI and runner tests passed, including an unwritable diagnostic and the native Codex fixture with malformed review JSON.Notes
Base
Base: aa563c2
Validation
(no
loopzero checkrun recorded)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review