Skip to content

Mock provider: request-shape strictness — non-integer/string ids and missing params #79

Closed

Description

@e54-bot

Audit findings L1 + L2 — verified live.

Problem

  • server.rs:127-139 accepts any JSON Number as a request id — "id": 1.5 is accepted and echoed though spec §4 requires integer or string — and maps "id": true / [1] / {} to notificationNotSupported even though those messages have an id (spec-literal answer: -32600 Invalid Request).
  • server.rs:140 defaults a missing params to {} — {"method":"lpp/shutdown"} without params succeeds though §4 marks params REQUIRED.

Acceptance criteria

  • Non-integer/non-string ids (including floats) -> -32600; absent/null id keeps the pinned notificationNotSupported path.
  • Requests missing params are rejected consistently with the schema (-32602).
  • Regression tests + green suite.

Activity

  1. added
    bugSomething isn't working
    ready-for-implementationContract settled; an Engineer can implement without inventing a decision
    on Oct 15, 2026
  2. e54-bot commented on Oct 15, 2026

    @e54-bot
    ContributorAuthor

    Fixed in #86 (commit 51639cb).

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

    bugSomething isn't workingready-for-implementationContract settled; an Engineer can implement without inventing a decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions