Repository navigation
docs(skills): objectui teaches CEL for bare-string predicates - #27889
Conversation
Since #27584 the console reads a bare-string predicate as CEL, the way the spec defines it and the server reads it. skills/objectui still taught the legacy JavaScript spellings (`===`, `!==`, a JS operator list counted as condition syntax), which now fault and hide the node. - Every bare-predicate example is CEL; the architecture overview says a bare condition string is CEL on @objectstack/formula, and the operator list says it is the `${…}` grammar only. - The Condition fields section gains a FROM → TO list measured on the console's evaluator: `===`/`!==`, `.includes`, `.length`, and a `data.*` key the scope may lack (`has()`; CEL faults on a missing key). - The row-predicate bullet says only a `${…}` condition still reads on the legacy engine. - Eval 2 now hands over a JS-syntax predicate and expects the CEL rewrite. - Paid down in the same file: the bindable-text-keys paragraph restated troubleshooting item 1. All three files stay under their ceilings. Fixes #27587 Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1Ffw7D64ARzogMukj
…icate teaching Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1Ffw7D64ARzogMukj
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1Ffw7D64ARzogMukj
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract-review-claim: session_016WV4d1QkPVVzNz3FJqb2iS · head e8ba3a8 · 2026-10-30T02:44Z |
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract reviewServed-tier: Read: PR body, card #27587, the four-file diff ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Must-fix: none. Should-fix:
Implemented-by: VERDICT: PASS |
A key the scope may lack, read negated, is `!has(data.x) || !data.x`; `has(data.x) && !data.x` answers false when the key is absent. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1Ffw7D64ARzogMukj
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract-review-claim: session_016WV4d1QkPVVzNz3FJqb2iS · head 0376f2d · 2026-10-30T03:22Z |
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract reviewServed-tier: Delta review by the same reviewer, following record 6513743666 (PASS on ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Must-fix: none. Should-fix:
Implemented-by: VERDICT: PASS |
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS 维护者速读
席位意见:ACCEPT。首轮契约复核 PASS,有一条 should-fix(取反的缺键写法),已在本 PR 补上,差量复核 PASS。差量复核又提了一条 should-fix:PR 正文少写一个取反写法,属于正文描述问题,不在受管面上,由本条接替。CI 全绿。 席位核对
|
Requested by Elon · project thread
domain:skills#2 · os-elon-musk · session_016WV4d1Ffw7D64ARzogMukj
Fixes #27587
维护者速读
skills/objectui里的裸字符串谓词示例全部改成 CEL 写法(==、!=、&&、!),运算符清单注明只适用于${…}模板;指南新增一张 JS → CEL 对照短表;eval 2 改为给出 JS 写法、要求改写成 CEL。===这类 JS 写法,照抄的 AI 写出的hidden/visibleWhen会出错并把节点藏起来。skills/objectui/guides/schema-expressions.md的 "Condition fields" 一节(新增的 FROM → TO 清单)。node scripts/check-skills-token-ratchet.mjs全绿;pnpm --dir ui exec vitest run scripts/__tests__/check-skill-eval-tokens.test.ts29/29 通过。What changes
rules/protocol.md: the evaluated-fields table shows"hidden": "data.status == 'draft'"(was===), and thevisibleWhenrow says a bare string is CEL.guides/schema-expressions.md:@objectstack/formulaas on the server; the recursive-descent parser is named for${…}templates only.${…}grammar only.data.status != 'active', and a FROM → TO list follows:===/!==→==/!=;list.includes(x)→x in list,s.includes('x')→s.contains('x');list.length→size(list); adata.*key the scope may lack (data.x == 1,!data.x,?.,??) →has(data.x) && data.x == 1.${…}conditionstill reads on the legacy engine; a bare===/.includes()faults on CEL.SafeExpressionParser; troubleshooting item 4 says "a bare CEL string or a${}template".evals/schema-expressions.json: eval 2 now hands over"visibleWhen": "data.role === 'admin' && data.status === 'active'"and expects the CEL rewrite (must_containCELandstatus == 'active', a token the guide teaches)..changeset/27587-objectui-skill-teaches-cel-predicates.md:@objectstack/skillspatch.Why
PR #27584 (#27457) made the console read a bare-string predicate as CEL, the way
@objectstack/specdefines it and the server reads it. Its changeset carriesnot-required (no-migration-prescription), so the skill is where the JavaScript spellings get redirected. Until now the skill taught those spellings, and an agent following it wrote a gate that faulted and hid the node.Verification
Each FROM → TO row was measured on the console's
ExpressionEvaluator.evaluateCondition(built@objectstack/formula,throwOnErrorandonFault), on this branch's base:data.status === 'draft'Unexpected character: =data.status == 'draft'truedata.tags.includes('vip')/data.name.includes('urgent')no matching overload for 'dyn.includes(string)''vip' in data.tags/data.name.contains('urgent')truedata.items.length > 0No such key: lengthsize(data.items) > 0/data.items.size() > 0truedata.missing == 'x',!data.missingNo such key: missinghas(data.missing)/has(data.missing) && data.missing == 'x'false, no faultdata.missing?.x/data.missing ?? 'd'data.isAuthenticated && data.permissions.canEdit,!data.canPerformAction || data.isLocked,!data.hasPermission(the guide's other bare examples)The fault policy quoted in the guide ("a visibility gate hides the node,
disableddisables") is the oneSchemaRenderer'svisibilityFaultOutcomeand #27584's changeset state.Re-grep of
skills/objectui/**, evals included, for===,!==,&&,||,.includes(,.length: the remaining hits are${…}templates (which keep their own grammar), TypeScript / JSX code, or evalmust_not_containJSX strings. No other bare predicate uses a JS-only spelling.Token ratchet (
node scripts/check-skills-token-ratchet.mjs), priced tokens:skills/objectui/guides/schema-expressions.mdskills/objectui/rules/protocol.mdskills/objectui/evals/schema-expressions.jsonNo ceiling row moves.
Gates:
node scripts/pm/dispatch-gates.mjs --commandsderives 45 families on this head; all 45 ran locally after a whole-treeturbo run buildand exited 0;dispatch-gates --ranreconciles 45 derived / 45 run / 0 NOT-MEASURED.Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintnot run: no source file is touched; the derived gate families are listed under Verification.)main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.## 维护者速读block).🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4d1Ffw7D64ARzogMukj