You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Read a Subshell's Trailing Comment and a Tab-Stripped Heredoc as Bash Does in the Write Guard #3353
Found by the local review of the backslash-newline narrowing (branch feature/guard-backslash-newline-quoting), confirmed with a classify probe on develop using constructed commands. Both are low realism, filed together as tokenizer divergences from bash.
Gaps
A # right after a subshell's ) opens a comment in bash._context_lex and _skip_group read it as text, as _context_lex's docstring states. An apostrophe in that comment then pairs with one on a later line and hides the lines between. Develop allows (echo it)# it's, then gh pr merge 5 --admin, then # ', one per line.
A <<- heredoc fed to a shell has its leading tabs stripped before the inner shell joins a continuation. No reading strips them, so a word split across a tab-indented continuation stays split. Develop allows bash <<-'EOF' followed by a tab-indented gh pr merge 5 --ad\ line, a tab-indented min line, and a tab-indented EOF. The inner shell runs --admin.
Possible Direction
Read )# as a comment opener after a subshell's ), keeping it text after a substitution's. Strip the leading tabs of a <<- body before reading it as a script.
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.
Activity
Read a Backslash-Newline by Its Quoting in the Write Guard (#3357)
ptr727 commentedon Oct 23, 2026
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.