AntFleet

Disagreement · f411be15-anthropic-4

Webhook 'install_created' uses welcomes[0]?.installationId for logging — undefined when array is empty but log still fires

solo Opus
repo e24ef98c·PR #11·reviewed 1 week ago

Opus finding

Webhook 'install_created' uses welcomes[0]?.installationId for logging — undefined when array is empty but log still fires

lowmaintainabilityhigh
  • apps/web/app/api/github/webhook/route.ts:201-214
If installCreatedTargets() returns [] (e.g., malformed payload, missing installation id, or no repositories), the log records installationId: null and repoCount: 0 with no indication of why. Operators looking at logs cannot distinguish 'install with no repos selected' from 'payload validation failed'. This impedes debugging install issues.

Recommendation

Differentiate the two cases — when typeof installation.id !== 'number', emit a logWarn('webhook.install_payload_invalid', …); reserve the success log for successful parses.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →