Skip to content

ci: real-storage live test lane (TIN-1421) - #377

Merged
Jesssullivan merged 5 commits into
mainfrom
jess/ci-live-storage-tin-1421
May 19, 2026
Merged

ci: real-storage live test lane (TIN-1421)#377
Jesssullivan merged 5 commits into
mainfrom
jess/ci-live-storage-tin-1421

Conversation

@Jesssullivan

@Jesssullivan Jesssullivan commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

First concrete step on TIN-1421 (Urgent): brings up SeaweedFS + NATS in CI via the project's existing docker-compose stack and runs cargo test -p tcfs-e2e --test fleet_live with TCFS_E2E_LIVE=1.

This closes the trust-boundary gap from the 2026-05-18 audit: until now, the live-fleet tests only ran on operator-driven runs against neo/honey/yoga, so PRs could land broken sync paths and ci.yml would stay green.

Design choices

  • Compose-managed services (not GH Actions services:) keeps docker-compose.yml as the local + CI source of truth.
  • CI override file removes the NATS CLI flag that newer images reject and gives SeaweedFS writable volume capacity.
  • Subset only: masters + volume + filer + NATS. Prometheus/Grafana are observability, not the tested path.
  • Localhost forwards: TCFS_S3_ENDPOINT=http://127.0.0.1:8333, TCFS_NATS_URL=nats://127.0.0.1:4222.
  • Path-filtered triggers: crate/test/config/compose/workflow changes only.
  • Explicit bucket pre-create surfaces auth/config errors before cargo tests.
  • Compose logs on failure are uploaded for triage.

Validation

  • ~/.cargo/bin/cargo test -p tcfs-e2e --test fleet_live --no-run
  • CI Live Storage run 26066979207: fleet_live tests against compose-managed SeaweedFS + NATS passed in 6m34s
  • Remaining standard PR checks green

Follow-up

  • Fault injection / Toxiproxy lane
  • Linux postinstall smoke chain can reuse this backend
  • Deliberately broken push-path canary after landing to prove the lane fails for the right reason

Brings up SeaweedFS + NATS via the existing docker-compose stack inside
the job (subset: masters + volume + filer + nats — no prometheus/grafana
since those aren't on the test path), waits for health, creates the
tcfs S3 bucket, then runs `cargo test -p tcfs-e2e --test fleet_live`
with TCFS_E2E_LIVE=1 + endpoints pointing at localhost forwards.

Closes the trust-boundary gap from the 2026-05-18 audit: PRs touching
sync code paths now exercise real S3 + JetStream behavior in CI,
not just inline unit tests. fleet_live's five tests (push/pull
roundtrip, storage outage recovery, NATS pub/sub, durable consumer
replay, neo-honey two-device smoke) all run.

Triggers on PR + push to main with path filters scoped to relevant
crates/tests/config/workflow paths. workflow_dispatch for manual runs.

On failure, uploads `docker compose logs` for each service as an
artifact for triage.

Refs TIN-1421, related to TIN-133 (eliminates the recurring
external-endpoint dependency that burned 5 smoke dispatches today).
curl -sf suppresses --write-out on HTTP error responses, so the
403-from-/-without-creds case (SeaweedFS's correct "service up"
signal) printed nothing and the grep never matched. First CI run
on this branch timed out after 3 minutes despite seaweed-filer
logs showing "Start Seaweed S3 API Server ... at http port 8333"
within seconds of compose up.

Drop -f, capture the code into a shell var, case-match accepted
responses (200/301/302/307/403/404). Echo the last code on each
retry so failures are diagnosable from the log.
Shared docker-compose.yml passes `--max_payload 8MB` to nats-server,
which is rejected on current nats:2.10-alpine (CLI flag not defined;
must be configured via -c config file). Locally `task dev` works
against a cached older image; CI pulls fresh and the nats container
exits with usage help instead of starting.

CI workflow now writes .github/compose-overrides/ci.yml on the fly
with a minimal nats command (no --max_payload), and brings up the
stack with both docker-compose.yml + the override. Does not touch
the shared compose so local dev is unaffected.

Followup TIN: decide whether to fix the shared compose (mount a
config file with max_payload=8MB) or accept the default 1MB
payload limit globally.
@Jesssullivan

Copy link
Copy Markdown
Owner Author

Review pass after the CI peel-back:

  • The workflow is doing the right thing for TIN-1421: repo-managed compose stack, narrow CI override for current SeaweedFS/NATS image behavior, explicit S3/NATS health gates, bucket pre-create, and compose logs on failure.
  • The test change is also correct. live_storage_outage_leaves_no_remote_index_and_recovers asserts remote index publication, so using upload_file_with_device(..., NEO_DEVICE, Some(rel_path), None) is the right API; the old manifest-only helper made the recovery assertion false even when upload recovered.
  • Validation so far: local cargo test -p tcfs-e2e --test fleet_live --no-run passed, and CI Live Storage run 26066979207 passed fleet_live against compose-managed SeaweedFS + NATS in 6m34s.

No blocking review findings from this pass. Still waiting on the standard Nix/Nix-CI checks before marking ready/mergeable. After landing, we should run one deliberate broken-push canary to prove the lane fails red for the right class of sync break.

@Jesssullivan
Jesssullivan marked this pull request as ready for review May 19, 2026 01:12
@Jesssullivan
Jesssullivan merged commit 462e259 into main May 19, 2026
23 of 28 checks passed
@Jesssullivan
Jesssullivan deleted the jess/ci-live-storage-tin-1421 branch May 19, 2026 01:13
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