Skip to content

Auth refactor 1/10 — Test harness + characterization tripwire #44

Description

@pranavp10

This ticket was generated by AI (to-tickets) from #43.

Parent

#43

What to build

A test safety net that exists before any auth code is moved. Wire up the repo's test runner (bun test) to run against ephemeral Postgres + Redis, and write characterization tests that pin the current behavior of the two stable contracts everything depends on: the auth service's get-session HTTP endpoint and API-key validation. These tests are the tripwire that proves the later unification is behaviour-preserving.

Acceptance criteria

  • bun test runs in CI and locally against ephemeral (containerized) Postgres + Redis, torn down after the run
  • Characterization tests for get-session: valid session, invalid/absent session, expired session
  • Characterization tests for API-key validation: valid key, invalid/malformed key, revoked/disabled key
  • All tests green against the current codebase (no production code changes in this ticket)
  • Tests assert only externally observable behavior (status + returned shape), not internals

Blocked by

  • None — can start immediately

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an AFK agent

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions