Skip to content

fix(integrations): no-store the callback hand-off and trace chat callbacks as server spans - #1673

Merged
Makisuo merged 6 commits into
mainfrom
fix/oauth-state-browser-binding
Oct 22, 2026
Merged

Makisuo merged 6 commits into
mainfrom
fix/oauth-state-browser-binding

fix(integrations): never cache the callback hand-off, and trace chat …

37bcf04
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 22, 2026 in 46s

Confidence 9/10 · No issues found

🟢 Confidence 9/10 · safe to merge
The no-store/no-referrer hand-off is pinned by both router tests; only the new server-span kind and status attribute have no assertion.
no findings · tests partial −1 · risk medium · 1/1 new units observable

Routes every callback redirect through a shared forwardToDashboard that forbids caching and referrers, and gives the chat callbacks a server-kind span carrying route and 302 status. The change is small and safe.

  • forwardToDashboard sets cache-control: no-store and referrer-policy: no-referrer on callback redirects
  • ChatCallbackRouter emits a server-kind span with http.route and http.response.status_code: 302

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/api/src/routes/chat-integration.http.ts 895 GET 756/day, 1.9% err
GET 139/day, 0.0% err
What was checked
  • Suppression regex in api-observability.ts:18 matches both chat paths, so the new server span stays the trace root
  • Chat callback span status is 302 on every branch: toDashboard is the handler's only return (chat-integration.http.ts:49-64)
  • No import cycle: integrations-callback.http.ts does not import the chat router
Observability coverage: 1 of 1 changes observable
Change Kind Observable Evidence
chat connector callbacks (/oauth/chat/:connector/callback, .../identity/callback) inbound HTTP entrypoint yes ChatOAuth.callback / ChatOAuth.identityCallback server spans with http.route and status at apps/api/src/routes/chat-integration.http.ts:38-43

37bcf04 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.