You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while working on #14139 (the same literal on the filter surface); out of scope
there, filed unassigned for triage. Suggested domain: domain:cli. That card's triage
comment already anticipated this one: "packages/cli/src/commands/explain.ts's $currentUser is a default-value sample on a different surface and is out of this card's
scope; if it is also wrong it is a domain:cli card."
The sample
packages/cli/src/commands/explain.ts:128, inside the flow entry's example string —
the text os explain flow prints to an author:
Note this is a flow step of type: 'assignment' (Set Variable, packages/spec/src/automation/flow.zod.ts:30) — not a field defaultValue, and not a
query filter. The surface is its own; that is exactly why #14139 left it alone.
The flow template vocabulary is brace-based, not $-prefixed. Flow templates are
written {record.field} and validated by flow-template-unknown-field
(packages/lint/src/validate-flow-template-paths.ts:92), whose diagnostics say an
unresolvable path "resolves to an empty string at runtime (silently)".
The $-prefixed sentinels that do exist are enumerated and different: $root
(approval organization), $trigger, $record, $source. There is no $currentUser
among them, and no alias table maps it.
The acting-user token on the value-producing surface next door is spelled bare: DEFAULT_VALUE_TOKEN_CURRENT_USER = 'current_user'
(packages/spec/src/data/default-value-tokens.ts:67), matched EXACTLY by isCurrentUserDefaultToken (:114-116), whose own comment names currentUser as an
authoring error rather than an accepted spelling. packages/spec/src/data/default-value-shape.ts:225
carries currentuser only as a near-miss suggestion, and default-value-shape.test.ts:54 pins currentUser (camelCase) is a literal.
Nothing in packages/services/service-automation strips or resolves a leading $ in an
assignment value.
What was NOT measured — please settle this in triage
I did not execute an assignment node with this value against a running engine. So the
claim I am confident in is "no declared vocabulary contains this spelling and nothing was
found that resolves it"; the claim I have not proved is "an assignment step therefore
stores the literal string $currentUser into assigned_to". If it does, that is the lookup('sys_user') column taking a bogus literal — the same failure class as the DDL
incident catalogued in the default-value-tokens.ts module note.
Why it matters
os explain is an authoring aid whose whole audience is authors — increasingly AI authors
— writing their first flow. It is the one place a reader is told what an assignment value
looks like. If the spelling resolves nowhere, the sample teaches a value that either fails
validation or is silently stored as text, and the reader has no other reference to correct
it against.
Likely fix
Decide the correct spelling for "the acting user" on the flow-assignment surface, then make
the sample use it. If no such token exists on this surface, the sample should assign
something that does resolve rather than inventing a sentinel — and the gap itself is worth a
separate decision, since "assign to the current user on create" is the textbook
auto-assignment flow.
Found while working on #14139 (the same literal on the filter surface); out of scope
there, filed unassigned for triage. Suggested domain:
domain:cli. That card's triagecomment already anticipated this one: "
packages/cli/src/commands/explain.ts's$currentUseris a default-value sample on a different surface and is out of this card'sscope; if it is also wrong it is a
domain:clicard."The sample
packages/cli/src/commands/explain.ts:128, inside theflowentry'sexamplestring —the text
os explain flowprints to an author:Note this is a flow step of
type: 'assignment'(Set Variable,packages/spec/src/automation/flow.zod.ts:30) — not a fielddefaultValue, and not aquery filter. The surface is its own; that is exactly why #14139 left it alone.
What was measured
On
origin/main:repository — this sample. (
git grep -n -F '$currentUser'returns 4 hits: this line,two in
skills/objectstack-ui/rules/list-views.mdwhich skills/objectstack-ui teaches$currentUseras a filter value, contradicting its own "only two tokens resolve in a filter" contract #14139 is fixing, anddocs/adr/0017-object-has-many-view.md:216which is SQL-shaped prose.)$-prefixed. Flow templates arewritten
{record.field}and validated byflow-template-unknown-field(
packages/lint/src/validate-flow-template-paths.ts:92), whose diagnostics say anunresolvable path "resolves to an empty string at runtime (silently)".
$-prefixed sentinels that do exist are enumerated and different:$root(approval
organization),$trigger,$record,$source. There is no$currentUseramong them, and no alias table maps it.
DEFAULT_VALUE_TOKEN_CURRENT_USER = 'current_user'(
packages/spec/src/data/default-value-tokens.ts:67), matched EXACTLY byisCurrentUserDefaultToken(:114-116), whose own comment namescurrentUseras anauthoring error rather than an accepted spelling.
packages/spec/src/data/default-value-shape.ts:225carries
currentuseronly as a near-miss suggestion, anddefault-value-shape.test.ts:54pinscurrentUser (camelCase) is a literal.packages/services/service-automationstrips or resolves a leading$in anassignment value.
What was NOT measured — please settle this in triage
I did not execute an
assignmentnode with this value against a running engine. So theclaim I am confident in is "no declared vocabulary contains this spelling and nothing was
found that resolves it"; the claim I have not proved is "an assignment step therefore
stores the literal string
$currentUserintoassigned_to". If it does, that is thelookup('sys_user')column taking a bogus literal — the same failure class as the DDLincident catalogued in the
default-value-tokens.tsmodule note.Why it matters
os explainis an authoring aid whose whole audience is authors — increasingly AI authors— writing their first flow. It is the one place a reader is told what an assignment value
looks like. If the spelling resolves nowhere, the sample teaches a value that either fails
validation or is silently stored as text, and the reader has no other reference to correct
it against.
Likely fix
Decide the correct spelling for "the acting user" on the flow-assignment surface, then make
the sample use it. If no such token exists on this surface, the sample should assign
something that does resolve rather than inventing a sentinel — and the gap itself is worth a
separate decision, since "assign to the current user on create" is the textbook
auto-assignment flow.
Generated by Claude Code