9163dbcb

By: Michael Lynch <git@mtlynch.io>

Exercise production adapters in a reproducible test tier

The unit and browser suites left important production boundaries largely untested: AWS SDK request construction, SMTP STARTTLS and authentication, real ffprobe output, command exit behavior, and race-enabled reproducible Go checks. Failures in those paths could reach deployment despite strong business-logic coverage.

Litestream separates fast unit tests, backend contract tests, tagged integrations, provider tests, and nightly race or soak jobs. Its S3 tests use local HTTP servers to inspect actual SDK requests, while heavier suites are selected explicitly. Adopt that tiering without copying Docker, real-cloud, sleep-driven, or soak complexity that is disproportionate for this service.

Add integration-tagged loopback tests for S3 request method, key, headers, and body; a local TLS SMTP peer that verifies STARTTLS, credentials, envelope, and message content; a real ffprobe test against the fixed video fixture; and a Tinybeans CLI subprocess flow. A non-Nix runner owns the tagged command, and a new integration-tests flake package supplies pinned operational dependencies. The existing Nix go-tests target now uses the repository's --full mode so race detection and coverage share the canonical test script.

The main implementation issues were making protocol tests realistic without becoming flaky. SMTP required a test certificate authority trusted through SSL_CERT_FILE rather than disabling verification. Servers signal readiness through successful Listen and communicate through channels with deadlines instead of sleeps. The Nix fileset had to include tagged tests, fixtures, scripts, and command inputs, while keeping external programs out of the normal unit tier. Race checks increase CI cost but remain isolated from local fast tests.

No external blockers were encountered. Focused integrations, the non-Nix integration runner, full Go checks, the integration Nix target, and every flake target passed before the amendment.
configuredevShellx86_64-linuxbackendbackend-devcheck-bashcheck-frontendcheck-go-formattingcheck-go-test-packagescheck-trailing-newlinecheck-trailing-whitespacedeploy-to-flydiagramdocker-imagee2e-testsgo-testsimport-from-tinybeansintegration-testsjs-testslint-sqllittle-momentslittle-moments-devx86_64-linux