Skip to content

[Bug]: urlcode review misses request.json() hand-validation and constant-response functions #556

Closed

Description

@jimhoyd

Runtime revision and environment

main at 645239b (static source review plus local synthetic checks). Node 22/26, macOS. Deployment: not applicable.

Minimal reproduction

packages/core/src/review.ts:36-38 flags hand validation only when it sees a literal JSON.parse(. The usual await request.json() passes, and there is no rule for a function that returns a fixed response. urlcode review reports 0 observations on recipes contact-form, static-plus-api, cors-api, webhook-receiver and middleware, each of which has a declarative replacement.

Relevant output

node packages/core/src/cli.ts review --project recipes/contact-form → no observations.

Suggested fix

Match request.json()/.json() followed by field checks, add a constant-response rule, and use those recipes as fixtures (before converting them, or as frozen copies under test/fixtures).

Activity

  1. added
    bug
    ai-first
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions