Summary

  • Add focused src/index.test.ts coverage for the Worker entrypoint: CORS preflight short-circuiting, admin bearer auth, websocket query-token auth, source/cache metadata, and regional Durable Object lookup.
  • Fix a JWT auth context propagation bug where a verified JWKS payload was assigned after DataSource.context was created, so downstream RLS/context consumers could miss claims like sub.
  • Keep production behavior scoped to copying the authenticated context onto the existing data source before delegating to StarbaseDB.handle.

Validation

  • corepack pnpm exec prettier --check src/index.ts src/index.test.ts
  • corepack pnpm exec vitest run src/index.test.ts
  • corepack pnpm exec vitest run src/index.test.ts --coverage.enabled --coverage.include=src/index.ts --coverage.reporter=text
  • git diff --check

Notes

  • I also ran the full Vitest suite; it still reports existing unrelated src/rls/index.test.ts assertion failures around multi-table/subquery RLS rewriting. This PR only touches src/index.ts and adds src/index.test.ts.
  • Non-UI/backend test change, so the verification commands above are the demo evidence.

/claim #71

Claim

Total prize pool $250
Total paid $0
Status Pending
Submitted May 27, 2026
Last updated May 27, 2026

Contributors

NA

Nacho Martinez

@jasperan

100%

Sponsors

OU

Outerbase (YC W23)

@outerbase

$250