Repository navigation
ARTFS Drive basic CRUD feature - #46
Merged
Merged
Conversation
A drive is a bucket one to one; the record is control-plane metadata
stored beside the bucket record in RSS at drive:{name}. The bucket
name validator moves out of the S3 create-bucket handler so the drive
API and the S3 handler reject the same names.
… API An HMAC over method, path and body under the API key's secret, in the mount signature's style so one client routine signs both, verified by an actix middleware for the coming /v1/drives routes. The secret never leaves the client, and no SDK needs an AWS SigV4 signer for four JSON calls. The query string is signed as well, since force=true turns a delete destructive and must not be attachable to a signed request. The signer lives in data_types rather than the fs_gateway codec crate so test clients can sign too: the codec depends on the RPC client crate with no runtime feature, which only compiles when a gateway in the same build selects one. mgmt_auth_required defaults to true; off skips the signature for local development but still needs a live key.
thomas-fractalbits
force-pushed
the
drive-crud
branch
2 times, most recently
from
September 16, 2026 23:06
1bfb34d to
8a7c435
Compare
A drive is the bucket one to one: the verbs wrap CreateBucket and DeleteBucket and keep a drive: record beside the bucket record through the generic RSS KV ops. The record names its bucket incarnation by root blob, so a bucket deleted and recreated under the same name never inherits the old id, and every record delete and terminal bucket delete is fenced on that incarnation through typed RSS results. Force delete answers 202 and sweeps in the background through the DeleteObjects path. One sweeper per drive: a lease on the record, renewed by compare-and-set, with a holder token that lets a lease write whose reply was lost be reconciled by reading back; an unknown outcome is settled by the registered worker, never by dropping the slot. Two S3 path changes close cache gaps that delete and recreate of a name exposed: a NoSuchBucket answer drops the worker's cached bucket record, and CreateBucket confirms a cached "already owned" against RSS before short-circuiting, so neither waits out the 300s TTL. Verified: cargo test --package s3_gateway passes against a local cluster.
artfs-mount takes a prefix (FS_MOUNT_PREFIX), a directory key that starts and ends with "/", signs it into the Mount request, and roots its inode table there so the kernel sees an ordinary filesystem. The gateway carries the scope in the session token, in a layout that already has a slot for the claim holder (empty for now) so claims stay a pure addition, and refuses any key outside it with one starts_with per request; an orphan key of the mount's own instance and a hardlink record remain reachable. A writer creates a missing scope as mkdir -p would, a reader of a missing scope fails at Mount. At this step a scope is a narrowing the orchestrator chooses, not a security boundary: every key still has whole-bucket permissions. Verified: just run-tests fs-server passes, 127 cases in both cache modes including the three subtree cases; FS_MOUNT_PREFIX=/work/ just fstest passes, 4333 tests.
Create over /v1, put over S3, read and write through a read-write mount, EROFS on a read-only mount, two subtree mounts each seeing only its own directory, force delete, and a refused mount of the deleted drive. Runs after the FUSE cases in both cache modes of the fs-server suite. Verified: just run-tests fs-server, the case passes in both modes.
@fractalbits/artfs: create, createIfNotExists, list (cursor iterator), get, delete with force and waitDeleted, and mountConfig, which renders the artfs-mount TOML and FS_MOUNT_* env for a drive or a subtree of it. Requests carry the FBSIG1 HMAC under WebCrypto, so the secret never travels and no AWS signer is needed. Outside the Cargo workspace. Verified: npm run typecheck, prettier, and vitest 5/5 against a local just service start.
thomas-fractalbits
force-pushed
the
drive-crud
branch
from
September 16, 2026 23:21
8a7c435 to
d105b59
Compare
thomas-fractalbits
added a commit
that referenced
this pull request
Sep 18, 2026
ARTFS Drive basic CRUD feature
thomas-fractalbits
added a commit
that referenced
this pull request
Oct 10, 2026
ARTFS Drive basic CRUD feature
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.