Repository navigation
docs(skills): field-types rule states a formula's five returnType members and the currencyConfig a currency formula carries (#22743) - #22798
Conversation
…bers and the currencyConfig a currency formula carries The objectstack-data field-types rule taught returnType as a four-member set and its formula example said (no 'currency'); @objectstack/spec declares five members, and a 'currency' formula carries its own currencyConfig. Both sites now state the five-member set and name the carrier. The example's CEL comment, which restated the table cell, is removed to pay the skill token ratchet. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011u73oxZ5X95qrARPTeoU6v
…eld-types-currency-returntype
Contract reviewServed-tier: Reviewed by the skills seat 2 in seat ( ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
维护者速读(终稿)· PR #22798 · #22743席位 2( 改了什么:对外发布的 为什么改:spec 已在 main 上把 风险与代价(含回滚):纯文本,不碰 schema 与运行时;不教「货币公式按货币渲染」(渲染半边 objectui#12111 未发货)。代价:这份文件的 token 余量从 12 降到 1,以后再改它要先删再加。回滚 = revert 本 PR;发布后以下一个 patch 覆盖。 席位意见:ACCEPT。两处措辞与 你要做的:同意即给一个 APPROVED review;落地由席位走队列。 Generated by Claude Code |
Fixes #22743
Clause-②: no
skills/objectstack-data/rules/field-types.mdtaught a formula'sreturnTypeas the four-member set'number' | 'text' | 'boolean' | 'date'(theformulatable row, line 129) and its formula example said(no 'currency')(line 253).@objectstack/specdeclares five members:packages/spec/src/data/field.zod.ts:1727isreturnType: z.enum(['number', 'text', 'boolean', 'date', 'currency']), and:1786readscurrencyConfigfor a currency field and for a formula whosereturnTypeiscurrency, the sameCurrencyConfigSchema, absent meaningdynamic, the tenant default currency. Both sites now state the five-member set and namecurrencyConfigas the carrier.What changed
skills/objectstack-data/rules/field-types.mdformulatable row:returnTypelists'currency'as its fifth member and the cell adds'currency' carries its own currencyConfig(one row, 0 net lines).returnTypecomment reads'number' | 'text' | 'boolean' | 'date' | 'currency' (money; own currencyConfig);(no 'currency')is gone.CEL — record. prefixes requiredcomment is removed: it restated the table cell two sections above (expression(CEL,record.prefixes)), and the deletion pays the file's token ratchet (headroom was 12 tokens, 51 bytes; the two edits cost 86 bytes gross, 46 net after the deletion).returnType: 'number', and nothing is said about how a currency formula renders (the renderer half is console: a formula field whosereturnTypeis currency renders as money (the consumer of objectstack's formula currency result) objectui#12111, not shipped), as the card requires..changeset/22743-field-types-currency-returntype.md:@objectstack/skillspatch. Onorigin/maina8f24b092,packages/skills/exists (@objectstack/skills17.7.0, in the changesetfixedgroup); itsbuildcopiesskills/**intodist/skills/...andfilesshipsdist, so this text is published andskip-changesetdoes not apply.维护者速读(草稿)
改了什么。 对外发布的技能包
objectstack-data里rules/field-types.md的两处文本:formula 字段的returnType成员从四个改为五个(加上'currency'),并写明'currency'公式自带currencyConfig(与 currency 字段同一结构)。为了不突破技能文本的 token 上限,删掉了示例里一行与上方表格重复的注释(CEL /record.前缀)。另加一个@objectstack/skills的 patch changeset。为什么改。 spec 已在
main上把returnType扩成五成员(#22727 对应的 PR #22733),技能文本仍教四成员且明写 "no 'currency'"。读这份文本的 AI 作者会给金额公式打上number,与平台事实相反。风险与代价(含回滚)。 纯文本改动,不碰运行时与 schema;
rules/field-types.md的 token 余量从 12 降到 1,后续改这份文件要先删再加。不教"货币公式按货币渲染"(渲染半边 objectui#12111 未发货)。回滚:revert 本 PR 即可,无数据影响。席位意见。 (留空)
你要做的。 Tier H(
skills/**):审阅两处措辞是否准确、是否同意用删掉示例的 CEL 注释来支付 token;同意则 APPROVE,由席位走队列落地。Verification (head
6fbe9810b, a merge oforigin/maina8f24b092; delta vsorigin/mainis exactly the two files above)Gates.
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderives 40 commands at6fbe9810b(byte-identical to the list derived at7237ed7cb); each ran alone with its exit captured before any pipe;--ranwith the recorded codes reconciles 40 derived, 39 run, 1 NOT-MEASURED, 0 UNRUN.node scripts/check-skills-token-ratchet.mjs(54 authored bundle file(s) within their ceilings) and its--self-test(65 cases),pnpm check:skill-identifier-liveness,pnpm check:skill-frame-sync,pnpm check:skill-compatibility,pnpm check:corpus-claim-drift,pnpm check:role-word,pnpm check:doc-authoring,pnpm check:nul-bytes,pnpm check:pm-governed-merges,node scripts/check-empty-changeset.mjs --base origin/main,node scripts/check-changeset-no-major.mjs --base origin/main,node scripts/check-adr-0087-registration.mjs --base origin/main,node scripts/check-ci-filter-parity.mjs,node scripts/check-doc-route-spelling.mjs --advisory.pnpm check:dual-build-cjs-loadsexits 3 (PREREQUISITE NOT MET: it loads the built entry points of every published package; this worktree holds 35 built packages, not the whole tree; CI's Build Core runs it afterpnpm build). The diff touches no package source.packages/spec:check:skill-docsexit 0 (Skill docs in sync),check:skill-refsexit 0 (9 generated files in sync),check:skill-examplesexit 0 (262 prose examples type-check across 3 surface(s), run after the SDK build below; before it the gate refused with exit 3 on the unbuiltpackages/client-react/dist).field-types.mdcarries noos:checkmarker, so none of its blocks is in that gate's population.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/currency-mode-family-closure.pin.test.tsunder the verify lock, 1 file, 6 passed. This pin readsfield-types.mdas a currency-mode site (legs A and B).@objectstack/spec(VERDICT command-exit 0, 107 s), then the@objectstack/client-react+@objectstack/clientclosure (35 tasks, VERDICT command-exit 0, 199 s). That second build is what letcheck:dts-closure,check:lean-entry-closure,check:sourcemap-no-sources-contentand@objectstack/lint check:doc-formula-expressionsmeasure: all four refused with exit 3 before it and exit 0 after.Line and token budget (tokens are
ceil(utf8 bytes / 4), the ratchet's own convention).rules/field-types.md: 327 → 327 lines (0 net); 12581 → 12627 bytes; 3146 → 3157 tokens against a ceiling of 3158 (headroom 12 → 1).skills/objectstack-data/as a whole (every authored file, SKILL.md, rules, evals, references): 3811 → 3811 lines; 39280 → 39291 authored tokens (+11), plus 1739 generator-owned tokens unchanged (references/_index.md).skills/objectstack-data/SKILL.mdstays 6128/6128).Acceptance notes
total = record.amount * record.tax_ratekeepsreturnType: 'number'. Ifamountis a currency field,@objectstack/formula'sinferFormulaReturnstamps{ returnType: 'currency' }on that expression, so the example's value reads as the very stamp the card warns against. Switching the example to'currency'is outside the two lines the card names and costs ratchet tokens the file no longer has.inferFormulaReturn's stamping (the card's second replacement bullet) is not taught, by the dispatch's budget-first instruction.skills/objectstack-data/SKILL.mdnamesreturnType: 'text'twice (thenameFieldrows) and teaches no member set; untouched, as required.rules/field-types.mdeither way.objectstack-ai/objectui#12111 remains open. #22727 is not addressed here; PR #22733 landed it.
Generated by Claude Code