Skip to content

docs: AWS S3 is the target, not a lowest common denominator (+ RustFS probed) - #391

Merged
scttfrdmn merged 3 commits into
mainfrom
docs/aws-s3-primary-thesis
Aug 8, 2026
Merged

scttfrdmn merged 3 commits into
mainfrom
docs/aws-s3-primary-thesis

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

What

States the project's support posture as a thesis, in README.md and CLAUDE.md:

AWS S3 is the primary backend and ObjectFS uses every S3 capability that benefits it. S3-compatible endpoints are best-effort and get a fallback or a lesser capability — they do not get a veto over what ObjectFS does on AWS.

Why this is documentation and not a behavior change

The code already works this way. The capability probe (types.BackendCapabilities), ErrNotSupported on an endpoint that fails it, and Transfer Acceleration's silent fallback all shipped in v0.12.0 or earlier. What was missing was the statement — so the next capability added had no rule to follow, and the docs had drifted in the opposite direction.

The part that is actually useful

Not the thesis sentence but the degradation rule, which the existing code already distinguishes and nothing had named:

Capability kind Endpoint lacks it Existing example
Performance fall back silently — slower is a correct outcome executeWithAccelerationFallback
Correctness fail closed, with an operator-facing reason conditional writes return ErrNotSupported

The second rule is the load-bearing one: a precondition an endpoint silently drops tells every contender for a lease that it won, so degrading it to keep the feature available on a non-AWS store trades the guarantee for the feature.

Capabilities are established by probing, never a config flag, endpoint-URL heuristic, or version string — a store that accepts a header and ignores it is indistinguishable from one that honours it by every means except the outcome.

One false claim removed

docs/index.md said "Universal compatibility: works with AWS S3, MinIO, Ceph, and all S3-compatible storage." That is the claim the thesis rejects, and it was also false in a way this repository had already measured — RGW 19.2.0 fails the conditional-write probe, so coordination declines to start there. The page title and overview also said "S3-Compatible Object Storage" where the project targets AWS S3.

Verification

  • go build ./..., gofmt -l, go vet ./... — clean (no code changed)
  • go test -count=1 -race ./internal/config/ — ok, which is where the CHANGELOG structural tests live
  • [email protected] --config .markdownlint.yaml on all three changed files — exit 0. Note the pinned hook version predates MD060; running a current markdownlint reports table-pipe-spacing errors across pre-existing tables, which is a linter-version artifact and not this branch
  • Grepped for surviving lowest-common-denominator claims; only historical CHANGELOG entries remain, which is correct — a changelog records what was published

Plain filesystem use is unaffected on any S3-compatible endpoint. What varies is coordination.

The support posture was implicit. The code already behaves this way — the
capability probe, ErrNotSupported on an endpoint that fails it, and Transfer
Acceleration's silent fallback all shipped in v0.12.0 or earlier — but nothing
stated it, so the next capability had no rule to follow and the docs had drifted
the other way.

README.md and CLAUDE.md now state the thesis and, more usefully, the two
degradation rules the existing code already distinguishes:

  - a performance capability falls back silently, because slower is a correct
    outcome (executeWithAccelerationFallback), and
  - a correctness capability fails closed, because a precondition an endpoint
    silently drops tells every contender for a lease that it won.

Capabilities are established by probing the endpoint — never a config flag, an
endpoint-URL heuristic, or a version string, since a store that accepts a header
and ignores it is indistinguishable from one that honours it by every means
except the outcome.

docs/index.md claimed "Universal compatibility: works with AWS S3, MinIO, Ceph,
and all S3-compatible storage". That is the claim the thesis rejects, and it was
also false in a way this repository had already measured: RGW 19.2.0 fails the
conditional-write probe, so coordination declines to start there. Its title and
overview said "S3-Compatible Object Storage" where the project targets AWS S3.

No code changes; no behavior changes. Plain filesystem use is unaffected on any
S3-compatible endpoint — what varies is coordination.
Run, not read. Same s3compat suite that produced the AWS, MinIO and RGW rows,
pointed at a local rustfs/rustfs container, plus the four cells the suite does
not print measured directly.

RustFS 1.0.0-beta.12 is the first non-AWS endpoint probed here that matches AWS
on every cell, including the two RGW gets wrong:

  - If-Match against an absent key is 404 NoSuchKey, not 412. That is the
    distinction every CAS loop is built on — the object is gone, stop, versus
    you lost a race, retry.
  - A precondition on CompleteMultipartUpload is evaluated, so a conditional
    write above the multipart threshold stays conditional. This is the dangerous
    cell: RGW answers success and the contender's bytes land.

It also honors a conditional DeleteObject, where MinIO and RGW both accept the
header and delete anyway, and it accepts the quoted ETag it returned, so
PutObjectIf works with the value the store gave it and needs no client-side
reformatting. Multipart ETags are dash-suffixed as on AWS and usable in a later
If-Match. The capability probe reports ConditionalWrite=true and
TestCompatCapabilityProbeMatchesObservedBehavior confirms it agrees with the
endpoint.

Recorded with the image digest and revision because beta.12 is a pre-release:
the row states what that build did on 2026-08-08, not what RustFS guarantees.

Two things I checked rather than assumed:

  - Each cell was re-probed on its own key. My first pass reused one key across
    cells, so an earlier successful write moved the ETag and the "bare hex
    digest" cell measured staleness instead of quoting. With separate keys it is
    success, as on AWS.
  - The regression guard fires. Forcing distinguishesAbsence=false — RustFS
    regressing to RGW's absent-key behavior while the probe still reports
    capable — fails with the expected enforces-absence=true
    distinguishes-absent-from-stale=false message. Restored, it passes. Stable
    across -count=3.

No production code changes; the suite diff is the run instructions only.
@scttfrdmn scttfrdmn changed the title docs: AWS S3 is the target, not a lowest common denominator docs: AWS S3 is the target, not a lowest common denominator (+ RustFS probed) Aug 8, 2026
@scttfrdmn

Copy link
Copy Markdown
Owner Author

Added: RustFS probed and added to the matrix

Same s3compat suite that produced the AWS, MinIO and RGW rows, pointed at a local rustfs/rustfs container. RustFS 1.0.0-beta.12 is the first non-AWS endpoint probed here that matches AWS on every cell, including the two RGW gets wrong:

Check AWS MinIO RGW 19.2.0 RustFS beta.12
If-Match, key absent 404 NoSuchKey 404 NoSuchKey 412 404 NoSuchKey
Precondition on CompleteMultipartUpload 412, holder intact 412, holder intact success — contender's bytes land 412, holder intact
DeleteObject with stale If-Match 412, object survives success — deleted success — deleted 412, object survives
Quoted ETag in If-Match success success 412 success
Probe verdict supported supported unsupported supported

It accepts the quoted ETag it returned, so PutObjectIf works with the value the store gave it — no client-side reformatting, which is the workaround I'd argued against for RGW. Multipart ETags are dash-suffixed as on AWS and usable in a later If-Match.

Recorded with the image digest and revision because beta.12 is a pre-release: the row states what that build did on 2026-08-08, not what RustFS guarantees.

Two things checked rather than assumed

My first probe pass had a bug and I re-ran it. I reused one key across cells, so an earlier successful write moved the ETag and the "bare hex digest" cell measured staleness rather than quoting — it reported 412. Re-probed with a separate key per cell and a freshly-read ETag: success, as on AWS. The matrix has the corrected value.

The regression guard fires. Forcing distinguishesAbsence = false — RustFS regressing to RGW's absent-key behavior while the probe still reports capable — fails with:

the capability probe reports conditional writes supported, but this endpoint
enforces-absence=true distinguishes-absent-from-stale=false
enforces-multipart-precondition=true

Restored, it passes. Stable across -count=3. So a later beta regressing shows up as coordination declining to start, not as two lease holders.

Verification

  • go vet -tags=s3compat ./internal/storage/s3/ clean — the s3compat CI cell still compiles
  • go build ./..., gofmt -l internal/ clean; no production code changed
  • go test -count=1 -race ./internal/config/ ok (CHANGELOG structural tests)
  • [email protected] --config .markdownlint.yaml on all four changed markdown files — exit 0
  • Throwaway probe file deleted; the suite diff is run instructions only (8 added comment lines)

@scttfrdmn
scttfrdmn merged commit bddfdfb into main Aug 8, 2026
35 checks passed
@scttfrdmn
scttfrdmn deleted the docs/aws-s3-primary-thesis branch August 8, 2026 23:56
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