Claude/januskey reversible files ex qau#8
Merged
Conversation
JanusKey is a file operation utility suite that achieves complete reversibility through Maximal Principle Reduction (MPR). Key features: - Reversible file operations (delete, modify, move, copy) - Content-addressed storage with SHA256 hashing and deduplication - Transaction support with commit/rollback functionality - Complete audit trail with operation history - CLI interface with dry-run and confirmation modes Architecture: - src/januskey/src/lib.rs - Main library and JanusKey instance - src/januskey/src/error.rs - Error types - src/januskey/src/content_store.rs - SHA256 content-addressed storage - src/januskey/src/metadata.rs - Operation log and metadata - src/januskey/src/operations.rs - Reversible file operations - src/januskey/src/transaction.rs - Transaction manager - src/januskey/src/main.rs - CLI interface (jk command) All 15 tests pass, verifying reversibility guarantees.
…, truncate, touch Add six new reversible file operations with full undo support: - mkdir/rmdir: directory creation and removal with recursive support - symlink: symbolic link creation (Unix-only) - append: file content addition with truncate reversal - truncate: file size reduction with content preservation - touch: timestamp modification with restoration Includes comprehensive test coverage for all new operations.
Add extensive wiki covering: - Home page with quick navigation - Theory section: MPR, MAA Framework, RMR primitive, formal model - Architecture overview with component diagrams - Complete operations reference for all 13 operation types - CLI commands guide with examples - Transaction guide with patterns - Rust API reference - Formal proofs with mathematical notation - Practical examples and integration patterns This documentation provides both theoretical foundation (Maximal Principle Reduction, Mutually Assured Accountability) and practical usage guidance for the JanusKey reversible file operations system.
Stage 1 of development roadmap: Implement the RMO primitive to complement RMR in the MAA Framework. This provides verifiable, irreversible data erasure for "Right to Erasure" compliance. Implementation includes: - ObliterationManager with secure multi-pass overwrite (DoD 5220.22-M) - ObliterationProof with cryptographic commitment verification - ObliterationRecord for audit trail without content storage - Batch obliteration support - CLI commands: obliterate, obliteration-history, verify-obliteration Security features: - 3-pass secure overwrite (zeros, ones, random data) - SHA256-based proof commitment - Audit logging preserves fact of deletion, not content - Double confirmation for CLI obliteration New CLI commands: - jk obliterate --hash <hash> --reason "..." --legal-basis "GDPR Article 17" - jk obliterate --operation <id> - jk obliteration-history - jk verify-obliteration <proof-id> Includes 7 new tests for obliteration functionality. All 28 tests pass.
- Add delta.rs module with line-based and block-based diff algorithms - Integrate delta storage into modify operation (disabled by default) - Add is_delta field to OperationMetadata for tracking storage type - Update undo_modify to handle delta-based restoration - Add tests for large file modify and undo operations - Update STATE.scm with v1.0 progress (34 tests passing) Delta storage is experimental and opt-in via JANUSKEY_USE_DELTA env var. Full content storage remains the default for reliability.
Implements a trait-based abstraction over filesystem operations enabling
JanusKey to work with local files, SSH/SFTP, and S3-compatible storage.
Backend infrastructure:
- FileBackend trait with 20+ operations (read, write, delete, etc.)
- LocalBackend: Full implementation using std::fs
- SshBackend: SFTP operations via ssh2 crate (feature-gated)
- S3Backend: Cloud storage operations (feature-gated, stub impl)
- BackendFactory: URI-based backend creation
- RemoteUri: Parser for ssh://user@host:port/path and s3://bucket/key
Feature flags:
- 'ssh' - Enable SSH/SFTP backend (requires libssh2)
- 's3' - Enable S3 backend (requires AWS SDK)
- 'remote' - Enable all remote backends
Usage examples:
- Local: BackendFactory::from_uri("/path/to/file")
- SSH: BackendFactory::from_uri("ssh://user@host/path")
- S3: BackendFactory::from_uri("s3://bucket/key")
39 tests passing.
- Add ncurses-based Ada TUI with operations and history panels - Implement C-compatible FFI interface for Ada integration - Add ContentHash::from_hex for FFI obliteration support - TUI supports keyboard navigation, help screen, and status bar - FFI provides init/open/close, status, undo, obliterate, history APIs - 43 tests passing including new FFI tests
hyperpolymath
added a commit
that referenced
this pull request
May 16, 2026
Stale SHA-pins carried two fixed validator false-positives (k9 pedigree brace bug #7; a2ml identity check on typed/\*file manifests #8/#9). Bumps both to current main and adds github-actions to dependabot to prevent recurrence. Mechanical estate-wide sweep. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Jonathan D.A. Jewell <67598845+hyperpolymath@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.