Shell serial stack: here-strings, heredoc terminators, arithmetic/comment openers, secret ordering - #945
Merged
Merged
Conversation
Trim-based closing accepted a space-indented marker for plain << and kept a stray carriage return in CRLF markers, so the splitter and the approval display disagreed with the shell about where a heredoc ends. Compare exact lines instead.
A << inside ((/$(( is the left-shift operator and a << after a top-level # is documentation, so neither the splitter nor the approval display may open a heredoc there and swallow the following chain. Track arithmetic depth and skip #-to-EOL comments in both.
Pure ls of a secret name still asks, and chains flag the content-reading half; bounded listings stay exempt and unbounded listings still ask. The secret-first ordering already holds at all three sites (classify auto-allow, gate segment guard, auto-shell policy) — these tests pin it.
TheGreatAxios
force-pushed
the
cl-0324-shell-serial
branch
from
September 12, 2026 06:16
50e0681 to
c3aeb9a
Compare
TheGreatAxios
enabled auto-merge (squash)
September 12, 2026 17:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks four shell-serial fixes (0.3.24 posture: open only, do not merge).
Issues: CL-7319, CL-7386, CL-7387, CL-5420.
Commits (in order):
cat <<< wordparses the word as an inline argument; no heredoc body is opened and the following chain still splits.<<; CRLF markers compare CR-stripped; splitter and approval display agree on where the heredoc ends.<<inside((/$((is left-shift and after a top-level#is documentation, so neither opens a heredoc. Follow-up fix folded in: the comment guard is a commentToEOL flag that suppresses ONLY the<<branch — operators after#still split, sosplitChainedCommand("# note && rm -rf /")surfacesrm -rf /` as its own segment.Verification:
bun test src/permission/permission.test.ts src/tui/command-display.test.ts src/permission/command.test.ts src/permission/classify-security.test.ts tests/unit/permission/cross-commit-composition.test.ts→ 426 pass, 0 failbun run typecheck(tsc --noEmit) → cleanbunx oxlinton touched files → cleanbun run check→ sole red is pre-existing oxfmt on untouched src/subagent/spawn-agent-worktree.test.ts (not in this branch diff; fails on main too)