Skip to content

Session Handoff [auto-2032]: End the Guard's Stdin Redirect Scan at a Reserved Word per #2032 #2151

Closed

Description

@ptr727

Next steps

  1. Fix The Guard's Stdin Redirect Scan Runs Past a Reserved Word #2032 in host-setup/agent-safety/claude/gh-write-guard.py _redirects_stdin: its scan of the tokens after a loop's done stops only at a separator operator, so a redirect on the next command inside an enclosing compound reads as the loop's input bound. if while read l; do sleep 30; done then echo x < f; fi is allowed on develop, and the loop reads the caller's stdin with nothing bounding it. End the scan where the loop's command ends, which is a reserved word in command position as well as a separator, per the issue's own direction. The picker also reproduced the else form, if true; then while read l; do sleep 30; done else echo x < f; fi, as allowed on develop. Done looks like: the then and else forms above are denied, while read l; do sleep 30; done < f stays allowed, self-test rows pin each, and the deny rows fail with the fix reverted.
    A caution the issue does not state: a redirect after a closing word (}, fi, done) binds the enclosing compound, and bash does feed that to the inner loop, so { while read l; do sleep 30; done } < f is a real bound and is allowed on develop. Crediting it is optional. Denying it is a false deny, which _reads_its_input's docstring already accepts as the safe direction, so either result needs no decision. Whichever the fix does, pin it with a self-test row.
  2. Drive the pull request to develop per drive-pr, its body carrying Closes on promotion: #2032, then close this lane out.

External blockers

None known.

Internal dependencies

Three parked lanes hold open branches on this same file: auto-2080 (eval payloads in the wait-loop rule), auto-2112 (heredoc stripping), and auto-1634 (the timeout signal). Do not build on any of those branches or merge their work here. Base on develop and keep the change to the _redirects_stdin scan boundary, so any lane can land first and the others rebase over a small, separate hunk.

The sibling defect in the process-substitution check one line above is tracked on its own issue, named in #2032's body, and is not this lane's scope. A shared "end of the loop's command" helper is fine if it falls out naturally, but do not widen this pull request to fix that sibling.

State

No branch, worktree, or pull request yet. Work on feature/auto-2032 in a worktree of its own, based on develop. The picker reproduced the false allow against develop's guard before opening this lane.

Parked decisions

Five open decision issues, longest-waited first: #2118, #2122, #2126, #2139, #2146. None blocks this lane, and no maintainer is present in an unattended run, so none is asked here.

What the last round did

Nothing yet. This lane was opened by the unattended-handoff picker.

What not to repeat

Nothing yet.

New learnings

None yet.

Activity

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

    @ptr727
    OwnerAuthor

    Lane closed out: done.

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

    handoff

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions