Skip to content

Commit 72249fc

Browse files
hotlongclaude
andauthored
docs(skills): name flow-filter-token-unknown for the flow-node filter position (#16803)
The passage sat directly after "A flow node's `config.filter` takes these tokens too", so its rule id read as the one that fails an unknown token in a flow node. Since #16732 that position is owned by a second rule. The two ids stay distinct, because the two positions do not share a token vocabulary or a consequence: - flows -> `flow-filter-token-unknown` (validate-flow-filter-tokens.ts), which fires only when NEITHER dialect resolves the token and whose consequence is a guard refusal: "this node cannot run at all"; - dashboards/objects/views/reports/datasets/pages/apps -> `filter-token-unknown` (validate-filter-tokens.ts), which deliberately does not walk `flows` and whose consequence is the silent zero. Collapsing them into one statement would re-teach the confusion the split exists to prevent, so the flow sentence names its own rule and the general paragraph is scoped with "Outside a flow". Wording (not the id distinction) was tightened to stay under the published token ratchet: 2136 -> 2146 tokens against a 2149 ceiling. Claude-Session: https://claude.ai/code/session_01P58euzUXCVJNwmhuPC9DXY Co-authored-by: Claude <noreply@anthropic.com>
1 parent 15f93b1 commit 72249fc

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

skills/objectstack-query/rules/filters.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,23 +227,24 @@ ObjectQL read AND write paths (`find`/`findOne`/`count`/`aggregate`/`update`/
227227
strings and concrete ids. So use tokens in a hand-issued engine query too:
228228
computing "today" at module load freezes the date into the built artifact.
229229

230-
A **flow node's** `config.filter` takes these tokens too. What happens when one
231-
of them drops a condition is a flow rule, not a query rule:
232-
**objectstack-automation** — a dropped condition *widens* the query, so
233-
`get_record` / `update_record` / `delete_record` fail the step instead of
234-
running it.
235-
236-
**Unknown tokens are rejected, not ignored.** A value that is entirely `{...}`
237-
is a placeholder by construction: `objectstack build` fails it (rule
230+
A **flow node's** `config.filter` takes these tokens too. What a dropped
231+
condition does there is a flow rule, not a query rule
232+
(**objectstack-automation**): it *widens* the query, so `get_record` /
233+
`update_record` / `delete_record` fail the step instead of running it. A
234+
`{FUNC()}` neither dialect resolves is `flow-filter-token-unknown`: that node
235+
cannot run at all.
236+
237+
**Unknown tokens are rejected, not ignored.** Outside a flow, a whole-`{...}`
238+
value is a placeholder by construction: `objectstack build` fails it (rule
238239
`filter-token-unknown`) and the resolver throws — because an unresolved token
239240
reaches SQL as a **literal**, matches nothing, and renders a widget showing 0,
240241
indistinguishable from "there is no data". Near-misses, not tokens:
241242
`{current_user}` (the RLS expression root), `{this_quarter_start}`, `{user_id}`
242243
(a real `titleFormat` interpolation) and `{organization_id}` (the column name);
243244
the error names the correction. A value that merely *contains* braces is left
244-
untouched — `'user-{current_user_id}'` is a literal. Check a spelling while
245-
authoring with `isDateMacroToken(tok)` / `isContextToken(tok)` from
246-
`@objectstack/spec/data`, passing the token WITHOUT braces.
245+
untouched — `'user-{current_user_id}'` is a literal. Check a spelling with
246+
`isDateMacroToken(tok)` / `isContextToken(tok)` from `@objectstack/spec/data`,
247+
WITHOUT braces.
247248

248249
**`*_end` is a calendar DAY.** `{current_year_end}` is `2026-12-31`, so on a
249250
`datetime` column `<= {current_year_end}` stops at midnight on the 31st. Use

0 commit comments

Comments
 (0)