Skip to content

[codex] Cover request id echo and correlation#220

Open
pq198363-ops wants to merge 1 commit into
Agentpay-Org:mainfrom
pq198363-ops:bounty-154-request-id-coverage
Open

[codex] Cover request id echo and correlation#220
pq198363-ops wants to merge 1 commit into
Agentpay-Org:mainfrom
pq198363-ops:bounty-154-request-id-coverage

Conversation

@pq198363-ops

Copy link
Copy Markdown

Summary

  • Adds focused Supertest coverage for X-Request-Id echo, minting, and error-body correlation.
  • Covers caller-provided ids, missing ids, overlong ids, supplied-id 404 correlation, and minted-id 404 correlation.
  • Keeps production behavior unchanged.

Closes #154

RED / GREEN evidence

  • RED coverage gap: after a clean build, node --test dist/request-id-echo.test.js failed because the focused request-id coverage file did not exist.
  • GREEN focused: npm run build; $env:NODE_ENV='test'; node --test dist/request-id-echo.test.js passed 5 tests.

Verification

  • npx prettier --check src/request-id-echo.test.ts
  • npm run lint
  • clean dist/, then npm run build
  • $env:NODE_ENV='test'; node --test dist/*.test.js dist/**/*.test.js (94 tests, 11 suites, 94 pass, 0 fail)
  • git diff --check

Note: on Windows PowerShell I used the direct $env:NODE_ENV='test'; node --test ... equivalent after npm run build because the package npm test script uses POSIX-style NODE_ENV=test syntax.

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.

Add coverage for the X-Request-Id echo, mint, and correlation behaviour

1 participant