Repository navigation
Closed
Description
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
- Merged current develop (
cf053cb5) in without conflict, and fixed a develop row the merge broke: the branch's fused-separator walk in_runs_as_commandstopped at a quoted;. - Applied Decide How the #2080 eval Fix Continues After Its Second Review Budget #2208 option 1: an unknown-quoting eval payload ends at an operator token holding a newline, and
_sleepsreads each eval payload with its quote-kept mask. The Guard's eval Reading Ends Its Arguments at a Parenthesis #2362 and The Guard's eval Reading Ends Its Payload at a Quoted Newline #2363 were filed for the two false allows. - Pass 1 (5 findings): passed the quote mask to
_runs_as_commandfor eval, stopped a quoted separator before a command from opening it, and bounded eval reads with a shared budget. Filed The Guard's read Bound Ignores a Group's Input Redirection #2364 and commented the unknown-quoting form onto The Guard's eval Reading Ends Its Payload at a Quoted Newline #2363. - Pass 2 (6 findings): added
_runs_eval, so an eval behindtimeoutornohupreads as running nothing, charged each eval read by its payload's length, and passed masks through the wrapper-payload and sleep checks in_sleeps. Filed The Guard's Unknown-Quoting eval Payload Takes In Later Commands' Quoted Words #2365, a consequence of the Decide How the #2080 eval Fix Continues Past Its Review Budget #2139 unknown-quoting design, and The Guard Reads No ANSI-C Quoted Payload #2366, which predates the branch. Declined one finding with evidence: under unknown quoting the walk stopping at a quoted;>matches develop's existing handling of a quoted;. - Each fix has a self-test row that fails when the fix is reverted.
--selftest, ruff, mypy, the prose gate, the eol gate, andtest_install.pypass.
The third pass's findings (6, all on text this change wrote)
- False allow, worse than develop. The quoted-separator early return in
_runs_as_commandalso skips a quoted assignment prefix, so the assignment becomes the run's head, andcatis 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; doneis allowed the same way. - False deny, worse than develop.
_opens_with_separatorcounts)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-bodysleepforms. Develop allows all three. - Slowdown, worse than develop. Every
evaltoken in argument position runs the_runs_as_commandwalk, which the budget does not bound."echo " + "eval " * 8000(40 KB) takes 14 seconds, against 0.03 on develop. - False allow, develop-same.
_EVAL_RUNNERSlackswhile,until, andcoproc, and a runner's option such astime -porcommand -pends the walk. Sowhile eval '<loop>' && [ "$n" -lt 3 ]; do ...; donegoes unread. - False deny, worse than develop, contrived.
_runs_evalaccepts a fully quoted'FOO=1'as an assignment, a Unicode digit as an fd (str.isdigit), and the spaced2 >fform. Each of these exits 127 in bash. - Contract drift.
host-setup/agent-safety/README.mdrequirement 7, which the Claude README says defines the rule in full, says nothing abouteval. 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
- Recommended: narrow the branch to eval-only paths, fix the rest, then drive to develop. Revert the two
_runs_as_commandchanges: the fused-separator walk break and the quoted-separator early return. That restores develop's behavior forbash -candsleep, 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 forbash -c. Fix 3 with an O(1) command-position test before the walk, 4 by addingwhile,until, andcoprocand skipping a runner's options, and 5 with ASCII digits and an unquoted-assignment test. Addevalto 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 thebash -candsleeppaths. - 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. - 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
evalpayload 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.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ptr727 commentedon Oct 5, 2026
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
blockedlabel until an attended session works it with this answer.Confine the eval Reader to eval Paths, Per Decision #2367
Read an eval's Arguments as a Wait-Loop Payload in the Guard (#2452)
Promote develop to main: Read an eval's Arguments as a Wait-Loop Payl…