Add Resend email capability tool - #1
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces hadrontool-resend, a stateless microservice designed to send emails via Resend. The implementation includes Express-based routing, Zod configuration and input validation, a custom structured logger, and robust error handling. Feedback on the changes highlights critical runtime bugs in Zod usage, specifically the incorrect use of z.email() and z.flattenError. Additionally, improvements are suggested to prevent prototype pollution when looking up operations, and to increase the Express JSON body parser limit to 128kb to safely accommodate large multi-byte email bodies.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b556f3457
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
From Claude Code: Code Review: PR #1 — Add Resend email capability tool Overview Introduces hadrontool-resend, a stateless, DB-less internal microservice that sends email via Resend on behalf of hadron-server-authorized requests. Well-scoped MVP: single POST Prior review feedback — my take The auto-reviewers flagged several items. Verifying against package.json (zod ^4.3.6) and the tests-pass status:
Additional observations
Style / conventions Consistent with the "capability tool" pattern: injectable ResendDeps, no state, typed catalog, DB-free. Comments explain why (security intent, non-obvious constraints), not what. Recommendation Ship after taking the four legitimate items (prototype-safe lookup, 128kb body limit, parser-error mapping, and closing out the false-positive reviews so they don't sit as noise on the |
What changed
POST /ops/send-emailplus health and discovery routesRESEND_API_KEY+RESEND_FROMfallback configuration for core-approved pilot organizationsWhy
Headless Hadron runs need a provider-isolated way to send outbound email without making the platform Resend account the normal multi-tenant path.
hadron-serverowns encrypted organization credentials, identity, policy, quota, ticket authorization, and platform-fallback admission; this sidecar only uses the selected credentials for an already-authorized Resend request.Validation
npm test— 25 tests passednpm run typechecknpm run build