Skip to content

M2: curated mutually-exclusive query parameters — order+cursor refusal at the route boundary (V10) #28

Closed

Description

@Blind-Striker

Source: multi-agent review of PR #26, adversarial verification (CONFIRMED, severity 2, shipped-runtime). 2026-08-14. M-anchor: M2 breadth continuation — opens with a small decision batch because it adds curation surface, and curation changes are API reviews (ADR-0008).

The pinned message-list contract says of cursor: "Do not combine with order" (spec/openapi.json:4182-4195), and the pinned server returns InvalidCursorError for the pair (packages/server/src/handlers/message.ts:34-40). The SDK sends ?order=asc&cursor=cur and lets the server refuse; Q77 precedent places known query invariants at the route boundary instead.

Verifier-endorsed direction (do NOT hand-patch generated routes, do NOT put a universal guard on the hand-written ListRequest — session-list legitimately composes both and its contract test pins that):

  1. Decision: an operation-level mutually-exclusive-query metadata row in fail-closed curation (OpenAPI carries this relation only as prose, so it cannot be derived mechanically).
  2. OperationPlanBinder validates the named properties against the selected operation.
  3. RoutesEmitter.EmitQueryComposition emits an ArgumentException guard before any query is built.
  4. Binder/emitter snapshot coverage + a ListMessagesAsync contract test proving refusal happens before a request is sent.

Activity

  1. Blind-Striker commented on Aug 15, 2026

    @Blind-Striker
    CollaboratorAuthor

    Sealed as the issue's verifier-endorsed direction (research log Session 24): an operation-level mutually-exclusive-query curation row, fail-closed binder validation, route-boundary ArgumentException before any request, plus the no-send contract test. Session-list's legitimate order+cursor composition stays untouched. Executes with the M2 breadth continuation per the M3 plan's interleave note.

  2. added a commit that references this issue on Aug 15, 2026
    f2a265b
  3. Blind-Striker commented on Aug 17, 2026

    @Blind-Striker
    CollaboratorAuthor

    Session 29 / ADR-0013 (7f771eb) supersedes this behavior-premised curation decision. The pinned OpenAPI carries the order+cursor relation only as prose, so #54 removes the local mutual-exclusion row and no-send guard. The server's declared InvalidCursorError remains on the typed error path. Historical landing evidence remains valid; this comment records the planned correction.

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

    needs-triageMaintainer needs to evaluate this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions