Repository navigation
docs(objectql): query-syntax §9 states the all-unknown projection refusal, not the retired every-column fallback - #27586
Conversation
…usal, not the retired every-column fallback An unknown plain column is dropped only while one requested column is known; a projection whose every entry is unknown is refused by find() / findOne() with 400 VALIDATION_ERROR, the fields: [] refusal; expand sub-reads always name id; the REST ingress answers 400 INVALID_FIELD. Claude-Session: https://claude.ai/code/session_01QSeKYp3oFeDem8Tbh8pzWA Co-authored-by: Claude <noreply@anthropic.com>
…ery-syntax-projection
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW 席位核对 — ACCEPT · domain:devx#2 · head
|
domain:devx#2 · os-justin · session_01QSeKYp3oFeDem8Tbh8pzWA
Fixes #27565
Clause-②: no
Metadata-protocol: none
Skills-docs: updated here — content/docs/protocol/objectql/query-syntax.mdx §9 (heading, lead sentence, example and callout): the all-unknown projection is refused 400 VALIDATION_ERROR by engine.find() / findOne(), a mix still drops the unknown columns, expand sub-reads are unaffected, the REST ingress answers 400 INVALID_FIELD. Prose only; skills/** needs no change.
维护者速读
query-syntax.mdx第 9 节改写:投影里混有已知列时未知列才会被丢弃;全部是未知列时find()/findOne()答400 VALIDATION_ERROR(与fields: []同一拒绝);expand子查询不受影响;REST 入口对任何未知列答400 INVALID_FIELD。content/docs/protocol/objectql/query-syntax.mdx第 9 节"Unknown Projection Fields"(唯一改动文件)。git grep -n "falls all the way back" content/docs,预期无输出(退出码 1)。What changes
content/docs/protocol/objectql/query-syntax.mdx§9. The heading "Unknown Fields Are Tolerated" became "Unknown Projection Fields", because the old one now misleads. The lead sentence, the example and the callout were rewritten, and the "falls all the way back to every field" clause is removed.git grep -n "falls all the way back" content/docsreturns nothing (exit 1). No other page linked the old anchor (git grep unknown-fields-are-toleratedhas no hits).Each clause was checked against the code and a test at head
6535c19c:id/created_at/updated_atalways count as knownpackages/objectql/src/engine.ts:13635-13641(find),:13943-13946(findOne);packages/objectql/src/declared-read-columns.ts:79packages/objectql/src/engine-empty-projection-refusal.test.ts:257;packages/objectql/src/query-expression-conformance.test.ts:1776find()/findOne()with400 VALIDATION_ERROR, naming the requested columns, before any driver readengine.ts:13641,:13946callrefuseProjectionOfUnknownColumns;packages/objectql/src/empty-projection-door.ts:61-78(status, code,got [...]in the message)engine-empty-projection-refusal.test.ts:241,:249(readsstays empty);query-expression-conformance.test.ts:1786fields: []empty-projection-door.ts:111and:125both go throughrefuseEmptyProjectionfields: []block, earlier inengine-empty-projection-refusal.test.tsexpandsub-reads are unaffected, because the engine always addsidand strips it back offengine.ts:12797,:12806(addsid),:12845(strips it);idis never dropped (declared-read-columns.ts:79)packages/objectql/src/engine.test.ts:1942,:2010400 INVALID_FIELDfor any unknown name, alone or mixedpackages/metadata-protocol/src/protocol-query-validation.ts:716-727(unknown.length > 0)query-expression-conformance.test.ts:1431(alone),:1441(mixed);packages/rest/src/data-record-read-malformed-query-door.test.ts:73Tests
The cited suites on the merged head 6535c19
bash scripts/pm/os-verify-lock.sh -c "pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/engine-empty-projection-refusal.test.ts src/query-expression-conformance.test.ts"Acceptance notes
skip-changeset: nothing in any package'sfiles[]changes.404 OBJECT_NOT_FOUNDby the engine first (query-expression-conformance.test.ts, the registry-less guard after:1786). The new lead sentence says "on a registered object".Verification
Derived gates, local subset (head 6535c19)
node scripts/docs-audit/affected-docs.mjs: exit 0, "0 docs name something this change touched".node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived the same 43 commands before and after theorigin/mainmerge. On the merged head all 43 exit 0. Some first answered exit 3 (PREREQUISITE NOT MET, nothing measured), or exit 1 from a stalejson-schema, until the build closures of@objectstack/lint...and@objectstack/client-react...(spec included) were rebuilt on that head. After the rebuild they exit 0:check:doc-formula-expressions,check:doc-security-posture,check:skill-examples,check:docs-transcript-drift,check:docs.--ranwith every exit recorded: "43 derived famil(ies) accounted for — 43 run, 0 NOT-MEASURED (a DERIVED zero — all 43 recorded an exit code and none of them is 3)".NOT MEASURED locally:
Build DocsandCheck Documentation Links. These are CI-only jobs, and this PR's check-runs answer them.Generated by Claude Code