Skip to content

Improve test coverage for storage package (0 tests, 1106 LOC) #24

Description

@BrewingCoder

Area

Backend — API / GraphQL

Category

Test coverage

Description

The storage package handles all session replay data, source maps, and assets across S3 and filesystem backends. It has zero dedicated tests — only indirect coverage via integration tests.

Priority test targets:

  1. S3Client / FilesystemClient parity — same inputs produce same outputs
  2. Brotli compression round-trip (compress → decompress)
  3. Gob encoding round-trip for raw events
  4. Session bucket versioning (v2/ prefix for sessions >= 150M)
  5. Source map Redis caching (read cached → miss → read from storage)
  6. CloudFront URL signing

Structural concerns:

  • Single 1,106-line file — should be split into S3Client, FilesystemClient, shared types
  • Default filesystem path is /tmp — not durable across restarts
  • No streaming — entire files loaded into memory (OOM risk for large sessions)
  • Gob encoding for raw events — not inspectable without Go tooling

See src/backend/storage/MODULE.md for full analysis.

Affected Files / Packages

src/backend/storage/storage.go (1,106 lines — single file, 0 tests)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions