Skip to content

Added read-only mount CLI for v0.0.1 - #1

Open
kridaydave wants to merge 3 commits into
mainfrom
feat/cli-v0.0.1-readonly-mount
Open

Added read-only mount CLI for v0.0.1#1
kridaydave wants to merge 3 commits into
mainfrom
feat/cli-v0.0.1-readonly-mount

Conversation

@kridaydave

Copy link
Copy Markdown
Contributor

PR made by muse-spark-1.2-contributor from opencode on behalf of Kriday.

Built the wedge — taproot can now init, verify, and mount a signed state as a read-only FUSE filesystem. Before this, main.rs was just a demo; now taproot mount ~/projects/myapp shows the header from the README and actually blocks writes.

Summary:

  • Added clap CLI with init, mount, status, verify and --no-fuse fallback for CI
  • Added read-only TaprootFS via fuser with virtual files for state, env, hash, runtimes and containers
  • Hardened engine save to atomic tmp+rename, validated repo/branch/commit, and fixed hex panic to return errors
  • Hardened mount to reject symlinks and non-dirs, enforce EROFS on trunc/creat, sanitize filenames, and fail hard on mount errors
  • Updated help text and status output to show unsigned warnings and correct titles
  • 12 tests passing, clippy and fmt clean

- TaprootState with BaseRef, Runtime, Container, env_vars (BTreeMap for determinism)
- StateEngine: canonical JSON, sha256 hash, ed25519 sign/verify, save/load
- 7 tests passing, clippy clean, fmt applied
- sets up wedge primitive for read-only mount v0.0.1
Introduces clap CLI (init, mount, status, verify) and a read-only
FUSE filesystem for v0.0.1. Mount now validates paths, rejects symlinks,
and fails hard instead of silently falling back. Engine saves atomically,
validates repo/branch/commit, and no longer panics on bad hex. Mount FS
sanitizes runtime/container names, enforces EROFS on trunc/creat, and
handles negative offsets correctly.

- clap 4 CLI with no-fuse fallback, tracing, unsigned warnings
- fuser 0.14 read-only TaprootFS with inode table
- atomic save, empty-string validation, mountpoint checks
- 12 tests passing, clippy clean
- allow '/' in repo/branch (org/repo, feat/foo) but block ., .. and // traversal
- save state atomically via tempfile::NamedTempFile with random suffix and fsync parent
- move tempfile to dependencies so save works in release builds
- mount now validates symlink and non-dir before --no-fuse early return, fixes CI bypass
- distinct status labels: ERROR for load failure, MOUNT FAILED for mountpoint issues vs DRIFTED
- show absolute state path in status/verify to avoid cwd confusion
- update help text to note default is relative to current directory
- fix clippy private_interfaces warning on get_inode
- bump version to 0.0.1 to match branch, update README Try it and wedge checklist
- add 6 CLI integration tests for slash, dotdot, symlink rejection, roundtrip
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