Skip to content

suggested-binding-loop (b): unknown ?status on /security/suggested-bindings returns 200 empty instead of 400 (live REST route skips validation) #7678

Description

@huangyiirene

Symptom

GET /api/v1/security/suggested-bindings?status=garbage → 200 empty (same for ?status=PENDING) — which reads as "there are no suggestions", the failure mode the clause forbids. Expected 400 for an unknown status value.

Root cause

Located by the run. The live route is packages/rest/src/rest-server.tsregisterSecurityEndpoints, which forwards req.query.status through with no validation (rest-server.ts ~L9219: status: req.query?.status ? String(req.query.status) : undefined). The isSuggestionStatus 400 guard exists only on the parallel runtime dispatcher domain, whose own comment describes precisely this observed behaviour. The fix landed on the dispatcher path only — a dispatcher-vs-REST divergence in the opposite direction from the earlier /meta cases (where routes were on the dispatcher but never mounted on REST). Confirmed present on origin/main.

This strengthens the case for the route-ledger↔live-mount parity gate #7526, and argues that gate should cover behaviour divergence, not just mount presence.

Reproduction

  1. Stock boot; as admin GET /api/v1/security/suggested-bindings?status=garbage.
  2. Observe 200 with an empty list instead of 400.

Suggested fix

Apply the isSuggestionStatus validation (the same guard already on the dispatcher) on the live registerSecurityEndpoints REST route, returning 400 for an unknown ?status value.

Source

Extracted from the QA run #7637 (framework 92f26f7, console 09987b680).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions