Skip to content

feat(api): add unified session debug endpoint#33

Merged
naory merged 2 commits intomainfrom
feat/session-debug-endpoint
Mar 8, 2026
Merged

feat(api): add unified session debug endpoint#33
naory merged 2 commits intomainfrom
feat/session-debug-endpoint

Conversation

@naory
Copy link
Copy Markdown
Owner

@naory naory commented Mar 8, 2026

Summary

  • add GET /api/sessions/:sessionId/debug as a single diagnostics endpoint returning session, grant, budget, decision, signedAuthorization, settlement, and timeline
  • add DB aggregation helper to assemble latest grant/decision/settlement context and keep timeline retrieval on existing ordered helper path
  • add route-level validation/auth behavior (400 malformed UUID, 401 when internal key required, 404 missing session) and structured fetch logging
  • add comprehensive route tests for debug response shape and error paths

Test plan

  • pnpm --filter api test -- test/routes/sessions.test.ts test/db/queries.session-events.test.ts

Made with Cursor

NAOR YUVAL added 2 commits March 8, 2026 20:48
Expose a single operator-focused session debug endpoint that aggregates session, grant, budget, decision, signed authorization, settlement, and timeline data for faster incident triage.

Made-with: Cursor
Add invariant evaluation to the session debug endpoint and include human-readable derived budget and settlement amounts plus a debugVersion contract field for tooling stability.

Made-with: Cursor
@naory naory merged commit 1c928d8 into main Mar 8, 2026
1 check failed
@naory naory deleted the feat/session-debug-endpoint branch March 8, 2026 19:08
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