Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on a85af29f6296179d09194564c261708fceafa437, 35.7s: 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.
| os.write(2, b"\\nlast available diagnostic\\n") | ||
| signal.pause() | ||
| """]) | ||
| result = sandbox._run_one(make_config(), git_repo, [], command, 1) |
There was a problem hiding this comment.
suggestion: Real-timeout test depends on the child writing its output within 1s
test_local_stage_timeout_retains_drained_output runs a real Python child under prlimit with a 1s timeout. It asserts that the tail ends with the diagnostic and is exactly 16 KiB. On a loaded CI host, interpreter startup can take longer than 1s. The child is then killed before it writes anything, the tail is just the timeout marker, and both assertions fail. This is a test flake, not a product defect. Smallest fix: have the child print a ready marker after its writes, and wait for it before the deadline matters. Alternatively, raise the timeout to a few seconds; signal.pause() keeps the test deterministic either way.
| return env | ||
|
|
||
|
|
||
| def _read_output_tail(proc: subprocess.Popen[str], limit: int, timeout: float) -> str: |
There was a problem hiding this comment.
suggestion: Document _read_output_tail's trailing-newline contract next to _check_tail
_read_output_tail holds trailing newlines separately. It drops them on success and keeps them, capped at limit, on timeout. This matches what _check_tail produces from the full text, which does rstrip("\n") and then slices the last 16 KiB. The equivalence depends on the min(limit, ...) cap and on _check_tail running rstrip first, and neither function mentions the other. A one-line docstring saying the result equals text.rstrip('\n')[-limit:] on success and text[-limit:] on timeout would stop the two from drifting apart in a later edit. Non-blocking.
…check-output # Conflicts: # tests/test_sandbox.py
Superseded by #1343, which carries the bounded-capture fix on a fresh base. The conflict-resolution merge on this branch prevented review inheritance and delta review. The replacement PR owns delivery and closure of #1194.
Refs #1194