Skip to content

fix(bash-write): fd-dup and /dev/null targets glued to a closing paren (0.1.116) - #128

Merged
brunoazoulay merged 3 commits into
mainfrom
fix/fd-dup-redirect-confirm
Nov 10, 2026
Merged

brunoazoulay merged 3 commits into
mainfrom
fix/fd-dup-redirect-confirm

Conversation

@brunoazoulay

Copy link
Copy Markdown
Collaborator

Summary

Release 0.1.116 (version bump + CHANGELOG in a separate commit).

  • bash-write: the Bash write gate no longer asks to confirm (cmd 2>&1), (cmd >&2), (cmd 2>&-) or (cmd >/dev/null) — an fd duplication/close or /dev/null target glued to a closing parenthesis was read as a file named 1) (regression from 0.1.115). Every other redirect target keeps its previous verdict.

Changes

  • src/policy/guards/bash-write-redirect-op.ts
  • test/bash-write-fd-dup-paren.test.ts, test/helpers/redir-corpus.ts
  • docs/decisions.md, CHANGELOG.md, package.json

Test plan

  • Full suite: 4100 pass / 0 fail
  • tsc 0 errors
  • sniper 0 errors, challenger CONFIRMED
  • CI green

Breaking changes

None

… closing paren

`(cmd 2>&1)` read the target as "1)" and raised a false Bash file-write confirm (regression from 0.1.115).
The word now ends at `)` only when it is a pure fd dup/close or exactly /dev/null; every other target keeps its previous reading.
Adds case-table test and shared guardVerdict helper; records the owner decision.
@brunoazoulay
brunoazoulay merged commit 550f1fc into main Nov 10, 2026
1 check passed
@brunoazoulay
brunoazoulay deleted the fix/fd-dup-redirect-confirm branch November 10, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant