Skip to content

Read an xargs Replace String as a Command Word in Every Run-Time Word Reader of the Write Guard #3387

Closed

Description

@ptr727

Context

Found by the local review of the change closing #3307, which reads a command word holding an xargs replace string as a run-time command word in the config-change scans. Develop's guard shares the cases below, and they were read from the code at the sites named.

The Replace String as a Command Word Is Read in One Reader Only

_runs_run_time_word now counts a command word holding the replace string, as in xargs -I{} {} config .... Only the two config scans read that predicate. The other readers of a run-time command word still read {} as a literal command, since it is no $, backtick, or brace word:

  • echo git | xargs -I{} {} push origin develop is not read as a push by _rewritten_git_words, and the push targets are empty.
  • echo gh | xargs -I{} {} pr merge 5 -R stranger/example is not read as a gh write by _gh_invocations.

Possible Direction

One predicate for a word the shell or xargs may rewrite into any command, read by every site that reads a run-time command word, so the class closes everywhere at once.

Activity

  1. added
    bug
    pre-existing
    script
    on Oct 23, 2026
  2. ptr727 commented on Oct 23, 2026

    @ptr727
    OwnerAuthor

    Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.

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

    bugpre-existingscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions