Repository navigation
Conversation
- Decode JSONL as UTF-8 and publish validated feedback atomically. - Retain parser and Codex diagnostics with the log identity. - Avoid retrying a failed resume that emitted a partial stream. - Cover completed, malformed, and partial synthetic JSONL. Testing: Focused pytest, Ruff, Pyright, bash -n, git diff --check. Risks: Incomplete JSONL now fails closed instead of replacing feedback.
|
Read-only exact-head review of bbde4b4 against upstream main: no P0-P2 behavioral findings. Two P3 findings were identified: codex-review/SKILL.md still described the prior unconditional resume fallback, and a malformed stream after thread.started could report the previous session ID in CODEX_FAILED. Both are corrected in the next local commit; the synthetic failure fixture now verifies the new session identity while preserving prior feedback. This is an author-posted review receipt, not a maintainer approval. Upstream Actions currently reports action_required for this fork PR, so the maintainer-controlled CI gate is pending. |
|
Exact-head independent read-only review receipt for
This is a contributor-posted independent analysis receipt, not a maintainer approval. Upstream Actions run for this head is |
|
This contribution is ready for maintainer review. GitHub Actions run 36267459568 for the exact head is marked action_required because the workflow requires maintainer approval for a forked PR. Could a maintainer approve that run and review the patch when convenient? The synthetic regression, focused tests, and local verification are recorded above; I have not rerun any paid Codex review. |
mikeangstadt
left a comment
There was a problem hiding this comment.
Right fix for the right bug: gating publication on turn.completed and atomically replacing the file is what this needed. Ran it locally on Linux and your unverified CI is fine (ruff clean, pyright 0 errors, 3 passed), so that risk note can come down. Two things inline about the new strictness, neither blocking.
Conflict resolution, plus the review points from closedloop-ai#204: - run_codex_review.sh: keep upstream's per-run codex_stderr and codex_failure_reason, and also append each run's stderr to the retained $LOG_ID.stderr. parse_failure_message now reads the JSONL as UTF-8. - Fresh-session fallback is gated on "no thread.started in the stream" (parse_codex_json.py --thread-id) instead of file size, so a dead thread ID that prints only an error event no longer wedges every retry. - parse_codex_json.py skips blank and non-JSON lines (counted on stderr) instead of failing the whole stream; turn.completed plus an agent message remains the publication gate. An incomplete stream exits 3. - Failure tokens keep upstream's contract: a failed codex run reports "CODEX_FAILED:codex exited with code N: <reason>"; a clean exit with an incomplete stream reports CODEX_EMPTY. Prior feedback is never replaced. - The tools/python fake codex emits turn.completed on success, as codex exec --json does. - README conflicts take upstream's design-inventory text; this PR no longer touches README. Version 1.19.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream released code v1.19.4, so this change moves to v1.19.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Updated to c7d5862: merged upstream Notes on the merge, since upstream changed the same wrapper in the meantime:
Verification on Linux (Ubuntu via WSL, Python 3.14), from a clean clone of c7d5862's tree:
Could a maintainer approve the fork CI run for the new head when convenient? |
|
Beginning a code-review. Please allow time for me to finish before merging the PR |
| @@ -0,0 +1,207 @@ | |||
| """Synthetic end-to-end checks for the plan review JSONL wrapper.""" | |||
There was a problem hiding this comment.
P2: This filename duplicates plugins/code/tools/python/test_run_codex_review.py. Neither test directory is a package, and CI runs uv run pytest plugins/ without an import-mode override, so pytest imports both as test_run_codex_review and stops collection with an import-file-mismatch. Rename this module or move the cases into the existing one, then check collection with both files present; the isolated directory run does not catch this.
Purpose
Fix completed Codex plan reviews whose UTF-8 JSONL contains characters outside the Windows default code page. The existing wrapper can lose the final verdict, truncate feedback, and hide the parser error after the model has already completed.
Tracks pnwgmr-llc/ai-agent-skills#359: https://github.com/pnwgmr-llc/ai-agent-skills/issues/359
Changes
Verification
pytest plugins/code/skills/codex-review/tests -q— 3 passed (Python 3.13).ruff checkon new Python files — passed.pyright --pythonpath <Python 3.13 venv>on new Python files — 0 errors.bash -n plugins/code/skills/codex-review/scripts/run_codex_review.sh— passed.git diff --check— passed.Risk: Medium. The parser now refuses incomplete JSONL and retains prior feedback; synthetic tests cover that failure path. The upstream Actions run requires maintainer approval for fork code, and maintainer review is pending. A local Windows repository-wide run had 1,798 passed, 380 failed, and 3 skipped; many unrelated shell tests resolved
bashto WSL without/bin/bash, and Unix-permission assumptions also failed. The changed codex-review tests all passed. Full upstream Linux CI remains unverified.