Repository navigation
Remove duplicate subprocess option handling - #1585
Conversation
Architecture-Review: unchanged; subprocess I/O and environment semantics stay the same. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 54c88e15fe11996e30141eab4a84d35cd87bde5c, 10.2s: 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.
| stderr=subprocess.STDOUT if merge_output else subprocess.PIPE, | ||
| text=not preserve_newlines, | ||
| encoding=None if preserve_newlines else encoding, | ||
| errors=None if preserve_newlines else "replace", |
There was a problem hiding this comment.
suggestion: Text vs. bytes mode now depends implicitly on the errors argument
The change doesn't alter behavior. Popen turns on text mode when encoding, errors, text or universal_newlines is set. In the default path, errors="replace" is always set, even when encoding is None, so stdout and stderr are still decoded with universal newlines. In the preserve_newlines path, all three are None, so the pipes stay in bytes mode and the decode at lines 167-170 still runs. The risk is for future edits: the mode choice now depends on a side effect of errors. If someone later drops errors="replace" or passes it in both branches, the mode would quietly flip. That would return bytes where str is expected, or translate CRLF in raw mode. Smallest fix, with no line cost: add a short comment on line 141 saying errors also selects text mode. A regression test that asserts the decoded-mode CRLF→LF translation would also catch it.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Remove duplicate subprocess option handling
Context and goal
Refs #575
Acceptance
Notes
Base
main @ 2a11772
Base: 2a11772
Focused validation
Validation
Recorded for
54c88e15fe11uv 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 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review