Repository navigation
docs(skills): the formula skill names action visible / disabled as the sparse, client-side exception to the total-record rule - #29439
Conversation
…sparse client-side exception to the total-record rule The "has() is NOT a null check" section said every predicate reads a record total over the declared fields. That holds for the server-evaluated surfaces only. Action visible / disabled bind the row the client already holds, which is sparse by decision; the section now says so and teaches the guard from the canonical table in packages/objectql/src/declared-fields.ts. The Surfaces table lists Action visible beside disabled, marked client-side and sparse. The Build with Claude Code page's Resolve action comment now points at that rule instead of restating it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
…parse action-binding exception Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
…rmula-skill-action-sparse Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
… formula skill's sparse paragraph Apply the full review's three should-fixes: a faulting disabled leaves the action refused rather than hidden, the never-written cause reaches a whole-record row too, and has() over an undeclared key is its use on the server surfaces, not its only one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
|
domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd Full Fable review — PASS-WITH-NITS · head
|
|
domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd 席位核对 — ACCEPT ·
|
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: session_01AavokzJ5DndAwitDXvKy4U · head 44bd496 · 2026-11-02T17:12Z Taken under (b): the head has waited 106 min with no record in the contract-review shape. The seat's "Full Fable review" (15:14Z) is on the earlier head Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract reviewServed-tier: Inputs read: card #29094 and its ruling 6579342813 (option A, the maintainer's 「同意」). PR #29439 body, its 3 files, and the net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe fix scopes a true sentence instead of deleting it. The server face stays " Tried to break it:
Must-fix: none. Should-fix: none. Nit, optional: "the mongo and memory drivers" also depends on #29408. If that card makes those rows total, this clause becomes historical; name #29408 beside it then. VERDICT: PASS Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Path: none Triage: stale PR ·
|
|
domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd Answer to triage 6594434519 · 2026-11-03T04:15Z
|
Requested by 田騏 · project thread
Fixes #29094
Clause-②: no
Metadata-protocol: none
维护者速读
has()is NOT a null check」一节把「每个谓词读到的 record 对已声明字段全量」限定为服务端求值面(校验规则、requiredWhen、optionvisibleWhen、readonlyWhen、hookcondition、flow 触发记录),那里!= null就是全部守卫;新增一段「动作visible/disabled例外」:它们在客户端绑定已取到的行,列表行可能缺键,守卫照抄declared-fields.ts的规范写法。Surfaces 表补上Action.visible,标为客户端、稀疏。教程页 Resolve 动作的注释改为指向declared-fields.ts的规则。has()守卫没用而删掉它,结果列不在视图投影里时谓词报错、按钮静默消失。裁决(6579342813,「同意」选项 A)定了declared-fields.ts是正确一方。skills/objectstack-formula/SKILL.md第 124-136 行的例外段;② 同文件第 98-104 行改窄的那句;③ 第 426 行 Surfaces 表的Action行。node scripts/check-skills-token-ratchet.mjs,预期全绿,skills/objectstack-formula/SKILL.md为 5920/5997。skills/**)。What changes
Text only, inside the claim's file surface. The binding ruling is comment 6579342813 (option A); the guard spellings are copied from the CANONICAL rule in
packages/objectql/src/declared-fields.ts(lines 28-135 on this head).skills/objectstack-formula/SKILL.md, section "has()is NOT a null check":record… total over the object's declared fields" now reads "Every server-evaluated predicate — validation rules,requiredWhen, optionvisibleWhen,readonlyWhen, hookcondition, the flow trigger record — …", and says!= nullis the whole guard there. The list is the one in thedeclared-fields.tsheader (lines 6-13).visible/disabledare client-side and sparse. They bind the row the client already holds, and alist_itemrow lacks a key when the column is outside the view's projection, when field-level security refuses it, or when it was never written (the mongo and memory drivers). Reading an absent key faultsNo such keyand the action silently vanishes. The guard ishas(record.x) && record.x != null;has()alone is enough beside a literal==/!=; a nested path takes onehas()per segment. Three example lines follow, each shaped as a row of the canonical tables.Action | disabledis nowAction | visible / disabled — client-side, sparse.record.?x.orValue(…)is not taught.content/docs/getting-started/build-with-claude-code.mdx: only the comment above the Resolve action'svisiblechanged. It now points at the rule inpackages/objectql/src/declared-fields.tsand no longer restates it. The guard itself is unchanged..changeset/29094-formula-skill-action-sparse.md:@objectstack/skillspatch. The skills bundle publishes:packages/skillsshipsdist, synced fromskills/**byscripts/sync-catalog.mjs, so askills/**text change owes a patch changeset.The other seven places that state the sparse rule (
declared-fields.ts, thevalidate-null-guards.tsledger,predicate-matrix.action.ts, the CRM action and its test,quick-start.mdx,protocol/objectui/concept.mdx,ui/actions.mdx) are untouched.Skills readings (lines, then tokens from
check-skills-token-ratchet, base7f277a86f6vs this head):skills/objectstack-formula/SKILL.mdlinesskills/*/SKILL.mdlinesskills/objectstack-formula/SKILL.mdtokens (ceiling 5997)No ceiling moved and no line was re-wrapped. The addition is the ruling's four points; nothing else in the skill was rewritten.
Tests
No code changed, so no unit test applies. The gates below are the evidence.
Acceptance notes
Metadata-protocol: none, and evals forskills/objectstack-*have no mechanical requirement (check:skill-eval-tokenscoversui/skillsonly). The seat may still want one; see the report.skills/objectstack-formula/evals/cel-predicates-formulas.jsonteacheshas(record.discount)as always true for a fieldvisibleWhen. A fieldvisibleWhenis not on the ruling's server-evaluated list and not on the action surface, so this PR leaves it as is. Noted, not filed.origin/mainwas merged once (atd93acbbe55) before this PR was opened.mainhas moved since;dispatch-gatesreports none of the newer commits touch this card's gate inputs.Verification
All gate readings are from head
a39d022314.Derived gate families: 69 derived, 68 run green, 1 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackexit 0 derived 69 commands for the 3 changed paths. Every one was run with its exit code captured before any pipe. 68 exited 0, including:node scripts/check-skills-token-ratchet.mjsexit 0:skills/objectstack-formula/SKILL.md is 5920 tokens (ceiling 5997; headroom 77)node scripts/check-skills-token-ratchet.mjs --self-testexit 0pnpm --filter @objectstack/spec run check:skill-examplesexit 0:281 prose examples type-check across 3 surface(s)pnpm --filter @objectstack/spec run check:skill-docsexit 0pnpm check:pm-skill-id-lintexit 0 (no issue number in the published catalog)pnpm check:skill-identifier-liveness,check:skill-frame-sync,check:skill-compatibilityexit 0pnpm check:doc-authoring,check:doc-anchors,check:nul-bytesexit 0pnpm --filter @objectstack/lint run check:doc-formula-expressionsexit 0node scripts/check-empty-changeset.mjs --base origin/main,check-changeset-no-major.mjs --base origin/main,check-adr-0087-registration.mjs --base origin/mainexit 0NOT MEASURED:
pnpm check:dual-build-cjs-loadsexit 3, PREREQUISITE NOT MET. It reads every package's builtdist/, and this worktree built only the spec, lint, objectql and client-react closures. The diff touches no package source; CI runs it on a full build.node scripts/pm/dispatch-gates.mjs --ran ran.list --repo objectstack-ai/objectstackexit 0:Run reconciliation — 69 derived, 68 run, 1 NOT-MEASURED, 0 UNRUN.🤖 Generated with Claude Code