Repository navigation
Closed
Description
Question
Pull request #2117 (handoff #2072, track auto-1634, branch feature/auto-1634 at 14400ce) applies decision #2118's option 1: a word the shell may rewrite anywhere in a timeout run makes the run no bound. Three local strict passes ran on this push. The third raised 3 findings, 2 of them introduced, and both edit rounds for this push are spent, so editing stopped. How should the last three be settled?
What the branch holds now
- 8aaf7c5: any word between
timeoutand the wrapper that the shell may rewrite makes the run no bound, whatever follows it. The launcher class (env -S 'timeout 800',xargs -I% % 800) is declared not reached in README requirement 7 and filed as Read a Launcher That Builds an Inner timeout as Nesting #2195. - 5a242c1 (pass 1): zsh's leading
=counts as a rewrite, and a quoted word holding a rewrite character, such as'a*b', is declared a false deny. - 14400ce (pass 2): the scan also covers the words before the head
timeout, soenv X=$T timeout 900 ...andsudo X=$T timeout 900 ...are denied, and a bash assignment prefixX=$T timeout ...is a declared false deny. A nesting whose inner deadline fires before any outer signal, such astimeout -s KILL 1000 timeout 800 ..., is declared a false deny. --selftestpasses, each new row was checked by reverting its logic, and ruff,prose_lint.py,repo_gate.py --check eol,spec/validate.py, anddocker_lint.pyare clean.- Pass 1 also raised a payload-level leak through a nested
timeout, which is Stop an Inherited timeout Bound From Reaching a Loop Under a Nested timeout #2055 and was commented there.
Open findings from the last strict pass
- A command substitution hides the outer
timeout. The walk back from the wrapper stops at the)of a$(...), so the scan never sees it.timeout -s KILL 10 $(true) timeout 800 bash -c '<the loop>'and$(echo timeout -s KILL 10) timeout 800 bash -c '<the loop>'are allowed, and each runs an outer SIGKILLtimeoutover an inner one. The walk-back predates this branch, and the base allowed these too, but the README sentence 14400ce wrote claims a rewritable word before thetimeoutis covered. introduced: a brace group is now denied. A bare{opens the run and holds the{character, so{ timeout 900 bash -c '<the loop>'; }is denied. The base allowed it. A reserved word is not a rewrite, and this deny is undeclared.introduced: a docstring pronoun binds to the wrong sentence. In_timeout_bounds_wrapper, "it is a false deny too" now follows the launcher sentence, so it reads as calling the launcher, which is a leak, a false deny.
Options
- Recommended: fix all three, then let PR review dispose of what follows. Skip a bare
{in the rewrite scan, walk back to the last command separator rather than to a parenthesis so a substitution before the head is scanned, and reword the pronoun. Then record a pass and drive Deny a Signal-0 timeout as a Wait Bound in the Guard #2117, with PR review disposing of any later finding instead of parking again, as Choose How to Finish #1634's Lane After the Narrowed Model's Strict Passes #2079 allowed. This keeps every claim the README makes true. - Fix findings 2 and 3, and declare finding 1. Skip a bare
{and reword the pronoun, then list a command substitution before or around the headtimeoutin README requirement 7 as a shape not reached, and file it as a follow-up. PR review disposes of what follows. This is the smaller diff and leaves the walk-back alone. - Drop the prefix-span scan from 14400ce. Scan only from the head
timeoutagain, which removes finding 2 and the claim finding 1 contradicts, and declare a rewritable word before the head,env X=$T timeout ...included, as not reached. Reword the pronoun. This is the most conservative, and it gives back a hole pass 2 found.
Blocks
- Handoff Session Handoff [auto-1634]: Narrow Nested timeout Handling per #2056 #2072 (track
auto-1634). - Pull request Deny a Signal-0 timeout as a Wait Bound in the Guard #2117 to develop, head 14400ce.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ptr727 commentedon Oct 1, 2026
Answered by the maintainer: option 1. Fix all three findings (skip a bare
{in the rewrite scan, walk back to the last command separator rather than to a parenthesis, reword the docstring pronoun), record a pass, and drive #2117, with PR review disposing of any later finding rather than parking again.Read a Substitution Before the timeout and Skip a Bare Brace in the R…