Skip to content

feat(j0di3): Forward Idempotency-Key and X-Request-ID through proxy#1145

Merged
jeromehardaway merged 1 commit into
masterfrom
feat/j0di3-proxy-idempotency-headers
Jun 10, 2026
Merged

feat(j0di3): Forward Idempotency-Key and X-Request-ID through proxy#1145
jeromehardaway merged 1 commit into
masterfrom
feat/j0di3-proxy-idempotency-headers

Conversation

@jeromehardaway

Copy link
Copy Markdown
Contributor

Summary

J0dI3's mutating endpoints (submit, score, rewrite, …) accept an Idempotency-Key for safe retries and echo X-Request-ID for support correlation, but the Next.js proxy was dropping both headers on every call. This wires them through the shared dispatch() so every troop and admin route benefits without per-endpoint changes.

What changed

  • src/lib/j0di3-proxy.tsdispatch() now forwards an incoming Idempotency-Key and X-Request-ID request header to J0dI3 when present, and surfaces J0dI3's echoed X-Request-ID back on the proxied response.
  • __tests__/lib/j0di3/j0di3-proxy.test.ts — added two regression tests: header forwarding alongside X-Troop-Token, and response-side X-Request-ID echo.

Test plan

  • npm test — full suite, 384/384 pass (9 in the proxy file)
  • npm run build — passes (the CI-gated check)
  • npx biome lint on changed files — 0 errors

Notes

  • This is a proxy-layer enhancement, not a new endpoint. An audit confirmed the troop-facing J0dI3 surface was already fully wired; this header passthrough was the one genuine gap.
  • No new env vars, routes, Swagger annotations, or Prisma migrations.

Mutating J0dI3 endpoints accept an Idempotency-Key for safe retries and
echo X-Request-ID for support correlation. The shared dispatch() now
forwards both request headers when present and surfaces the echoed
X-Request-ID on the proxied response.
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vets-who-code-app Ready Ready Preview, Comment Jun 10, 2026 2:55am

Request Review

@jeromehardaway jeromehardaway self-assigned this Jun 10, 2026
@jeromehardaway jeromehardaway merged commit d80e7c8 into master Jun 10, 2026
6 checks passed
@jeromehardaway jeromehardaway deleted the feat/j0di3-proxy-idempotency-headers branch June 10, 2026 02:57
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