Repository navigation
docs(skills): field-types teaches the dynamic roll-up over a stored home amount - #34076
Conversation
…ome amount (#33714) § Currency: a sum / min / max / avg summary over a child's homeAmount.field declares currencyMode 'dynamic' with no defaultCurrency and is shown in localization.currency; dynamic on any other roll-up and a currencyConfig on a count are refused. One project / expense example, eval case 20, changeset. Paid down first by two same-file restatement cuts (115 bytes): the currency row's currencyConfig key list (home: § Currency) and the Autonumber snippet (home: the autonumber row and the token table). Ratchet row 3208 -> 3350, pinned at the measurement. Claude-Session: https://claude.ai/code/session_01ADHkmPwzDmc8SYayZfateR Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract reviewServed-tier: Read, never reviewed (origin/main Check-runs on this head (42): 12 success, 16 skipped, 0 failed, 14 still running. Green: Check Changeset, Governed Surface Queue Guard, PR-body guards, Build Core, Type Check · source gates, Check PR Size, filter, Plan Test Core shards, Test UI, Live E2E UI, Dogfood Regression Gate, Auto Label. Still running, so no verdict yet: Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · tooling self-tests, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Lint · ESLint, Lint · scoped · slot lookup & corpus, Lint · scoped · query-options erasure, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Test Core 1/8, 2/8, 3/8 (shards 4 to 8 not yet listed). The skill gates (token ratchet, skill-examples, skill-docs, skill-links) sit in the Lint families that are still running: this record judges the contract, and those conclusions stay CI's. ① Derived judgmentsEach taught sentence against main:
② Semver level
③ Boundary flags
④ Design judgment
Eval case 20: self-consistent as written (every
No must-fix. One should-fix (F1), three nits. Implemented-by: VERDICT: PASS |
…r form, wording Eval case 20: must_not_contain now names only code a wrong answer writes (`defaultCurrency: 'USD'`); the bare key and `currencyMode: 'fixed'` entries failed a correct answer that restates the rule. field-types.md: "undeclared, a bare number" replaces an ambiguous "it"; the currency row's pointer takes the file's arrow form. Ratchet row re-pinned at the measurement, 3350 -> 3349. Claude-Session: https://claude.ai/code/session_01ADHkmPwzDmc8SYayZfateR Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract reviewServed-tier: Delta record. It reopens record 6898808993 (head Check-runs on this head (27 listed, 0 failed). Final: Governed Surface Queue Guard success, Type Check · workspace success, Check PR Size success, Auto Label success, PR-body guards success on the first run. Skipped, final: 7 (queue verdicts, schedule gate, the two opt-in harnesses, and the duplicate Check PR Size and Auto Label). Still running, so no verdict yet (15): Check Changeset (both runs), PR-body guards (second run), filter, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · tooling self-tests, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Lint · ESLint, Lint · scoped · slot lookup & corpus, Lint · scoped · query-options erasure, Type Check · source gates, Type Check · consumer gates, Type Check · debt ledger. Build Core and the Test Core shards are not listed yet. The dev did not re-run the derived command set on this head, so the token ratchet and the skill gates have no verdict on it until the Lint families finish: those conclusions are CI's and are not given here. ① Derived judgmentsUnchanged from 6898808993, with one sentence re-tested: "It shows in ② Semver levelUnchanged: ③ Boundary flags
④ Design judgment
No must-fix, no should-fix. Two nits open (N3, N4). Implemented-by: VERDICT: PASS |
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
Requested by Steve · project thread
Fixes #33714
Clause-②: no
Metadata-protocol: none
维护者速读
field-types.md的「货币」一节补上一段加一个示例:对子对象本位币存储字段(某个homeAmount.field指向的字段)做sum/min/max/avg汇总时,汇总字段声明currencyConfig: { currencyMode: 'dynamic' }、不写defaultCurrency,界面就按组织本位币显示;并说明其他dynamic汇总会被defineStack拒收、count不能带货币。另加一条评测用例。fixed加本位币代码,而 ADR-0144 规定元数据不得写出本位币。currency行的键列表改成指向「货币」一节;自动编号的重复示例),被删的内容在同文件别处仍在。token 棘轮行 3208 → 3349,按实测钉死。回滚 = revert 本 PR。skills/objectstack-data/rules/field-types.md的「A roll-up of the home field」段与示例;scripts/check-skills-token-ratchet.mjs该文件那一行及注释;评测文件末尾的第 20 条。node scripts/check-skills-token-ratchet.mjs | grep field-types应显示3349 / 3349,且命令退出 0。skills/**,按受治理流程保持 draft,等 GOVERNED_APPROVERS 批准后由席位落地。What changes
skills/objectstack-data/rules/field-types.md§ Currency, right after thehomeAmountparagraph: one paragraph, "A roll-up of the home field", and a three-lineField.summarysnippet (project.actual_cost=sumofexpense.amount_home,currencyConfig: { currencyMode: 'dynamic' }). It teaches:sum/min/max/avgsummaryover a child'shomeAmount.fielddeclarescurrencyMode: 'dynamic'with nodefaultCurrency, and shows inlocalization.currency; undeclared, a bare number;'fixed'with it;defineStack(os validate, the build) refuses'dynamic'on any other roll-up, and anycurrencyConfigon acount.fb79d47c:packages/spec/src/stack.zod.tscollectRecordCurrencyPathErrorscase (d): "Asummary(sum,min,max,avg) declaringcurrencyMode: 'dynamic'… is admitted only when the child field it rolls up is a stored home amount: a field that somecurrencyConfig.homeAmount.fieldon the child object names … Any otherdynamicroll-up is refused".packages/spec/src/data/object.zod.tsrefuseUnadmittedSummaryCurrency(wired into the object schema, sodefineStackruns it): "A count is a number of rows, never an amount, so it has no currency: deletecurrencyConfig." The same function admitsdynamiconly "(nodefaultCurrency)".content/docs/data-modeling/currency.mdx§ Totals in the home currency: "declarecurrencyMode: 'dynamic'on it, with no code … the metadata never names which currency that is"; ADR-0144 D8 rule 5: "Metadata never names the home currency".currencytable row'scurrencyConfigkey list(currencyMode, defaultCurrency, currencyField, homeAmount)becomes(→ Currency)(-45 B as first cut; the round-1 arrow form is 2 B shorter again). Surviving home: § Currency, whose snippet and prose spell all four keys.{ type: 'autonumber', format: 'CASE-{0000}' }snippet (-70 B). Surviving home: theautonumberrow (format… e.g."CASE-{0000}", line 132) and the token table'sCASE-{0000}row.lookupFiltersshape) and the Formula snippet (only home of theFtemplate import).skills/objectstack-data/rules/field-types.md3208 → 3349, pinned at the measurement (wc -c13395 → ceil(13395 / 4) = 3349, zero headroom), with a dated comment naming both cuts and their homes.skills/objectstack-data/evals/objects-fields-relationships.json(no existing case touched; docs(ADR-0055) and skills(data): wording follow-ups from the writeRequiresMasterRead reviews (stale chain bullet, refusal scope, optional-master parenthetical, eval guard) #33432 holds thewriteRequiresMasterReadcase of this file). The prompt tempts "just set the total's currency to USD";must_containsummary,amount_home,currencyMode: 'dynamic';must_not_containdefaultCurrency: 'USD'(the code a wrong answer writes; a correct restatement such as "nodefaultCurrency" or "nevercurrencyMode: 'fixed'" does not trip it). The expected output satisfies its own assertions (checked by script)..changeset/33714-home-currency-rollup-skill.md,@objectstack/skillspatch.Size readings (published
skills/**)fb79d47c)field-types.mdlines / bytesfield-types.mdtokens / ceilingobjectstack-datapackage, all files, lines / bytesskills/**/SKILL.md, lines / bytes78cfc281Tests
No code changed, so there is no unit test and no ablation. Forced test edits: none.
Gates at head
78cfc281(basefb79d47c), run in this worktree after the last commit:turbo run build --concurrency=2 --filter='./packages/**'underos-verify-lock.sh:VERDICT command-exit 0(7m22s).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 63 derived commands, every one exit 0.--ranreconciles: "63 derived famil(ies) accounted for — 63 run, 0 NOT-MEASURED (a DERIVED zero …)".pnpm --filter @objectstack/spec check:skill-examplesexit 0,check:skill-docsexit 0,check:skill-refsexit 0; the author rancheck-skills-token-ratchet.mjs --self-testexit 0 (104 cases),pnpm check:skill-linksexit 0,pnpm check:skill-identifier-livenessexit 0, and a control-character grep on the four files (no hits).test:repo, the type-check lanes and the CI-only families are CI's; read their check-runs on this PR.The 63 derived commands and their exits
Acceptance notes
dispatch-gates --tiermandates the contract-review tier forskills/**(clause ①). This card thread is served below that tier, so theskills/**text, the eval case, the changeset and the ratchet row were authored and committed by an isolatedos-devsubagent pinned to that tier, on this same branch and worktree, as the claim records. The thread verified the facts against main, ran the gates, pushed and opened this PR.INVALID_METADATA/ 422 with the same message).currency.mdx§ Roll-ups and datasets carries it.countrefusal is the object door (refuseUnadmittedSummaryCurrency), whichdefineStackruns as part of the object parse; the skill namesdefineStackfor both refusals in one sentence.skills/objectstack-data/evals/README.mdlists each eval file's topics and does not say "currency" (already true before this PR, since case 18). Left untouched: outside the claimed file surface.78cfc281, PASS with one should-fix), head7c9814a6, authored at the contract-review tier like the first commit, after mergingorigin/main(a640ecf3, clean):must_not_containis nowdefaultCurrency: 'USD'alone; the baredefaultCurrencyandcurrencyMode: 'fixed'entries failed a correct answer that restates the rule. Checked: the restatement "No defaultCurrency here, and nevercurrencyMode: 'fixed'with it." passes;currencyConfig: { currencyMode: 'fixed', defaultCurrency: 'USD' }is caught.currencyrow pointer is(→ Currency), the file's arrow form.relationshipFieldin the snippet): skipped, about +30 B with nothing to pay for it.7c9814a6:check-skills-token-ratchet.mjs0,--self-test0, speccheck:skill-docs0,check:skill-refs0,check:skill-examples0 (after a spec rebuild under the lock; the first run answered 3, staledistafter the merge),check:skill-links0,check-nul-bytes0, case-20 self-consistency script 0. The 63-command derived set below is the run at78cfc281.Verification
Generated by Claude Code