Skip to content

Decide How the #2080 eval Fix Continues After Its Third Review Budget #2367

Closed

Description

@ptr727

Question

The #2080 fix (read an eval's arguments as a wait-loop payload in gh-write-guard.py) applied #2208's answer, then spent both edit rounds of its new push under local-strict-review "Disposing of Findings". The third pass still found defects in code the branch adds, one of them a false allow on a common shape. How should the lane continue?

Handoff: #2137 (track auto-2080). Branch: feature/auto-2080 at 19f8121a, pushed, no pull request yet. No other pull request is blocked.

What this round did

The third pass's findings (6, all on text this change wrote)

  1. False allow, worse than develop. The quoted-separator early return in _runs_as_command also skips a quoted assignment prefix, so the assignment becomes the run's head, and cat is in _NAMES_ITS_ARGUMENTS. GIT_PAGER="/bin/cat" bash -lc 'until gh pr checks 5; do sleep 30; done' is allowed, and develop denies it. while true; do PAGER="/bin/cat" sleep 1; done is allowed the same way.
  2. False deny, worse than develop. _opens_with_separator counts ) as a separator, so the walk break stops at a )> that closes a $(...). echo $(echo)>f bash -c '<loop>' is denied, and so are the eval and loop-body sleep forms. Develop allows all three.
  3. Slowdown, worse than develop. Every eval token in argument position runs the _runs_as_command walk, which the budget does not bound. "echo " + "eval " * 8000 (40 KB) takes 14 seconds, against 0.03 on develop.
  4. False allow, develop-same. _EVAL_RUNNERS lacks while, until, and coproc, and a runner's option such as time -p or command -p ends the walk. So while eval '<loop>' && [ "$n" -lt 3 ]; do ...; done goes unread.
  5. False deny, worse than develop, contrived. _runs_eval accepts a fully quoted 'FOO=1' as an assignment, a Unicode digit as an fd (str.isdigit), and the spaced 2 >f form. Each of these exits 127 in bash.
  6. Contract drift. host-setup/agent-safety/README.md requirement 7, which the Claude README says defines the rule in full, says nothing about eval. Nothing states the payload reading, the launcher exclusion, the unknown-quoting line rule, or the read budget.

Findings 1 to 3 and 5 make the branch worse than develop. Findings 1 and 2 come from the branch's changes to _runs_as_command, which bash -c and sleep share, rather than from the eval reading itself.

Options

  1. Recommended: narrow the branch to eval-only paths, fix the rest, then drive to develop. Revert the two _runs_as_command changes: the fused-separator walk break and the quoted-separator early return. That restores develop's behavior for bash -c and sleep, and clears findings 1 and 2. The quoted-separator false denies return as develop-same shapes and get an issue. So does the ;> false allow the walk break closed for bash -c. Fix 3 with an O(1) command-position test before the walk, 4 by adding while, until, and coproc and skipping a runner's options, and 5 with ASCII digits and an unquoted-assignment test. Add eval to requirement 7. The reason: findings 1 and 2 are what changing shared code produced, and an eval-only branch puts nothing worse than develop on the bash -c and sleep paths.
  2. Fix all six in place with one more edit round, then drive to develop. Same as option 1 for 3 to 6. For finding 1, skip the early return only for a quoted separator, never for a quoted prefix or assignment. For finding 2, drop ) from the walk break. This keeps the branch's fixes to develop's own quoted-separator false denies. But every round so far has found new defects in the previous round's fixes, and the shared path has the widest reach, so this may need another decision.
  3. Close The Guard's Wait-Loop Rule Never Reads an eval Argument #2080 as a known limit. Delete the branch and worktree, and add to requirement 7 that an eval payload is unseen, as a wait inside a script file is. The guard keeps develop's behavior, which allows every eval'd loop. Issues The Guard's eval Reading Ends Its Arguments at a Parenthesis #2362 to The Guard Reads No ANSI-C Quoted Payload #2366 then describe a reader that does not exist, so they close too, apart from The Guard's read Bound Ignores a Group's Input Redirection #2364 and The Guard Reads No ANSI-C Quoted Payload #2366, which stand on their own.

Activity

  1. added
    decision
    on Oct 4, 2026
  2. ptr727 commented on Oct 5, 2026

    @ptr727
    OwnerAuthor

    Answered by the maintainer on 2026-10-05: option 1: narrow the branch to eval-only paths, revert the two _runs_as_command changes, fix findings 3 to 6, file the develop-same shapes as issues, then drive to develop. The lane's handoff keeps its blocked label until an attended session works it with this answer.

  3. removed
    decision
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions