Skip to content

Decide Whether the Wait-Loop Check Reads zsh EXTENDED_GLOB Operators #2308

Closed

Description

@ptr727

Problem

The wait-loop check in host-setup/agent-safety/claude/gh-write-guard.py reads a word the shell may rewrite as making a timeout run no bound. _is_shell_rewritable covers substitutions, brace expansion, */?/[ globs, tilde expansion, and zsh's leading =. It does not read zsh's EXTENDED_GLOB operators, #, ##, ^, and a mid-word ~. README requirement 7 declares them not read, since the option is off by default.

Under that option a word such as /usr/bin/timeo#ut can glob to /usr/bin/timeout, so a constructed command like this one is read as one bounded timeout while it really nests one:

timeout -s KILL 10 /usr/bin/timeo#ut 800 bash -c 'until [ -f x ]; do sleep 60; done'

Done looks like

A decision on whether the check should read those operators, weighed against the false denies # and ^ inside ordinary arguments would add, and either the change with self-test rows or the declaration kept as the answer.

Found by a local strict review pass on #2117.

Activity

  1. ptr727 commented on Oct 23, 2026

    @ptr727
    OwnerAuthor

    Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.

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