Repository navigation
docs(skills): the data skill's percent row states the storage scale — a fraction unless the field declares max above 1 - #28513
Conversation
…ates the storage scale A `percent` field stores a fraction (0-1) unless it declares `max` above 1, then whole percentage points (`percentScaleOf` in packages/spec/src/data/percent-scale.ts); seeds, defaults and API values use that stored scale. The row used to say "Percentage values (0-100)", which had an author seed `25` on a field without `max` and read back `2500%`. Paid inside the file's token ceiling by deleting the `Vector (AI Embeddings)` example, whose one fact the Enhanced Types row already states. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvc9vjAiGhyhnLTp34
|
domain:skills#1 · os-tesla · session_01L9qibzCtJt8Q2Z63fyRNix Contract reviewServed-tier: Inputs: card #28489 body and its three comments (6550823056 triage, 6553113511 claim, 6553328866 os-dev-report); PR #28513 body, file list (2 files: ① Derived judgmentsThe diff publishes no schema and no runtime: it changes one table cell of a published skill, deletes one example block in the same file, and adds a changeset. The public surface it moves is the text of
② Semver level
Clause-②: no ③ Boundary flags
④ Design judgmentThe
Findings: must-fix none; should-fix one (the "whole points" wording, above). Observations, no carrier: Config cell lacks Implemented-by: VERDICT: PASS |
|
domain:skills#1 · os-tesla · session_01L9qibzCtJt8Q2Z63fyRNix 维护者速读
席位意见:契约复审 PASS,无必须修改项。一条建议修改:「whole points」可能被读成「整数」,而声明了 席位核对ACCEPT · seat
|
Requested by Tesla · project thread
Fixes #28489
Clause-②: no
Metadata-protocol: none
维护者速读
percent行,把「Percentage values (0-100)」改成平台真正的存储规则:不声明max大于 1 时存 0-1 的小数,声明了(如max: 100)才存整数百分点;种子、默认值、API 写入都按这个存储刻度。max的 percent 字段上种25,界面读出来是2500%(docs(skills): the objectstack-data field-types rule teaches percentDisplay and lookupAutofill, and the fields page teaches lookupAutofill #28487 契约复审发现,triage 定 p2)。Vector (AI Embeddings)示例支付(它唯一的事实「dimensions是平级键」Enhanced Types 表行已写明);回滚即 revert。skills/objectstack-data/rules/field-types.md第 54 行(percent行)与被删的 Vector 示例块,.changeset/28489-percent-storage-scale-skill.md。node scripts/check-skills-token-ratchet.mjs,预期退出 0,field-types.md读数 3207/3207。skills/**,Tier H)——席位完成契约复审后,由授权账号 Approve,再由席位落地。What changes
One cell of the
percentrow inskills/objectstack-data/rules/field-types.md(Numbers table). It readPercentage values (0-100); it now reads: Percentage; stored as a fraction (0-1) unless the field declaresmaxabove 1 (max: 100), then whole points; seeds, defaults, API values use that scale. The Config cell (min,max,precision,percentDisplay) is unchanged.The rule is
percentScaleOfinpackages/spec/src/data/percent-scale.tsonmain1f1a369b: "A percent field stores a FRACTION unless it declaresmaxabove 1" — the rule the percent edit widget writes by (typed input divided by 100 unlessmaxis above 1), somin: 0, max: 100is a storage statement, not only validation; the read side (percentDisplayValue,ui/packages/fields/src/index.tsxPercentCellRendererviapercentCellScale) multiplies a fraction by 100. The cell says "seeds, defaults, API values use that scale" because every write path stores the number as sent: a seeded25on a field withoutmaxreads back2500%, and0.25is what "25%" needs.Changeset
.changeset/28489-percent-storage-scale-skill.md:@objectstack/skillspatch, both declaration lines.Token ceiling — paid by deletion, never by re-wrap
field-types.mdhad 1 token of headroom under its 3207 ceiling after PR #28487. The new cell is +128 bytes over the old one. Deleted to pay for it: the### Vector (AI Embeddings)example under Common Field Configurations (125 bytes) — its one fact, thatdimensionsis the flat field-level key, is already the Enhanced Types row (`dimensions` (flat sibling, e.g. `1536`)), and the invented-key blockquote at the top of the file already namesvectorConfigas refused. No line was re-wrapped.Readings (bytes · ceil(bytes/4) tokens · lines), base
1f1a369b→ head12f6cdc6:skills/objectstack-data/rules/field-types.mdEvery other file under
skills/is unchanged.Tests
Documentation only.
skills/objectstack-data/evals/*.json,SKILL.mdand the other rules files were grepped forpercent,0-100and0–100: no eval or other skill text states a 0–100 scale, so no eval changes (the order's condition did not fire).Acceptance notes
scaleconsequence (FieldSchema.scalecounts the decimal places of the displayed percentage-point value, so a fraction-stored field carriesscale + 2stored places) is stated once on thescaledescribe and not restated in the skill; the cell gives the author the storage answer thescalerule hangs on.progresstype is not apercent. Its row (Progress bar,min,max) is untouched;percentScaleOfanswersundefinedfor it and the renderer reads it as whole points, which is not this card's subject.skills/*/references/_index.md(open PR feat(spec): one override declaration for code and Studio, with the .custom pairing helpers and the closed overridable-type list (ADR-0146) #28467), the docs site page (content/docs/data-modeling/fields.mdxNumber Types already carries no 0–100 claim forpercent),skills/objectstack-ui.Verification
All readings at head
12f6cdc6(=origin/main1f1a369b+ one commit).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack→ 43 families; every line run with stdin closed afterturbo run build --filter='@objectstack/client-react...'under the verify lock, exit codes landed on disk first;dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE→✓ dispatch-gates --ran: 43 derived famil(ies) accounted for — 42 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3). 42 families exit 0, among themcheck-skills-token-ratchet(+--self-test),check:skill-identifier-liveness,check:corpus-claim-drift,check:doc-authoring,check:role-word,check:pm-skill-id-lint,check:pm-governed-merges,@objectstack/spec check:skill-examples,check:closing-keyword-parity,check:empty-changeset,check:changeset-no-major.pnpm check:dual-build-cjs-loads, exit 3 (PREREQUISITE NOT MET — it needs every package'sdist, a fullpnpm build); the diff touches no package entry. CI runs it.skills/**:claude-fable-5-1MANDATORY, no one-line exit; this thread runs on that tier.skills/plus the changeset, far under the 3000 human-merge threshold.Dogfood: not run — the title carries no
!andClause-②carries no(narrowing)arm.Human Minimum
packages/specholds no runtime logic. (No schema touched.)pnpm lintpasses (CI-owned repo scan; no.tstouched).main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code