From f997cf8e2ceb0cf056b49320b4d4c2b0881e1c56 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 04:24:05 +0000 Subject: [PATCH 1/3] =?UTF-8?q?docs(skills):=20objectstack-query=20?= =?UTF-8?q?=E2=80=94=20engine=20aggregate=20row=20admits=20search=20/=20se?= =?UTF-8?q?archFields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Calling Convention row for engine `aggregate` stopped at `timezone`, while `ENGINE_AGGREGATE_OPTION_KEYS` admits `search` and `searchFields` and `aggregate()` expands them through the same ADR-0061 expander `find` uses. Together with the closed-set sentence the row told an agent that a searched aggregate is refused. The row now lists both keys and says they filter the input rows before grouping, AND-ed with `where`. Claude-Session: https://claude.ai/code/session_01KTZmMfzVzjNvyaLyQ8mHvg Co-authored-by: Claude --- skills/objectstack-query/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/objectstack-query/SKILL.md b/skills/objectstack-query/SKILL.md index d2b039564bd..3d9e13b69cb 100644 --- a/skills/objectstack-query/SKILL.md +++ b/skills/objectstack-query/SKILL.md @@ -23,7 +23,7 @@ metadata: | Surface | Shape | Legal option keys | |:--|:--|:--| | engine `find` / `findOne` | `engine.find('task', {…}, { context })` | `context`, `where`, `fields`, `orderBy`, `limit`, `offset`, `search`, `searchFields`, `expand` — **plus** the six driver passthrough keys `transaction`, `tenantId`, `tenantIds`, `timezone`, `bypassTenantAudit`, `preserveAudit` | -| engine `aggregate` | `engine.aggregate('deal', {…})` | `context`, `where`, `groupBy`, `aggregations`, `having`, `timezone` | +| engine `aggregate` | `engine.aggregate('deal', {…})` | `context`, `where`, `groupBy`, `aggregations`, `having`, `timezone`, `search`, `searchFields` — the two search keys filter the input rows **before** grouping, AND-ed with `where`, exactly as on `find` | | engine `count` | `engine.count('task', {…})` | `context`, `where` | | protocol / REST | `findData({ object: 'task', query: {…} })` | `object` sits OUTSIDE the query | | nested `expand` value | a `QueryAST` — `{ object, fields, where }` | (see **Expand**) | From a87b7380b91dc3bb7b57c979d6e55551177c746e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 04:40:48 +0000 Subject: [PATCH 2/3] =?UTF-8?q?docs(skills):=20objectstack-query=20?= =?UTF-8?q?=E2=80=94=20timezone=20is=20the=20one=20passthrough=20key=20agg?= =?UTF-8?q?regate=20accepts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The passthrough paragraph said all six driver passthrough keys are illegal on `count` and `aggregate`. `timezone` is one of the six and is a legal option on `aggregate` in its own right — `ENGINE_AGGREGATE_OPTION_KEYS` lists it and `aggregate()` reads it for date bucketing — which the row above already showed. The paragraph now carves that one key out; `count` still refuses it with the other five. Claude-Session: https://claude.ai/code/session_01KTZmMfzVzjNvyaLyQ8mHvg Co-authored-by: Claude --- skills/objectstack-query/SKILL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skills/objectstack-query/SKILL.md b/skills/objectstack-query/SKILL.md index 3d9e13b69cb..e9139347c19 100644 --- a/skills/objectstack-query/SKILL.md +++ b/skills/objectstack-query/SKILL.md @@ -39,7 +39,9 @@ The passthrough six ride along on `find`/`findOne` (and on `update`/`delete`) because there the option bag IS the base of the driver options, which is how an explicit `tenantId` reaches the driver. `count` and `aggregate` never forward the bag, so on those two the same keys are deliberately ILLEGAL — accepting them -would be the silently-ignored option this check exists to close. +would be the silently-ignored option this check exists to close. The one +exception is `timezone`: `aggregate` reads it itself, for date bucketing, so it +is legal there and the row above lists it; `count` refuses it with the rest. ### Which filter dialect? From cc9244482c23099bb460224dc4681a51cbd9e82e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 05:10:57 +0000 Subject: [PATCH 3/3] =?UTF-8?q?docs(skills):=20objectstack-query=20?= =?UTF-8?q?=E2=80=94=20aggregation=20rule=20stops=20counting=20the=20aggre?= =?UTF-8?q?gate=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `rules/aggregation.md` said `fields` is not one of the "six keys" `engine.aggregate()` accepts and pointed at the calling-convention row, which now lists eight. A count drifts every time the set moves; the sentence now says "not one of the keys" and leaves the enumeration to the row it cites. Net zero lines, no re-wrap. Claude-Session: https://claude.ai/code/session_01KTZmMfzVzjNvyaLyQ8mHvg Co-authored-by: Claude --- skills/objectstack-query/rules/aggregation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/objectstack-query/rules/aggregation.md b/skills/objectstack-query/rules/aggregation.md index 7b148bbbb0a..745a49cb4c0 100644 --- a/skills/objectstack-query/rules/aggregation.md +++ b/skills/objectstack-query/rules/aggregation.md @@ -46,7 +46,7 @@ const rows = await engine.aggregate('sale', { ``` Never list the grouped fields in `fields`: drivers auto-select every grouped -field into the result rows, and `fields` is not one of the six keys +field into the result rows, and `fields` is not one of the keys `engine.aggregate()` accepts — it is rejected by name (see the calling convention in `SKILL.md`).