docs(query): stop enumerating a false closed set for the aggregate option keys - #20813
Conversation
…ot closed as stated Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv
Contract reviewServed-tier: ① Derived judgmentsRead against
② Semver levelNone. Docs only, no ③ Boundary flags
Implemented-by: VERDICT: FAIL Required fix:
|
…rence instead of a partial interface copy Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv
Contract reviewServed-tier: ① Derived judgmentsRead against
② Semver levelNone. Three ③ Boundary flags
Implemented-by: VERDICT: PASS |
Fixes #20792
Clause-②: no
Two hand-written docs sentences presented the aggregate option set as a closed three-key list. The list is false on both paths. This PR keeps each sentence's true point and drops the enumeration; no key list is pasted into prose (the generated reference owns it).
Changes
content/docs/protocol/objectql/query-syntax.mdx(Analytics: Revenue by Month)engine.aggregate()accepts onlywhere/groupBy/aggregations(plus atimezonefor bucketing): there is noorderByorlimiton this path, so sort the returned rows yourself."engine.aggregate()takes a closed option set with noorderByorlimit(the full list is underEngineAggregateOptionsin the Data Engine reference), so sort the returned rows yourself. It does carry atimezonefor bucketing."content/docs/data-modeling/queries.mdx(UTC bucketing callout)POST /api/v1/data/:object/queryroute forwards onlywhere/groupBy/aggregations, so a query sent over REST always buckets on UTC calendar boundaries."POST /api/v1/data/:object/queryroute does not forwardtimezoneto the engine, so a query sent over REST always buckets on UTC calendar boundaries."content/docs/kernel/contracts/data-engine.mdx(### EngineAggregateOptions, added in a second commit 7837c5c)/docs/references/data/data-engine#engineaggregateoptions; theAggregationNodeinterface and thedistinctremoval note are kept.Code anchors (origin/main at 96e7244)
packages/objectql/src/engine.ts:562-565:ENGINE_AGGREGATE_OPTION_KEYS= context, where, groupBy, aggregations, having, timezone, search, searchFields. Enforced at:16277(rejectUnknownEngineOptions). No orderBy / limit, so the kept point holds.packages/metadata-protocol/src/protocol.ts:11324-11343: the engine.aggregate call insidefindDataforwards where, groupBy, aggregations, having, search, searchFields, context.timezoneis not in the bag, and notimezoneread exists infindData(:10937to the call), so REST buckets on UTC.packages/rest/src/rest-server.ts:8808,8849:POST /data/:object/querycallsp.findData(...), confirming the route reaches that path.content/docs/references/data/data-engine.mdx:891-906.Census (hand-written
content/docs/**, excluding references/ and releases/)Prose patterns: "only
where", "accepts only", "forwards only", "groupBy/aggregations", aggregate()-with-only/accepts/forwards, "drops having/search/timezone". Interface and type-literal patterns (added after review):EngineAggregateOptions,AggregateOptions,groupBy?:,aggregations?:, aggregate-signature blocks. Hits: the three fixed above (query-syntax.mdxsentence,queries.mdxsentence,kernel/contracts/data-engine.mdxinterface literal). Checked and left:kernel/contracts/data-engine.mdx:28,39(an import and theaggregate(...)signature, which name the type and copy no keys),:573(deprecated schema names),query-syntax.mdx:74-75(the QueryAST literal for find, not the aggregate option set),query-syntax.mdx:85,:1434,api/error-catalog.mdx:301,api/data-api.mdx:194`. No further enumeration.Acceptance notes
ENGINE_DRIVER_PASSTHROUGH_KEYSdeliberately left out of this PR, as ruled.Verification
Gate list from
node scripts/pm/dispatch-gates.mjs --commands(40 families), each run at head 7837c5c with exit 0 (after building@objectstack/lint...,@objectstack/specand@objectstack/client-react...for the gates that read built output);--ranreconciliation: 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN.🤖 Generated with Claude Code
https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv