Skip to content

Apply optional polish from PR #1 sidecar review - #2

Open
shadowbrush wants to merge 1 commit into
mainfrom
polish/resend-review-followups
Open

Apply optional polish from PR #1 sidecar review#2
shadowbrush wants to merge 1 commit into
mainfrom
polish/resend-review-followups

Conversation

@shadowbrush

Copy link
Copy Markdown
Member

Overview

Follow-up to the PR #1 sidecar review. The four blocking items the review recommended (prototype-safe operation lookup, 128kb body limit, parser-error mapping to validation_error, closing out the Zod-v4 false positives) already landed in merged PR #1. This PR takes the remaining optional "Additional observations."

What changed

  • src/resend.ts — Log a logger.warn (status only, never the body) when a non-JSON provider response is swallowed. Previously the failure was silent until id-extraction mapped it to upstream_unreachable; the warning aids debugging without leaking payload contents.
  • src/errors.ts + tsconfig.json — Add the override keyword to the four extraFields() overrides and enable noImplicitOverride, so the compiler enforces it rather than leaving it to chance if the base method ever changes.
  • README.md — Document a manual staging smoke test against real Resend before cutting a release (the suite uses an injected fake fetch and never hits the network).

Deliberately skipped

  • Idempotency-key charset — intentionally tighter than Resend's own spec (defensive); awareness-only in the review.
  • stdout.write test spy — the existing log-leak assertion already covers body + logs; no change needed.

Verification

  • npm run typecheck — clean (confirms noImplicitOverride is satisfied)
  • npm test — 31/31 pass

🤖 Generated with Claude Code

The four blocking review items already landed in the merged PR #1. This
addresses the remaining optional "Additional observations":

- resend.ts: log a warning (status only, never the body) when a non-JSON
  provider response is swallowed, to aid debugging the upstream_unreachable
  path.
- errors.ts + tsconfig.json: add `override` to the four extraFields()
  overrides and enable noImplicitOverride so it stays enforced.
- README.md: document a manual staging smoke test against real Resend
  before cutting a release.

Skipped the awareness-only items (idempotency-key charset is intentionally
tighter than Resend's spec; existing log-leak assertion is sufficient).

Typecheck clean, 31 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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