Skip to content

Decide How the #2080 eval Fix Continues Past Its Review Budget #2139

Closed

Description

@ptr727

Question

The #2080 fix (read an eval's arguments as a wait-loop payload in gh-write-guard.py) used up its two edit rounds under local-strict-review "Disposing of Findings", and the third pass still found three defects in code the branch adds. How should the lane continue?

Handoff: #2137 (track auto-2080). Branch: feature/auto-2080 at 1dd74971, pushed, no pull request yet. No pull request is blocked beyond the one this lane has not opened.

The three open findings (all introduced by the branch)

  1. False allow from an eval redirection. _eval_payload appends the eval's redirections after the payload text, which binds them to the payload's last command. Bash applies them to the eval as a whole, under any redirection or pipe inside the payload. So eval 'yes | while read -r l; do sleep 1; done' < f is allowed, and bash loops until the timeout. The same cause denies eval 'while read -r l; do sleep 1; done; echo end' < f, which develop allowed.
  2. Near-quartic scan time. Each eval in command position recurses on the rest of its run, which holds every later eval, up to the depth cap. A command of 60 chained evals followed by echo sleep takes about 86 seconds to classify, where develop takes none.
  3. False deny of the prescribed bound where the quote mask is unknown. Reading the payload to the end of the command unquotes every later word, so eval "$(ssh-agent -s)"; timeout 60 bash -c '<a loop>' is denied when a later apostrophe leaves the quoting unparseable. The deny message then asks for the form already used.

Three earlier findings were fixed in rounds one and two, and four pre-existing ones were filed as #2138 and a comment on #2058.

Options

  1. Recommended: authorize one more edit round with these designs, then drive to develop. Model an eval redirection as an outer group ({ <payload> newline } <redirs>) rather than appending it. Stop reading a nested eval whose payload is a suffix of one already being read, which removes the repeated rescans. Where the mask is unknown, end the payload at the end of the eval's own line rather than the whole command. Each of these is small and has a self-test row to write. This keeps the fix whole and the reason is that every finding has a concrete, local design, so the risk of another non-converging round is lower than the rounds so far suggest. The parked branch is kept and extended.
  2. Narrow the fix and drive it. Keep only the core reading: eval's arguments up to its own separator with the quote mask known, one leading -- dropped, and no read at all where the mask is unknown. Drop the redirection handling, so an eval'd read loop bounded by an outer < f is denied, which is the safe direction. Add a single recursion guard for the scan time. The parked branch is trimmed rather than extended, and a smaller surface draws fewer findings.
  3. Close The Guard's Wait-Loop Rule Never Reads an eval Argument #2080 as a known limit. Document an eval payload as unseen, the same as a wait inside a script file, and abandon the branch. The guard keeps its develop behavior, which allows every eval'd loop.

Activity

  1. added
    decision
    on Sep 30, 2026
  2. ptr727 commented on Sep 30, 2026

    @ptr727
    OwnerAuthor

    Answered by the maintainer on 2026-09-30: option 1: one more edit round with the three stated designs (the redirection as an outer group, the suffix-payload guard, and ending the payload at the eval's own line when the quote mask is unknown), then drive to develop.

  3. removed
    decision
    on Sep 30, 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