Skip to content

feat(bashkit): Phase 8 - OverlayFs and MountableFs#9

Merged
chaliy merged 3 commits intomainfrom
claude/bash-filesystem-library-cYGoo
Jan 31, 2026
Merged

feat(bashkit): Phase 8 - OverlayFs and MountableFs#9
chaliy merged 3 commits intomainfrom
claude/bash-filesystem-library-cYGoo

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Jan 31, 2026

Summary

Add two new filesystem implementations for advanced sandboxing scenarios:

OverlayFs

  • Copy-on-write filesystem layering a writable upper on read-only lower
  • Tracks deletions via whiteouts
  • Supports recreation of deleted files (removes whiteout)
  • Merges directory listings from both layers

MountableFs

  • Mount multiple filesystems at specific paths
  • Nested mount support (longest prefix matching)
  • Mount points visible in directory listings
  • Cross-mount copy/rename support via read-copy-delete

Use Cases

  • OverlayFs: Isolate script modifications from base filesystem
  • MountableFs: Provide different virtual directories (e.g., /data, /config)

Test plan

  • OverlayFs: read from lower
  • OverlayFs: write to upper (doesn't affect lower)
  • OverlayFs: copy-on-write for modifications
  • OverlayFs: delete with whiteout
  • OverlayFs: recreate after delete
  • OverlayFs: merged directory listing
  • MountableFs: mount and access
  • MountableFs: write to mount
  • MountableFs: nested mounts
  • MountableFs: root fallback
  • MountableFs: mount points in readdir
  • MountableFs: unmount
  • All 130 tests pass
  • Clippy clean

Add bashkit-cli crate with command line interface:
- bashkit -c 'command' - Execute command string
- bashkit script.sh - Execute script file
- bashkit --help / --version

Features:
- Proper exit codes
- stdout/stderr handling
- anyhow for error handling

Usage examples:
  bashkit -c 'echo hello'
  bashkit -c 'arr=(a b c); echo ${arr[@]}'
  bashkit myscript.sh

Tests: 104 passing (library tests)

https://claude.ai/code/session_01A16cD8ztbTJs2PB2iHe1Ua
Add ExecutionLimits and ExecutionCounters for resource control:
- Maximum command count (fuel model)
- Maximum loop iterations
- Maximum function call depth
- Timeout support (Duration)

Integration tests verify limit enforcement for:
- Command limits with short-circuit on exceed
- Loop iteration limits in for/while/until
- Function recursion depth limits

Also adds TODO comment about parser keyword ambiguity issue.

https://claude.ai/code/session_01A16cD8ztbTJs2PB2iHe1Ua
Add two new filesystem implementations for advanced use cases:

OverlayFs: Copy-on-write filesystem
- Layers writable upper on read-only lower
- Tracks deletions via whiteouts
- Supports recreation of deleted files
- Merges directory listings from both layers

MountableFs: Multiple mount points
- Mount filesystems at specific paths
- Nested mount support (longest prefix match)
- Mount points visible in directory listings
- Cross-mount copy/rename support

https://claude.ai/code/session_01A16cD8ztbTJs2PB2iHe1Ua
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chaliy chaliy merged commit 4efdabb into main Jan 31, 2026
1 check failed
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.

2 participants