Skip to content

Validate managed test reports through supported execution prefixes - #767

Merged
wwind123 merged 6 commits into
mainfrom
codex/prefixed-managed-test-reports
Sep 11, 2026
Merged

Validate managed test reports through supported execution prefixes#767
wwind123 merged 6 commits into
mainfrom
codex/prefixed-managed-test-reports

Conversation

@wwind123

@wwind123 wwind123 commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

Recognize managed test launchers behind supported execution prefixes by reusing the existing command-head traversal, with stricter option handling for the managed-wrapper exemption.

Why

The #761 implementation created PR #766 and passed its final focused and full suites, but its handoff failed on this original report:

env -u AGENT_LOOP_INVOCATION_ID /home/wwind123/.local/bin/agent-loop run-tests --timeout-seconds 1800 --memory-dir /tmp/coding-review-agent-loop/scratch/issue-761-focused-memory-final2 -- python3 -m pytest tests/test_local_test_evidence.py tests/test_protocol.py tests/test_comment_rendering.py tests/test_round_transport.py tests/test_orchestrator_issue.py tests/test_orchestrator_pr.py tests/test_carried_review_context.py tests/test_skill_helpers.py tests/test_test_runtime.py tests/test_containment.py -q

#762 fixed recognition within chained clauses but still assumed only shell assignments could precede the managed launcher. The ordinary parser understood env; managed recognition did not, and classified the installed launcher as an outside-checkout test target.

Changes

  • Use shared prefix traversal for managed recognition, including nested env/timeout, nice, stdbuf, nohup, time -p, and command -p.
  • Require supported options for this exemption. Unknown options, argv-rewriting env -S/xargs, sudo, lookup-only command modes, and cwd-changing env options remain ineligible.
  • Validate prefix executables/environment values, inner test targets, and surrounding clauses. Preserve malformed managed-option, outside-path, and live-URL rejection.
  • Do not treat standalone . or .. path operands as sentence boundaries, which could detach a disallowed prefix from its command.
  • Exercise combinations of launcher styles, prefixes, structured/freeform reports, chains, quoted argument values, and legacy backticked reports, with negative cases.

This complements the open quoted-shell PR #765; it does not include that PR's shell-string expansion and is separate from the local-evidence implementation in PR #766. This remains validation of reported command text, not a shell interpreter or execution sandbox.

Validation

  • Both original saved Reconcile local test failures in coder handoffs #766 test commands validate unchanged with this fix; no test report was rewritten to bypass the guard.
  • Focused guard, runtime, and rendering suites: 538 passed.
  • Full suite: 3,071 passed in 112.54 seconds (PYTHONPATH=src XDG_RUNTIME_DIR=/tmp/prefixed-tests-runtime python3 -m pytest tests/ -q --tb=short). Subprocess tests ran with permission to write their user-cache logs and isolated runtime-lock storage.
  • Temporary combination with Validate quoted shell test commands without false path rejections #765 (d7ae814): 565 focused tests passed, plus 36 explicit nested shell/prefix cases covering structured and backticked reports, sh/bash/zsh, safe inner commands, outside test targets, and live URLs. The branches merge cleanly; the temporary combined tree is not included in this PR.
  • git diff --check: passed.
  • Initial new regressions exposed two env -C ./env --chdir . clause-splitting failures; fixed and included in the passing rerun.

No installed tool files, live agent worktrees, reviewer approvals, or CI results are changed by this PR.

-- OpenAI Codex

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

GitHub checks are passing, but the managed-prefix recognizer can exempt reports whose prefix never executes the managed launcher.

Blocking issues

  • _wrapper_traversal skips assignment-shaped tokens unconditionally at src/coding_review_agent_loop/workdir_guard.py:574. Assignments are transparent before the first command and after env, but not after prefixes such as timeout, nice, stdbuf, nohup, or command. Consequently, a report like timeout 1800 MODE=inline /outside/agent-loop run-tests -- python3 -m pytest tests/test_api.py is recognized as managed and the outside launcher is exempted, even though timeout actually attempts to execute a program named MODE=inline and the managed test command never runs. Track whether the current wrapper is env (or otherwise model operand position) so assignment tokens cannot bridge non-env wrappers, and add rejection coverage for these placements.

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Reviewed the full base-to-head diff in the assigned checkout at 6158355. The managed-launcher exemption now walks a closed allowlist of transparent execution prefixes (env/timeout/nice/stdbuf/nohup/time -p/command -p) via a separate managed option table, and returns False on any unknown option, missing/empty option value, short --opt=value form, or non-listed wrapper, so env -S, env -C/--chdir, sudo, xargs, and command -v/-V cannot grant the exemption. Prefix tokens are still validated as an ordinary structured command and the inner argv still goes through _validate_single_command, so outside paths, cwd changes, and live URL targets in or around the prefix remain rejected; -C/--chdir values keep their working_directory role, so adding --unset/--chdir to the ordinary wrapper option table does not weaken path checks. The clause-splitter exception for the bare '.' and '..' tokens is needed so an 'env --chdir .' prefix is not split away from a following outside launcher, and merging clauses is the stricter direction. Tests cover the accepted prefix matrix across both launcher forms, origins, and clause templates, plus retained path/URL/cwd checks and the rejected prefix forms; docs/local_agent_loop.md documents the supported prefix contract and its explicit exclusions. GitHub PR checks are passing. No blocking findings.

-- Anthropic Claude: claude-opus-5 (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

The changes cleanly recognize supported execution prefixes around managed test reports while preserving strict path and URL validation across prefix arguments and inner invocations. Test coverage and documentation are thorough.

-- Google Antigravity: Gemini 3.8 Flash (High)

@wwind123

Copy link
Copy Markdown
Owner Author

PR review round 1 reconciliation: settled reviewers: Claude, Antigravity, Codex. Finalization continues after reconciliation.

@wwind123

Copy link
Copy Markdown
Owner Author

Coder follow-up

Fixed the managed-prefix assignment handling, committed the change, and pushed commit 466d20a to the existing PR branch.

Addressed items

  • item-1: Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 1: _wrapper_traversal skips assignment-shaped tokens unconditionally at `src/coding_review_agent_l...
    • Resolution: Managed traversal now permits assignment operands only before the initial command or immediately after env; assignments after timeout, nice, stdbuf, nohup, time, and command can no longer bridge to an outside managed launcher. The focused workdir-guard module was selected because it directly covers the changed parser and all reported invalid prefix placements.

Remaining items

  • None.

Tests run

  • python3 -m pytest tests/test_workdir_guard.py -q (agent-loop instrumented; whole-command timeout 1800s)

Test observation receipts

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Re-reviewed at head 466d20a. The round-1 assignment-bridging defect is fixed: _wrapper_traversal now carries an assignments_allowed flag that starts True (leading assignments are transparent before the first command) and is reset to wrapper == "env" after each parsed prefix, so an assignment-shaped operand after timeout, nice, stdbuf, nohup, time, or command is no longer skipped. Such a token then becomes the effective head, parse_managed_test_invocation fails, _validate_managed_command returns False, and the report falls back to ordinary path/URL validation that rejects the outside launcher. The gate is scoped by not managed or assignments_allowed, so ordinary wrapper classification and its other callers are unchanged. env keeps assignment operands, which matches env semantics and preserves the round-1 accepted cases such as MODE=inline /usr/bin/env -u FIRST -u SECOND LABEL='two words' and env --ignore-environment -- MODE=inline. Rejection coverage was added for all six non-env prefixes in test_unsupported_prefix_cannot_grant_managed_exemption. The rest of the diff is unchanged from round 1 and still holds: a closed managed prefix allowlist, prefix tokens validated as an ordinary structured command, inner argv validated normally, and docs/local_agent_loop.md describing the supported prefix contract and its exclusions. GitHub checks are pending (test in_progress) for this head, so I am not asserting a green CI run; review is based on direct inspection of the source and tests. No blocking findings.

Prior unresolved item dispositions

  • [item-1] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 1: _wrapper_traversal skips assignment-shaped tokens unconditionally at `src/coding_review_agent_l... -> resolved

-- Anthropic Claude: claude-opus-5 (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Verified commit 466d20a on head 466d20a. Item-1 is resolved: _wrapper_traversal tracks assignments_allowed (initialized to True for leading assignments and set to wrapper == "env" after each wrapper), ensuring assignment tokens after timeout, nice, stdbuf, nohup, time, or command are not skipped and cannot bridge to an outside managed launcher. Rejection coverage for all six prefixes was added in test_unsupported_prefix_cannot_grant_managed_exemption. External GitHub PR checks are currently pending (test in_progress); approval is based on direct code and test inspection.

Prior unresolved item dispositions

  • [item-1] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 1: _wrapper_traversal skips assignment-shaped tokens unconditionally at `src/coding_review_agent_l... -> resolved

-- Google Antigravity: Gemini 3.8 Flash (High)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

The prior assignment-placement defect is fixed, but managed-prefix recognition still accepts command names that the shell would not execute as the supported wrappers. The GitHub test check is still pending.

Blocking issues

  • _wrapper_traversal identifies managed prefixes through _program_basename at src/coding_review_agent_loop/workdir_guard.py:578, which lowercases the token and strips trailing punctuation. As a result, reports such as ENV -u FIRST /outside/agent-loop run-tests -- python3 -m pytest tests/test_api.py or timeout, 1800 /outside/agent-loop run-tests -- python3 -m pytest tests/test_api.py receive the managed-launcher exemption even though a case-sensitive shell attempts to execute ENV or timeout,, so the claimed managed test command never runs. Managed traversal must compare an exact, case-sensitive executable basename without prose punctuation normalization (while ordinary narrative classification may retain normalization), with rejection tests for uppercase and punctuated pseudo-prefixes.

Prior unresolved item dispositions

  • [item-1] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 1: _wrapper_traversal skips assignment-shaped tokens unconditionally at `src/coding_review_agent_l... -> resolved

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

PR review round 2 reconciliation: settled reviewers: Claude, Antigravity, Codex. Finalization continues after reconciliation.

@wwind123

Copy link
Copy Markdown
Owner Author

Coder follow-up

Implemented and pushed the exact managed-prefix executable fix in commit a9fad6e; the focused workdir-guard test module passes.

Addressed items

  • item-2: Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at `src/coding_revie...
    • Resolution: Managed traversal now compares a literal, case-sensitive executable basename while ordinary narrative classification retains normalization. Added rejection coverage for uppercase, mixed-case, and comma-suffixed pseudo-prefixes. The focused workdir-guard module directly covers the changed traversal and reported exemption bypass.

Remaining items

  • None.

Tests run

  • python3 -m pytest tests/test_workdir_guard.py -q (agent-loop instrumented; whole-command timeout 1800s)

Test observation receipts

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Re-reviewed at head a9fad6e. The round-2 finding is fixed: managed traversal now resolves the prefix executable with the new _executable_basename helper, which takes the literal basename after normalizing backslashes and performs no lowercasing and no trailing-punctuation stripping, while ordinary narrative classification still uses _program_basename. ENV, Timeout, TIME, COMMAND, and comma-suffixed tokens such as env, / timeout, no longer match WRAPPER_PROGRAMS, so traversal stops there, parse_managed_test_invocation fails on that head, _validate_managed_command returns False, and the report falls back to ordinary path/URL validation that rejects the outside launcher. Rejection coverage was added for the uppercase, mixed-case, and punctuated pseudo-prefixes. The switch is gated on managed, so ordinary wrapper classification and its other callers keep their existing prose-tolerant behavior, and the previously accepted prefix set still resolves (for example /usr/bin/env -> env); the backticked-report case still works because backticks are stripped when the code segment is extracted before clause parsing. The earlier assignment-bridging fix and the closed managed prefix allowlist remain intact, and docs/local_agent_loop.md still matches the implemented contract. GitHub checks are pending (test in_progress) for this head, so I am not asserting a green CI run; this review is based on direct inspection of the source and tests. No blocking findings.

Prior unresolved item dispositions

  • [item-2] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at `src/coding_revie... -> resolved

-- Anthropic Claude: claude-opus-5 (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Verified commit a9fad6e on head a9fad6e. Item-2 is resolved: _wrapper_traversal now uses _executable_basename when managed=True, requiring exact case-sensitive wrapper executable basenames without prose punctuation normalization, while ordinary narrative classification preserves historical normalization via _program_basename. Rejection test coverage for uppercase, mixed-case, and punctuated pseudo-prefixes was added to test_unsupported_prefix_cannot_grant_managed_exemption. External GitHub PR checks are currently pending (test in_progress); approval is based on direct code and test inspection.

Prior unresolved item dispositions

  • [item-2] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at `src/coding_revie... -> resolved

-- Google Antigravity: Gemini 3.8 Flash (High)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

The uppercase and punctuation cases are fixed, but item-2 remains blocking because managed-prefix basename recognition is still not literal for POSIX command text. GitHub's test check is still in progress, so no global test-pass claim is made.

Prior unresolved item dispositions

  • [item-2] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at src/coding_revie... -> still blocking: _executable_basenameatsrc/coding_review_agent_loop/workdir_guard.py:507still converts backslashes to/before the managed comparison. On this Unix/POSIX validation path, a report such as'.\env' -u FIRST /outside/agent-loop run-tests -- python3 -m pytest tests/test_api.pyattempts to execute the literal command.\env, not env, but lines 509 and 583 classify it as the supported envprefix. The prefix's relative backslash-containing executable is not inspected by_path_roles, whose path gate at line 767 recognizes only /, /, , or $HOME/starts, so the outside managed launcher still receives the exemption. Make managed-prefix basename extraction follow POSIX executable semantics (do not translate` into a separator here) and add rejection coverage for quoted backslash-containing pseudo-prefixes such as '.\env' and 'foo\timeout'.

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

PR review round 3 reconciliation: settled reviewers: Claude, Antigravity, Codex. Finalization continues after reconciliation.

@wwind123

Copy link
Copy Markdown
Owner Author

Coder follow-up

Implemented and pushed the POSIX managed-prefix basename fix to PR #767 at commit 825f000; the updated PR is ready for reviewer follow-up.

Addressed items

  • item-2: Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at `src/coding_revie...
    • Resolution: Managed-prefix extraction now treats only forward slashes as POSIX path separators, so quoted backslash-containing pseudo-prefixes such as '.\env' and 'foo\timeout' cannot grant the managed-launcher exemption. Added both cases to the focused workdir-guard regression test; this module directly covers the changed parser and reviewer-reported exemption path.

Remaining items

  • None.

Tests run

  • python3 -m pytest tests/test_workdir_guard.py -q (agent-loop instrumented; whole-command timeout 1800s)

Test observation receipts

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Re-reviewed at head 825f000. The carried item is now fixed: _executable_basename no longer translates backslashes into separators and splits on '/' only, which matches POSIX executable semantics for this Unix validation path. A quoted pseudo-prefix such as '.\env' or 'foo\timeout' therefore yields a basename that is not in WRAPPER_PROGRAMS, so managed traversal stops at that token, parse_managed_test_invocation fails on it, _validate_managed_command returns False, and the report falls back to ordinary path validation that rejects the outside launcher because /outside/agent-loop is neither inside the checkout nor a toolchain executable. Both backslash cases were added to the managed-exemption rejection test, and shlex single-quote handling preserves the literal backslash so the parametrization exercises the intended token. Ordinary narrative classification keeps its prose-tolerant _program_basename normalization, and the Windows-path exemption still runs through the non-managed traversal, so nothing else changes. The earlier fixes in this PR remain intact: the closed managed prefix allowlist with per-option validation, assignments allowed only before the first command or after env, exact case-sensitive prefix matching, prefix tokens validated as an ordinary structured command, inner argv validated normally, and docs/local_agent_loop.md matching the implemented contract. GitHub checks are pending (test in_progress) for this head, so I am not asserting a green CI run; this review is based on direct inspection of the source and tests. No blocking findings.

Prior unresolved item dispositions

  • [item-2] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at `src/coding_revie... -> resolved

-- Anthropic Claude: claude-opus-5 (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

The exact case-sensitive POSIX basename fix resolves the carried prefix-spelling issue, but value-taking supported prefixes can still grant the managed-launcher exemption with invalid operands. GitHub's test check is currently pending.

Blocking issues

  • _consume_wrapper_options accepts every non-empty operand for managed value options (src/coding_review_agent_loop/workdir_guard.py:530-550) without validating the operand's wrapper-specific syntax. Consequently, a report such as nice -n bogus /outside/agent-loop run-tests -- python3 -m pytest tests/test_api.py (similarly, timeout --kill-after=bogus 1800 ... or an invalid stdbuf mode) is treated as reaching the managed launcher and exempts its outside path, although the prefix rejects its operand and exits before launching the test command. Validate each supported option's value domain (or conservatively decline the managed exemption when it cannot be established), and add rejection tests for invalid nice, timeout, and stdbuf option operands.

Prior unresolved item dispositions

  • [item-2] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at `src/coding_revie... -> resolved

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Verified commit 825f000 resolves item-2 by adopting POSIX executable basename extraction for managed prefixes without translating backslashes into path separators, ensuring quoted backslash-containing pseudo-prefixes are rejected and cannot grant outside test launcher exemptions. Comprehensive negative test coverage and documentation updates are in place. Note that GitHub PR checks remain pending (test check in progress).

Prior unresolved item dispositions

  • [item-2] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 2: _wrapper_traversal identifies managed prefixes through _program_basename at `src/coding_revie... -> resolved

-- Google Antigravity: Gemini 3.8 Flash (High)

@wwind123

Copy link
Copy Markdown
Owner Author

PR review round 4 reconciliation: settled reviewers: Claude, Antigravity, Codex. Finalization continues after reconciliation.

@wwind123

Copy link
Copy Markdown
Owner Author

Coder follow-up

Validated managed execution-prefix operands, added regression coverage and documentation, committed the fix as 0fbf4ae, and pushed it to the existing PR branch.

Addressed items

  • item-3: Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (`src/coding...
    • Resolution: Added wrapper-specific validation for timeout duration and signal operands, integer nice adjustments, stdbuf buffering modes, and env unset names across separated, attached-short, and long-option forms. Invalid operands now prevent traversal to the outside managed launcher. The focused workdir-guard module was selected because it directly exercises the changed parser and all requested rejection cases.

Remaining items

  • None.

Tests run

  • python3 -m pytest tests/test_workdir_guard.py -q (agent-loop instrumented; whole-command timeout 1800s)

Test observation receipts

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Re-reviewed at head 0fbf4ae. The carried item is fixed: _is_valid_managed_option_value now checks each managed prefix option operand before traversal may continue, and it is applied on all three operand forms (long --opt=value, attached short -kVALUE, and separated value tokens) plus the attached-prefix fallback branch. Domains look right: timeout -k/--kill-after reuses the duration pattern, -s/--signal accepts a valid numeric signal or a SIG-stripped name derived from the signal module, nice requires an optionally signed integer, stdbuf requires a size or L except on the input stream where L is correctly rejected, env unset names must be nonempty and contain no '=', and any option/wrapper pair not covered falls through to False, so the exemption is declined rather than guessed. An invalid operand returns None from _consume_wrapper_options, so the report falls back to ordinary path validation that rejects the outside launcher. The previously accepted prefix matrix still parses (--kill-after=10s, --signal TERM, -k10s, -n 5, --adjustment=5, -oL/-eL, --output=L, -uNAME, --unset=NAME, env assignment operands), and the non-managed branch is unchanged: the reordered i+1 bounds check keeps the same behavior it had for ordinary traversal. Rejection coverage was added for bogus timeout durations and signals, out-of-range numeric signals, non-integer nice adjustments, invalid stdbuf modes, and stdbuf line buffering on input, and docs/local_agent_loop.md now states the operand-syntax requirement. GitHub checks are pending (test in_progress) for this head, so I am not asserting a green CI run; this review is based on direct inspection of the source and tests. No blocking findings.

Prior unresolved item dispositions

  • [item-3] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (`src/coding... -> resolved

-- Anthropic Claude: claude-opus-5 (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Verified commit 0fbf4ae resolves item-3 by strictly validating operand syntax for supported wrapper value options (timeout kill-after durations and signals, integer nice adjustments, stdbuf buffering modes, and env unset variable names) across long, short, separated, and attached forms. Invalid operands conservatively reject managed traversal and deny outside launcher exemptions. Regression tests and documentation in docs/local_agent_loop.md are in place. Note that GitHub PR checks remain pending (test check in progress).

Prior unresolved item dispositions

  • [item-3] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (`src/coding... -> resolved

-- Google Antigravity: Gemini 3.8 Flash (High)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

The focused validation and rejection coverage improve the managed-prefix parser, but item-3 remains open because some values accepted by the new validators are not executable wrapper operands. GitHub's test check is still pending.

Prior unresolved item dispositions

  • [item-3] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (src/coding... -> still blocking: The new validators at src/coding_review_agent_loop/workdir_guard.py:491-539 remain lexical rather than validating the wrappers' full numeric domains: Python \daccepts non-ASCII decimal characters that the command-line parsers do not, and the unbounded integer/size patterns accept values beyond the wrappers' numeric ranges. For example, an enormousnice -ninteger (or a non-ASCII-decimal adjustment) is accepted here, so/outside/agent-loopreceives the managed exemption even thoughnice` rejects the adjustment and never launches it. Tests at tests/test_workdir_guard.py:98-115 cover ordinary malformed strings but not these accepted-invalid numeric operands. Resolve this by using ASCII numeric syntax and range/overflow-aware parsing (or conservatively rejecting values whose executability cannot be established), with rejection tests for out-of-range and non-ASCII values across the affected nice/timeout/stdbuf forms.

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

PR review round 5 reconciliation: settled reviewers: Claude, Antigravity, Codex. Finalization continues after reconciliation.

@wwind123

Copy link
Copy Markdown
Owner Author

Coder follow-up

Implemented and pushed commit 8348680 to PR #767, tightening managed wrapper numeric validation with ASCII-only syntax and conservative overflow bounds.

Addressed items

  • item-3: Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (`src/coding...
    • Resolution: Added range-aware validation for nice adjustments, timeout option and required durations, numeric signals, and scaled stdbuf sizes; added rejection coverage for non-ASCII digits and overflowing separated, attached, and long-option operands. The focused workdir-guard module was selected because it directly exercises the changed parser and reviewer examples.

Remaining items

  • None.

Tests run

  • python3 -m pytest tests/test_workdir_guard.py -q (agent-loop instrumented; whole-command timeout 1800s)
  • python3 -m pytest tests/test_workdir_guard.py -q

Test observation receipts

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Re-reviewed at head 8348680. The carried item is fixed: all managed numeric operand patterns are now ASCII-only ([0-9] with re.ASCII), so non-ASCII decimal digits no longer satisfy the duration, nice, stdbuf, or numeric-signal checks, and each numeric domain is range-bounded before the exemption is granted. nice caps the digit length and rejects values outside signed 32-bit range; timeout durations go through _is_valid_timeout_duration with a 64-character numeric cap and a Decimal conversion in a bounded local context, rejecting non-finite results and anything past signed 64-bit seconds after unit scaling, with InvalidOperation handled; numeric signals are length-capped and checked against signal.valid_signals(); stdbuf sizes are digit-capped and compared against the uint64 ceiling divided by the suffix multiplier. The suffix lookup tables cover every suffix the regexes can produce plus None, so no KeyError is reachable, and the required timeout duration operand in _parse_wrapper now uses the same bounded validator on the managed path while the ordinary path keeps its pattern check; the or chain short-circuits before indexing past the end. Previously accepted prefixes (1800, 1800s, -k10s, --kill-after=10s, -n 5, -oL, --output=L) still validate, and rejection coverage was added for non-ASCII digits and overflowing operands across separated, attached-short, and long-option forms as well as the bare timeout duration. docs/local_agent_loop.md documents the ASCII-digit and conversion-bound requirement. GitHub checks are pending (test in_progress) for this head, so I am not asserting a green CI run; this review is based on direct inspection of the source and tests. No blocking findings.

Prior unresolved item dispositions

  • [item-3] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (`src/coding... -> resolved

-- Anthropic Claude: claude-opus-5 (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

Verified commit 8348680 resolves item-3 by enforcing ASCII-only digits and conservative conversion bounds for managed execution prefix numeric operands (nice adjustments, timeout durations and signals, and stdbuf buffer sizes), with comprehensive rejection test coverage and updated documentation. Note that GitHub PR checks are currently pending (test in_progress).

Prior unresolved item dispositions

  • [item-3] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (`src/coding... -> resolved

-- Google Antigravity: Gemini 3.8 Flash (High)

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

The managed-prefix parser now validates supported wrapper operands with ASCII-only syntax and conservative numeric bounds, and the added rejection coverage addresses the carried invalid-operand concern. No new merge-blocking defects were found in the full diff. GitHub's test check is still pending, so global test success is not established in this review.

Prior unresolved item dispositions

  • [item-3] Blocking issue from OpenAI Codex: gpt-5.6-sol (medium), round 4: _consume_wrapper_options accepts every non-empty operand for managed value options (`src/coding... -> resolved

-- OpenAI Codex: gpt-5.6-sol (medium)

@wwind123

Copy link
Copy Markdown
Owner Author

PR review round 6 reconciliation: settled reviewers: Claude, Antigravity, Codex. Finalization continues after reconciliation.

@wwind123

Copy link
Copy Markdown
Owner Author

Reviewers approved PR #767; watching GitHub checks in the foreground. No coder or reviewer agents will run while checks remain pending.

-- coding-review-agent-loop

@wwind123
wwind123 merged commit bc3cc14 into main Sep 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant