Repository navigation
Conversation
Architecture-Review: unchanged; stdout escaping preserves the existing resolution and eligibility sequence. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 5c460a3704b6d2ad7a9431f267c054b9e2f074b9, 40.3s: approve (0 critical, 0 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.
| @pytest.mark.parametrize("outcome", ["refreshed", "remaining", "dispatch failed"]) | ||
| def test_resolve_lists_then_replies_and_resolves_one_finding(finding_pr, gh: FakeGh, capsys, outcome) -> None: | ||
| sys.stdout.reconfigure(encoding="ascii" if outcome == "refreshed" else "utf-8", errors="strict") | ||
| finding_pr["comments"]["nodes"][0]["body"] = finding_pr["comments"]["nodes"][0]["body"].replace("Off by one", "Łódź") |
There was a problem hiding this comment.
suggestion: The Unicode path case from the acceptance criteria has no test
The acceptance criteria cover findings with Unicode titles or paths. The test only changes the comment body ("Off by one" -> "Łódź"), so the listing line's f.path (cli.py:1668) never contains non-ASCII text. The fix works on the whole stream, so paths are handled too, but nothing would catch a future change that formats paths differently (for example .encode()/ascii()). Smallest fix with no net test lines: put the same substitution into the fixture's path (e.g. src/a.py -> src/ą.py) and fold it into the existing title expectation string.
| args = parser.parse_args(argv) | ||
| # Preserve output order and escape characters a legacy stream cannot write during resolve. | ||
| if isinstance(sys.stdout, io.TextIOWrapper): | ||
| sys.stdout.reconfigure(line_buffering=True, errors="backslashreplace" if args.command == "resolve" else None) |
There was a problem hiding this comment.
suggestion: The error handler stays set on a shared stdout in later in-process main() calls
For non-resolve commands, errors=None keeps the stream's current handler. A real CLI process calls main() once, so this is harmless there. In tests (and any embedding that calls main() repeatedly on the same sys.stdout), a resolve call leaves backslashreplace in place for every later command. Encoding failures from other commands could then go unnoticed in the same test. This is not a shipped bug. If you want strict isolation, reset to the stream's original handler instead of passing None (for example, capture sys.stdout.errors once). The line is also 117 characters, over the configured 100-character line length; E501 isn't selected, so this is cosmetic.
Complete finding resolution with legacy stdout encodings
Context and goal
Closes #1503
Acceptance
Base
Base: a68ef3b
Notes
Use the CLI's existing stdout configuration to select a display error handler for resolve. This keeps the mutation and dispatch flow as it was. No architecture update is needed because output encoding does not change GitHub or readiness authority.
Validation
(no
loopzero checkrun recorded)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review