Repository navigation
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #216
clink --serve ADDR --s3 speaks the S3 REST API: buckets, objects, ranges, conditional requests, copies, listings v1/v2, batch deletes, multipart uploads, SigV4 and SigV2 header and presigned authentication, aws-chunked bodies and CRC/SHA checksums. The store is assembled from optional decorators: - a links catalog in --db (with every links decorator) and the bytes in a folder (--s3-blobs dir:PATH, the default), in RAM (memory) or in an LFS journalled volume (lfs:IMAGE); - or one LFS volume (link-foundation/lfs) holding catalog and bytes (--s3-volume IMAGE|memory); - replication to other S3 nodes (--s3-replica URL, --s3-replication sync|sync:N|async) with quorum writes, rollback, catch-up, reconcile and read failover. Refs #216
…ed in CI Adds the container image, Compose files (one node, RAM disks, replicated), a Swarm stack and Kustomize overlays (PVC, RAM emptyDir, replicated), and smoke-deploy.sh, which deploys each one and drives it with boto3. The new Object storage workflow runs every storage mode of clink and every deployment (Kubernetes on kind) on each pull request.
…ifest object-storage is implemented in Rust and tracked as missing in C# and JavaScript until their ports land in this pull request; object-storage-lfs is Rust only, because links-fs has no bindings. Removes the .gitkeep that created the pull request.
…ompiles 5 GiB does not fit a 32-bit usize, which failed the wasm32 build of the library (Docs, JS client, crash tests). MAX_BODY is 5 GiB on 64-bit targets and usize::MAX on 32-bit ones; the server default and the client both use it.
sha2 0.11.2 was yanked (cargo audit), cross-spawn 7.0.6 has a critical advisory (GHSA-ghv9-86vm-4v8m, fixed in 7.1.2) and platform-trees 0.3.6 and lucide-react 1.85.0 were released, which the dependency check requires.
clink --serve ADDR --s3 in C# serves the same S3 REST API over the same links catalog layout as the Rust clink: buckets, objects, ranges, conditional requests, copies, listings v1/v2, batch deletes, multipart uploads, checksums, aws-chunked bodies and Signature V4/V2 (headers and presigned URLs). Bytes live in a content-addressed folder (--s3-blobs dir:PATH, the default) or in RAM (memory); --s3-replica and --s3-replication sync|sync:N| async replicate every write to other S3 nodes of any implementation. The LFS options are refused with a message naming the Rust clink, since LFS has no .NET binding. 63 tests cover the store contract, the API, both signatures, the network server and client, replication and the CLI end to end.
…ting to the other smoke-all-modes.sh takes any clink command; S3_LFS=0 checks that the LFS modes are refused instead of running them, and REPLICA_CLINK puts the replica in another implementation. The new ports job runs the C# clink with a JavaScript replica and the JavaScript clink with a C# replica.
clink --serve ADDR --s3 in js/server serves the same S3 REST API over the same links catalog layout as the Rust and C# clinks: buckets, objects, ranges, conditional requests, copies, listings v1/v2, batch deletes, multipart uploads, checksums, aws-chunked bodies and Signature V4/V2 (headers and presigned URLs). Bytes live in a content-addressed folder (--s3-blobs dir:PATH, the default) or in RAM (memory); --s3-replica and --s3-replication sync|sync:N|async replicate every write to other S3 nodes of any implementation. The LFS options are refused with a message naming the Rust clink, since LFS has no Node.js binding. The tests keep js/server at 100% coverage and run the shared store contract against every store. The parity manifest now lists S3 as implemented in all three clinks.
…ion limits OBJECT-STORAGE.md and the issue-216 case study now say how CI checks the three clinks against each other, that each CLI words its own argument errors, that C# and WebAssembly cap the body at their address space, and that missed replica writes are held in the primary's memory.
…Bun and Deno CodeQL flagged the two regular expressions that trimmed ETag quotes and endpoint slashes as polynomial on long runs of the same character; both are now a linear scan, tested on 100,000-character inputs. Bun's node:http gives the server a socket only once a request arrives on it, so the idle-connection test now idles a kept-alive client after one request. Deno drops a half-closed request, so the raw requests are written without ending the socket; they ask for connection: close.
The EXIT trap killed the servers and removed the work folder at once, so a replica still writing put files back and rm failed with "Directory not empty" after every check had passed (the JavaScript-primary ports job). The trap now stops each server and waits for it first.
bun-http-idle-close.mjs shows that a socket which has sent no request never reaches the server's connection event under Bun, so shutdown cannot close it; bun-http-keepalive-close.mjs shows that one which has sent a request can be.
`--s3-blobs C:\data` was split at the drive colon and rejected as an unknown blob kind "C". A one-letter kind is now read as a drive letter, so the whole value is a folder path, in the Rust, C# and JavaScript clink. The JavaScript process test that sends SIGTERM and SIGINT is skipped on Windows, where Node kills the child instead of signalling it.
This was referenced Dec 1, 2026
…te-identical platform-trees 0.3.6 rebalances its size-balanced trees differently, so the Rust clink wrote database files the JavaScript unit store (a port of 0.3.5) no longer matched, and 12 of the 19 differential tests failed. The version is pinned with a held-back comment linking #218, which tracks porting the new balancing. The dependency audit read an exact `=` requirement as no version at all and skipped it silently. It now compares it, so the pin is reported as held back. That also surfaced minicov =0.3.8, which wasm-bindgen-test 0.3.80 still requires exactly; it is held back by #219.
konard
marked this pull request as ready for review
December 1, 2026 16:24
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:Claude Opus 5.5: (13 sub-sessions)
Total: (133.2K new + 3.3M cache writes + 85.2M cache reads) input tokens, 1.2M output tokens, $61.345109 cost Claude Haiku 5.5:
Total: 401.6K input tokens, 39.8K output tokens, $0.120075 cost 🤖 Models used:
📎 Log file uploaded as Repository (34940KB)This AI session has ended. Monitoring of this pull request continues. Feel free to review and add feedback while checks are running. |
This branch has not been deployed
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.
Fixes #216
Summary
clink --serve ADDR --s3now serves a links network over the Amazon S3 REST API, in the Rust, C# and JavaScriptclink. The bucket, object, metadata and multipart catalog is kept as links. The bytes go to a folder of files, to RAM, or (Rust) to a links file system (LFS) volume. Any write can be replicated to other S3 nodes, either synchronously in the same request or asynchronously.User guide:
docs/OBJECT-STORAGE.md. Case study, with the requirements, the MinIO/Garage/SeaweedFS/versitygw/Ceph survey, the solution for each requirement and its evidence:docs/case-studies/issue-216.What the issue asked for and where it is
aws-chunkedbodies, and Signature V4/V2 in both headers and presigned URLs. The AWS CLI, boto3 and the hasura-storage calls Deep makes all work with their default settings.--s3-volume IMAGE: the catalog and the bytes share one LFS volume, with one journal commit per request.--s3-blobs lfs:IMAGEkeeps only the bytes in LFS. Both are Rust only, becauselinks-fshas no .NET or Node.js bindings.--s3-blobs memoryand--s3-volume memory, or any mode on a tmpfs. Includes thecompose.ram.ymlandk8smemory overlays.--db s3.links, with the bytes ins3.links.objects/(--s3-blobs dir:PATHmoves them).examples/object-storage/deploy/Dockerfile) runs the same binary as a plain process.stack.yml, plus kustomize bases and overlays indeploy/k8s(base, memory, replicated).--s3-replica URLwith--s3-replication sync(every replica or none; a failed write is undone),sync:N(quorum) orasync(background catch-up). Missed writes are retried, and a restarted primary reconciles. The replica can be any S3 node, including another implementation.no-region) is in the smoke test.ObjectStore(links catalog, LFS volume, S3 client, replicated) andBlobStore(dir, memory, LFS) are decorators behind one interface. Every setting is a flag or an environment variable.parity/features.json: implemented in all three. The LFS options are refused in C#/JS with a message that names the Rustclink.Reproduce and verify
Every mode, driven with boto3 and the AWS CLI (Rust primary with a JavaScript replica here; any
clinkcommand works):Deployments (image, Compose with a restart, RAM, replicated, Swarm, and Kubernetes on kind):
examples/object-storage/deploy/smoke-deploy.sh compose # also ram, replicated, swarm, k8s-base, k8s-memory, k8s-replicatedTests:
CI runs all of this.
.github/workflows/object-storage.ymlhas these jobs:modes: every Rust mode, with boto3 and the AWS CLI.ports: the C#clinkwith a JavaScript replica, and the JavaScriptclinkwith a C# replica.Local checks
cargo fmt --checkis clean.cargo clippy --all-targets --all-features -D warningsis clean.object_storagelib tests pass.cargo check --target wasm32-unknown-unknownpasses.bun test) and Deno 2.9.7 (deno test).npm run test:differentialagainst the Rustclinkand theunit_store_tracedriver: 139 pass, 0 skipped.check-latest-dependencies.mjsexits 0, with two dependencies held back by open issues (Port platform-trees 0.3.6 tree balancing to the JavaScript unit store #218 and minicov 0.3.9 is blocked by wasm-bindgen-test pinning =0.3.8 #219).node --test .github/scripts/*.test.mjs js/test/*.test.mjs csharp/scripts/*.test.mjspasses 438 tests, including the workflow policy, repository layout and parity tests.smoke-all-modes.shexits 0 for four combinations:swarmdeployment passed insidedocker:dind. The sandbox's Docker daemon runs with--live-restore, which Swarm refuses.kubectl kustomize, and the real deployment runs in CI on kind (theContainer image (k8s)job).pre-commitis not installed in this environment, so the hooks did not run. Before each commit I ran their checks by hand instead:cargo fmt,cargo clippy,dotnet format, the node tests, the JavaScript quality check, the secrets scan and the Python quality check. Commits used standard Git invocations, with no hook bypass flags.dotnet format csharp --verify-no-changesran only on the changed C# files, using--include, and they are clean. The local SDK is 10.0.112, while CI pins 10.0.403, and the older SDK reports 273 style complaints in 21 files this PR does not touch. CI'sdotnet formatruns on the pinned SDK.Not done
These go beyond what the issue asks for. The "Limits" section of
docs/OBJECT-STORAGE.mdlists them:501 NotImplemented, as in Swift s3api and Garage.links-fshas no bindings for them. The manifest records it, and both CLIs point to the Rustclink.Other changes
The PR also refreshes a few dependencies that the Security and Dependencies audits flagged on this branch:
sha20.11.3, replacing a yanked version.cross-spawn7.1.2, for an advisory.lucide-react.globals17.15.0 andtaiki-e/install-actionv2.90.12, which the Dependencies audit flagged as outdated.Fixes for problems that CI found on other runtimes and platforms:
js/polynomial-redosregexes, one trimming quotes and one trimming trailing slashes. Both are now linear scans, with tests on 100,000-character inputs.node:httpdoes not see an idle socket until a request arrives on it. The idle-connection test now sends a request first. Two experiments inexperiments/issue-216/(bun-http-idle-close.mjsandbun-http-keepalive-close.mjs) show this behaviour.socket.end(bytes). The network tests now send withsocket.write.--s3-blobs C:\datawas split at the drive colon and rejected as the kindC. A one-letter kind is now read as a drive letter in all threeclinkimplementations, with a test in each.smoke-all-modes.shstops its servers before it removes their folder.Dependency pins, each linked to an issue it depends on:
platform-treesstays at 0.3.5, the version main uses:platform-trees = "=0.3.5" # held back: #218. An earlier commit here updated it to 0.3.6, which rebalances the doublets trees differently. The Rustclinkthen wrote database files that the JavaScript unit store (a port of 0.3.5) no longer matched, and 12 of the 19 tests intest/differential/doublets-storage.test.mjsfailed. They all pass on 0.3.5. Port platform-trees 0.3.6 tree balancing to the JavaScript unit store #218 tracks porting the new balancing to JavaScript.check-latest-dependencies.mjsread an exact=requirement as no version at all, so it skipped such pins without saying so. It now compares them; this is covered by a test. That also surfacedminicov = "=0.3.8"inrust/wasm/Cargo.toml: everywasm-bindgen-testrelease up to 0.3.80 requires exactly 0.3.8, so it is held back by minicov 0.3.9 is blocked by wasm-bindgen-test pinning =0.3.8 #219.The version bumps: