Skip to content

Seven build-tagged test suites are compiled and never executed, including the only live AWS conditional-write verification #570

Closed

Description

@scttfrdmn

The gap

ci.yml's build-tags job runs go vet -tags=<tag> ./... for seven tags:

tag: [aws_s3, benchmark, distributed, e2e, integration, fuse_mount, s3compat]

go vet type-checks. No CI job executes any of them. So seven suites are compile-gated only, and
CLAUDE.md's standing requirement for "a comprehensive live integration test suite" is currently
satisfied by a suite that compiles.

Compiling them is deliberate and worth keeping — docs/design/conditional-write-compatibility.md says
so explicitly, and it is the reason those tags have not rotted the way four others in this repo did.
The gap is that compiling is where it stops.

Evidence that this is costing something, and that it is close to free to fix

I ran the integration tag against real AWS today — AWS_PROFILE=aws AWS_REGION=us-west-2 go test -race -tags=integration ./internal/storage/s3/, the exact command conditional_live_test.go's own
header documents. First time it has ever been executed. All eight tests pass, no data races, 9.3
seconds wall, and the test created and removed its own bucket, leaving nothing behind:

--- PASS: TestLiveConditionalWriteCapabilityIsDetectedOnRealS3 (1.27s)
--- PASS: TestLiveIfMatchOnAnAbsentKeyIsNotFoundNotPreconditionFailed (1.29s)
--- PASS: TestLiveIfNoneMatchDeclinesAnExistingKeyAndStoresNothing (1.49s)
--- PASS: TestLiveConcurrentAbsentWritersElectExactlyOne (1.61s)
--- PASS: TestLiveIfMatchSucceedsOnTheCurrentETagAndFailsOnAStaleOne (1.63s)
--- PASS: TestLiveConditionalMultipartWriteIsStillConditional (3.78s)
--- PASS: TestLiveMultipartCopyPreservesEverything (5.05s)
--- PASS: TestLiveMultipartCopyLeavesNoOrphanedUploadWhenCompleteFails (7.77s)
ok  github.com/scttfrdmn/objectfs/internal/storage/s3  9.315s

That is nine seconds and a handful of PUTs standing between this project and continuous verification of
its only correctness-critical AWS-specific capability. Per CLAUDE.md, a correctness capability fails
closed — conditional writes return ErrNotSupported when the probe fails — and everything in the CAS
series rests on four behaviours of the real service that an emulator can only imitate: that
If-None-Match: * on an existing key is 412 and writes nothing, that If-Match on an absent key is
404 rather than 412, that a precondition on CompleteMultipartUpload is evaluated at all, and that S3
itself arbitrates a genuine race. The hermetic suite asserts all four against substrate. Substrate
agreeing is necessary and not sufficient — which is the reason that file exists, and the reason it
should run.

It passing on first execution is good news and is also the point: nobody knew.

Proposed split, by what each tag needs

Tag Needs Proposal
integration AWS credentials Scheduled + workflow_dispatch, OIDC role. Highest value — this is the conditional-write verification
aws_s3 AWS_PROFILE + OBJECTFS_TEST_BUCKET, skips without Same job. Note it skips rather than fails without the bucket, so it must be asserted to have actually run
e2e nothing evident — no Getenv, no credential check Should run on every PR. Investigate first; if it is hermetic there is no reason it is not already a required check
distributed substrate, in-process Should run on every PR. Hermetic
fuse_mount /dev/fuse — which ubuntu-latest has Already #543
s3compat a MinIO/RGW/Wasabi endpoint Scheduled, MinIO in a service container for the row that can be automated
benchmark nothing Already #568

e2e and distributed are the ones to be embarrassed about: if they are hermetic, they are free, and
they have been compiled-not-run for as long as the job has existed.

The gate that keeps it fixed

A per-tag list is an enumerated gate, so the same reasoning as #565 applies: a test should assert that
every tag appearing in a //go:build line in a _test.go file is executed by some workflow, not
merely vetted, with a non-vacuity floor on the number of tags discovered. Otherwise the eighth tag
someone adds joins the compile-only list silently.

Acceptance criteria

  • Whether e2e and distributed are hermetic is established by running them; if so they become required checks
  • A scheduled job executes integration against real AWS via OIDC, and fails if zero tests ran
  • aws_s3's skip-without-bucket path cannot be mistaken for a pass
  • A test asserts every build-tagged test suite is executed somewhere, not just vetted
  • That test has a non-vacuity floor on the number of tags found

Activity

  1. added
    type: testing
    priority: high
    area: s3
    area: tests
    effort: large
    area: ci-cd
    on Sep 30, 2026
  2. scttfrdmn commented on Sep 30, 2026

    @scttfrdmn
    OwnerAuthor

    Measured: e2e and distributed are hermetic, so two of the seven are free

    The first acceptance criterion is answered. Both tags pass with credentials denied outright, not
    merely absent — AWS_CONFIG_FILE=/dev/null, AWS_SHARED_CREDENTIALS_FILE=/dev/null,
    AWS_EC2_METADATA_DISABLED=true, and AWS_PROFILE / AWS_REGION / the key variables unset with
    env -u:

    $ env -u AWS_PROFILE -u AWS_REGION -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY \
        AWS_EC2_METADATA_DISABLED=true AWS_CONFIG_FILE=/dev/null \
        AWS_SHARED_CREDENTIALS_FILE=/dev/null go test -race -tags=e2e ./...
    ok  ...  (every package, 0 failures)
    
    $ ... -tags=distributed ./...
    ok  ...  (every package, 0 failures)
    

    Denying rather than unsetting matters here: an unset AWS_PROFILE still lets the SDK fall through to
    ~/.aws/credentials and then to instance metadata, so a suite that quietly used ambient credentials
    would still have passed. Pointing both credential files at /dev/null and disabling the metadata
    endpoint removes every fallback, and the suites are green anyway. They genuinely need nothing but
    substrate.

    So these two should become required checks on every PR, and that is a small change — a job that
    runs go test -race -tags=<tag> ./..., nothing else. No secrets, no OIDC role, no scheduling question,
    no cost. They have been compiled-not-run for as long as build-tags has existed, and the reason is
    that nobody checked whether they needed anything; per [[ubuntu-latest-has-dev-fuse]], an unprobed
    assumption about what a test requires is the kind that removes its own contradiction.

    Worth splitting this pair out of this issue and landing it first — it is the cheapest genuine increase
    in what CI verifies that is currently available, and it does not depend on the credential and
    scheduling design the integration / aws_s3 / s3compat rows need.

    Caveat on the numbers

    This was measured on darwin. Per the per-package coverage lesson, internal/fuse compiles different
    files on linux, so "hermetic" is established here but "passes on ubuntu-latest" is a separate claim —
    exactly the distinction #543 is careful about for fuse_mount. Expect the CI job to be the thing that
    confirms it, and read its first run rather than assuming.

  3. scttfrdmn commented on Oct 18, 2026

    @scttfrdmn
    OwnerAuthor

    Verified complete. This was auto-closed by #616's merge (19:15 UTC) before its own acceptance criterion was met. The PR body said "Refs", but also said this issue "closes once" a run passed, and GitHub took that as a closing keyword. The first live run after that merge then failed aws_s3 on a skip, fixed in #617. This is the verification that should have closed it.

    All seven build tags now run somewhere; benchmark remains, deliberately, as #568.

    Tag Where it runs Required on PRs
    e2e tagged-suite (e2e), every PR ✅
    distributed tagged-suite (distributed), every PR ✅
    s3compat tagged-suite (s3compat), every PR, MinIO built from pinned source ✅
    fuse_mount fuse-mount, every PR, real mount (#543) ✅
    integration live-aws.yml, daily + dispatch, real AWS via OIDC n/a (never on PRs, by design)
    aws_s3 live-aws.yml, same n/a
    benchmark not run: timing on shared runners is noise #568

    Verified on main: dispatched run 39165959607 on 108fbf60 passed both cells. integration passed 11/11 under the narrow role, conditional-write checks included. aws_s3 passed 12/12 subtests. Zero skips, and no objectfs-live-* bucket left.

    Every suite was red on its first execution. None was a production bug; all were rot from never running:

    Acceptance criteria:

    Access: role objectfs-ci-live-s3, defined in deploy/aws/ci-live-s3/. Trust accepts only repo:scttfrdmn/objectfs:ref:refs/heads/main; permissions are S3 on objectfs-live-* only. The ARN is in secret AWS_LIVE_ROLE_ARN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ci-cdarea: s3area: testseffort: largepriority: hightype: testing

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions