Skip to content

Conversation

@amiller68
Copy link
Contributor

Summary

Adds comprehensive FUSE filesystem mounting for jax-bucket with three main improvements:

  • LRU Read Caching: Reduces daemon API calls via moka cache (100MB, 60s TTL)
  • Improved Write Handling: Supports append mode, seeking, and read-modify-write patterns
  • Persistent Mounts: Background daemonization with clean unmount support

Usage

# Mount in foreground
jax bucket fuse --name my-bucket --mount-point /tmp/bucket

# Mount as daemon (persists after terminal close)
jax bucket fuse --name my-bucket --mount-point /tmp/bucket --daemon

# Unmount
jax bucket fuse --mount-point /tmp/bucket --unmount

Feature gated behind --features fuse (requires macFUSE or libfuse).

Test Plan

  • Verify project builds without fuse feature
  • Mount bucket and verify read/write operations
  • Test daemon mode persistence
  • Test cache hit rates and TTL expiration
  • Test unmount functionality

🤖 Generated with Claude Code

amiller68 and others added 2 commits December 29, 2025 16:04
Implement comprehensive FUSE filesystem layer for mounting buckets:

**Phase 1: LRU Read Caching**
- Cache file content with moka (100MB default, 60s TTL)
- Version-based invalidation on writes/deletes
- Configurable via --cache-size-mb and --cache-ttl-secs flags

**Phase 2: Improved Write Handling**
- Support append mode (O_APPEND) and seeking
- Read-modify-write pattern: load existing content before appending
- Only upload on flush if buffer was modified (dirty tracking)
- Support O_RDWR by reading from write buffer during active writes

**Phase 3: Persistent/Daemonized Mounts**
- --daemon/-d flag to run mount in background
- --unmount/-u flag to cleanly unmount existing mounts
- PID and log files at ~/.jax/fuse-{mount}.{pid,log}
- Cross-platform unmount support (fusermount on Linux, umount on macOS)

Cache invalidation on all write operations (unlink, rename, truncate).
Feature gated behind 'fuse' - requires macFUSE (macOS) or libfuse (Linux).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix getattr signature (4 params, not 5 - no fh parameter in 0.14)
- Remove unnecessary parentheses around assignments
- Prefix unused variables with underscore
- Allow dead_code for original_loaded field (reserved for future use)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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