Skip to content

ci: run the hermetic e2e and distributed suites on every PR, and gate that every test tag is executed - #596

Merged
scttfrdmn merged 2 commits into
mainfrom
fix/570-run-hermetic-tagged-suites
Oct 9, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
fix/570-run-hermetic-tagged-suites

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Refs #570 (first half: the two tags that need nothing, and the gate). integration, aws_s3 and s3compat follow in separate PRs, since they need real AWS or an S3-compatible endpoint.

Both "hermetic" suites were red on their first run

Run tag-only, with -race and every AWS credential path denied, neither passed. The note on #570 that both were green was wrong.

  • e2e: 1 of 1 failing. Three stale assertions. Two pinned wording the code has since improved ("unsupported storage scheme" and "bucket name"; the messages now name the rejected scheme and say the URI names no bucket). One expected ObjectFS version where the binary prints objectfs version, lowercase on purpose since e8750eb, and ci.yml and the README depend on it. The validation assertions now check what the operator must be told, not the phrasing. 13/13 subtests pass.
  • distributed: 3 of 7 failing, every one asserting a leader. feat(cluster): make cluster.enabled actually start cluster coordination (#139) #401 made the consensus engine opt-in (EnableConsensus, off on a mount, since coordination is CAS) and kept it in the tree "because the -tags=distributed suite drives elections deliberately". Nothing in the suite turned it on. The three election tests now set EnableConsensus: true. 21/21 over -count=3.

Not production bugs; rot from never running. That's the point of #570.

New tagged-suite job

Matrix [e2e, distributed], contexts tagged-suite (e2e) and tagged-suite (distributed). It finds the packages and the tag-only tests itself (go test -list with and without the tag), runs them with -race and credentials denied, requires a PASS for each, and fails on any SKIP: these suites need nothing, so a skip means one has started depending on something, and a skip reports success.

Dry-running the step on macOS caught a bug first: BSD grep prints tests/x_test.go where GNU prints ./tests/…, and Go reads a bare tests as a standard-library path, so the tag-only list came out empty. Paths are now forced to ./dir.

TestEveryTestTagIsExecuted

Fails when a build tag used by a _test.go file is passed to no workflow's go test. Vetting doesn't count; that's what build-tags already does. It resolves literals, matrix.tag, and $TAG via step env. integration, aws_s3 and s3compat (#570) and benchmark (#568) are exempt with their issue, and an exemption fails once its tag is executed or no longer exists.

Mutation Result
distributed dropped from the matrix ❌ named
stale exemption for e2e ❌ named
a new tag no job runs ❌ named
-tags removed from fuse-mount's actual run ❌, third attempt
$TAG indirection broken ❌, third attempt

The last two survived twice. Each job runs go test -tags=… -list to discover tests, and the gate credited that line as an execution: first because -list wasn't checked at all, then because it was checked against a regex match that ends before -list. Listing isn't executing. Lines carrying -list are now skipped as whole lines.

After merge

These two contexts become required with the same append-only call used for fuse-mount, once they've reported on main.

🤖 Generated with Claude Code

… that every test tag is executed (#570)

ci.yml's build-tags job vets seven tags and runs none. Two of them, e2e and
distributed, need nothing, and both were red the first time they ran:

- e2e asserted wording the code had since improved past: "unsupported
  storage scheme" and "bucket name" for messages that now name the
  rejected scheme and say the URI names no bucket, and "ObjectFS version"
  for the lowercase line e8750eb made deliberate. The two validation
  assertions now check what the message must tell the operator rather
  than its phrasing.
- distributed waited on a consensus engine that #401 made opt-in while
  keeping it "because the -tags=distributed suite drives elections
  deliberately". Nothing in the suite turned it on. The three tests that
  assert an election now set EnableConsensus: true. Passes 21/21 over
  -count=3.

The issue's earlier note that both passed was wrong; run tag-only with
credentials denied, both failed.

New tagged-suite job, matrix [e2e, distributed], named tagged-suite (<tag>):
finds the packages and the tag-only tests itself, runs them with -race and
AWS credentials denied, requires a PASS for each, and fails on any SKIP. Its
package paths are forced to ./dir, because BSD grep prints tests/x where
GNU prints ./tests/x and go reads a bare tests as a standard-library path;
found by dry-running the step on macOS.

TestEveryTestTagIsExecuted fails when a build tag used by a _test.go file is
passed to no workflow's go test, resolving literals, matrix.tag, and $TAG
via step env. integration, aws_s3 and s3compat (#570) and benchmark (#568)
are exempt with their issues, and an exemption fails once its tag is
executed or gone. Floors: six tags in the tree, and fuse_mount and e2e
must resolve as executed.

Mutations: dropping distributed from the matrix, a stale e2e exemption, and
a new unexecuted tag each fail named. Removing -tags from the fuse-mount run
and breaking the $TAG indirection survived twice, because the go test -list
discovery line beside each was credited as an execution: once because -list
was not checked at all, then because it was checked against a match that
ends before -list. Lines carrying -list are now skipped, and both fail.
scttfrdmn added a commit that referenced this pull request Oct 9, 2026
… govulncheck findings (#597)

Security Scan's govulncheck step went red on every PR (first seen on #596,
whose diff touches none of this) once eight advisories were published
against what main builds with: GO-2026-6617, -6613, -6612, -6611, -6610,
-6608, -6607 and -6605, across net/http, net/textproto and crypto/tls in
go1.26.6, and golang.org/x/net v0.58.0. Each was reported with traces
reachable from ObjectFS code.

toolchain go1.26.6 -> go1.26.9, which is what CI's setup-go reads from
go.mod, and golang.org/x/net v0.58.0 -> v0.60.0 (pulling x/text v0.41.0 ->
v0.42.0). The go directive stays 1.26.0.

Verified locally under GOTOOLCHAIN=go1.26.9, not the machine's newer
default, which would mask the standard-library findings: govulncheck
reports no vulnerabilities, and go test -race ./... passes.
@scttfrdmn
scttfrdmn merged commit 493562d into main Oct 9, 2026
57 checks passed
@scttfrdmn
scttfrdmn deleted the fix/570-run-hermetic-tagged-suites branch October 9, 2026 16:51
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