Skip to content

feat(hooks): shell write-interception and regression suite#940

Open
zaxbysauce wants to merge 1 commit into
mainfrom
feat/shell-write-interception
Open

feat(hooks): shell write-interception and regression suite#940
zaxbysauce wants to merge 1 commit into
mainfrom
feat/shell-write-interception

Conversation

@zaxbysauce
Copy link
Copy Markdown
Owner

Summary

  • Added POSIX shell write detection via bash-parser AST analysis for 8 write categories
  • Added Windows shell write detection via regex heuristics
  • Implemented scope path resolution with subshell cd tracking
  • Added interactive/session tool denial
  • Added cross-process scope persistence with TTL and symlink guards
  • Added 348 regression tests across 4 test files
  • Fixed interactive session bypass for 'bash' shell type

Invariant audit

  • 1 (plugin init): not touched
  • 2 (runtime portability): touched - added bash-parser dependency; build and node import verified
  • 3 (subprocesses): not touched
  • 4 (.swarm containment): touched - scope persistence uses existing containment helpers
  • 5 (plan durability): not touched
  • 6 (test_runner safety): not touched
  • 7 (test writing): touched - 4 new test files with bun:test, no mock.module, proper cleanup
  • 8 (session state): not touched
  • 9 (guardrails/retry): touched - added checkShellWriteScope to guardrails hook
  • 10 (chat/system msg): not touched
  • 11 (tool registration): not touched
  • 12 (release/cache): not touched

Test plan

  • bun run build passes
  • node --input-type=module import passes
  • 348 tests pass
  • biome ci passes
  • Release note fragment created

zaxbysauce added a commit that referenced this pull request May 20, 2026
… protocols

- Add Lifecycle Hook Placement (bun:test) section to writing-tests skill
- Add Protocol: BUNDLE SIZE REGRESSION to ci-failure-resolver skill
- Duplicate ci-failure-resolver skill into project repo for swarm-managed updates

Root cause: PR #940 review findings - afterEach inside test() caused state
bleed; bash-parser dependency caused bundle size regression
zaxbysauce added a commit that referenced this pull request May 20, 2026
… protocols

- Add Lifecycle Hook Placement (bun:test) section to writing-tests skill
- Add Protocol: BUNDLE SIZE REGRESSION to ci-failure-resolver skill
- Duplicate ci-failure-resolver skill into project repo for swarm-managed updates

Root cause: PR #940 review findings - afterEach inside test() caused state
bleed; bash-parser dependency caused bundle size regression
zaxbysauce added a commit that referenced this pull request May 21, 2026
… protocols (#947)

- Add Lifecycle Hook Placement (bun:test) section to writing-tests skill
- Add Protocol: BUNDLE SIZE REGRESSION to ci-failure-resolver skill
- Duplicate ci-failure-resolver skill into project repo for swarm-managed updates

Root cause: PR #940 review findings - afterEach inside test() caused state
bleed; bash-parser dependency caused bundle size regression
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