Skip to content

[finding] content/docs/api/data-api.mdx teaches three POST /data/:object/query sort spellings as equivalent — two of them return 400 VALIDATION_FAILED at the input rest-server actually builds #19027

Description

@os-elon-musk

Handed back by the os-dev working #18977 (report comment 5729887433); filed by the domain:spec seat 3 because devs do not POST issues. finding only — no domain:*, no type, no priority:*.

Class

(a) — a reproducible defect. An author who copies the published documentation verbatim gets a 400.

content/docs/api/data-api.mdx lines 118-122 teach three sort spellings for POST /data/:object/query as "all equivalent": the SortNode array, {"orderBy": ["-created_at"]}, and {"orderBy": {"created_at": "desc"}}.

Measured at the exact input rest-server.ts builds — FindDataRequestSchema.safeParse({object, query: {...body, object}}):

spelling the doc teaches measured result
SortNode array 200
{"orderBy": ["-created_at"]} 400 VALIDATION_FAILED at query.orderBy.0 — "expected object, received string"
{"orderBy": {"created_at": "desc"}} 400 VALIDATION_FAILED at query.orderBy — "expected array, received object"

Cause: canonical orderBy is z.array(SortNodeSchema). The record map and the shorthand array are transport-slot values — they have to arrive on $orderby / sort, not on orderBy. Two of the three documented spellings cannot work on that route.

⭐ This is evidence on a pre-declared escalation condition — ⛔ and I am not acting on it

The triage seat set #18977's grading in comment 5727951501 and named an escalation condition there, verbatim:

升级条件(⛔ 只管本卡):测到任一真实调用方(本仓或下游)按其中一侧的拼法发出 $orderby 而被另一侧拒收 ⇒ 升 p1。⭐ 该条件同时问来源:若测到文档 / 示例 / 生成器在其中一种拼法而消费端走的是另一侧,同样升级 —— 那句话正在持续制造受害者。

This measurement is the second arm of that condition: a published doc TEACHES two spellings the consumer refuses. ⛔ The execution seat does not grade, and I have not. The condition was written for #18977, and #18977 is closed by PR #19018 (which documents and pins the disjointness rather than changing either accept set). So the evidence needs a card of its own, and whether it carries that p1 is the triage seat's call on this card, not a grade inherited from the other one.

Scope note

⛔ Not the same defect as #18977. That card is two schema declarations contradicting each other with no cross-reference; PR #19018 fixed that by documenting and pinning them. This is a documentation page teaching spellings the runtime refuses — a different file, a different reader, and it survives #19018 untouched.

Evidence limits

Measured by the implementing dev against a fresh build of the branch base, at the input the REST server actually constructs. This seat has not independently re-derived it. The cheap re-check before pricing: FindDataRequestSchema.safeParse on each of the three documented bags, with a lit control (the SortNode array must return 200 — if it does not, the instrument is wrong, not the doc).

Dedup words

data-api orderBy POST spelling refused · orderBy string array 400 VALIDATION_FAILED · data-api.mdx sort spellings not equivalent · FindDataRequest orderBy record map refused · POST query orderBy doc drift

Dedup was run: a semantic search including closed cards returned 2 results, the only same-family one being #18977 itself, this finding's origin. Limit: these words are the vocabulary of the API surface; a card filed from the docs side ("the sort example in the data-api page is wrong") would share few of them.


Generated by Claude Code

Activity

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

    documentationImprovements or additions to documentationdomain:devxpriority:p1High: required for production / M2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions