Skip to content

docs(skills): field-types teaches the dynamic roll-up over a stored home amount - #34076

Merged
os-zhuang merged 3 commits into
mainfrom
claude/project-thread-iroo1f
Nov 16, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/project-thread-iroo1f

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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 不能带货币。另加一条评测用例。
  • 为什么改:feat(spec, fields): a roll-up of a stored home amount declares currencyMode dynamic and is drawn in the home currency #33710 已让平台接受这种写法,但技能没教;AI 照技能写只会留成裸数字,或者写成 fixed 加本位币代码,而 ADR-0144 规定元数据不得写出本位币。
  • 风险与回滚:纯技能文档加评测,不动 schema 和运行时;为了腾预算删了两处同文件重复(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。
  • 需要你做的:本 PR 碰 skills/**,按受治理流程保持 draft,等 GOVERNED_APPROVERS 批准后由席位落地。

What changes

  • skills/objectstack-data/rules/field-types.md § Currency, right after the homeAmount paragraph: one paragraph, "A roll-up of the home field", and a three-line Field.summary snippet (project.actual_cost = sum of expense.amount_home, currencyConfig: { currencyMode: 'dynamic' }). It teaches:
    • a sum / min / max / avg summary over a child's homeAmount.field declares currencyMode: 'dynamic' with no defaultCurrency, and shows in localization.currency; undeclared, a bare number;
    • ADR-0144: metadata never names the home currency, so never 'fixed' with it;
    • defineStack (os validate, the build) refuses 'dynamic' on any other roll-up, and any currencyConfig on a count.
  • Sources, on main fb79d47c:
    • packages/spec/src/stack.zod.ts collectRecordCurrencyPathErrors case (d): "A summary (sum, min, max, avg) declaring currencyMode: 'dynamic' … is admitted only when the child field it rolls up is a stored home amount: a field that some currencyConfig.homeAmount.field on the child object names … Any other dynamic roll-up is refused".
    • packages/spec/src/data/object.zod.ts refuseUnadmittedSummaryCurrency (wired into the object schema, so defineStack runs it): "A count is a number of rows, never an amount, so it has no currency: delete currencyConfig." The same function admits dynamic only "(no defaultCurrency)".
    • content/docs/data-modeling/currency.mdx § Totals in the home currency: "declare currencyMode: '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".
  • Paid down first under the standing ruling 「A:先削重复,余额按实测提高」 (records 6513306068, 6784270263), two same-file restatement cuts, 115 bytes:
    • the currency table row's currencyConfig key 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.
    • the § Autonumber { type: 'autonumber', format: 'CASE-{0000}' } snippet (-70 B). Surviving home: the autonumber row (format … e.g. "CASE-{0000}", line 132) and the token table's CASE-{0000} row.
    • Considered and kept: the Lookup snippet (the data skill's only home of the lookupFilters shape) and the Formula snippet (only home of the F template import).
  • Token ratchet row skills/objectstack-data/rules/field-types.md 3208 → 3349, pinned at the measurement (wc -c 13395 → ceil(13395 / 4) = 3349, zero headroom), with a dated comment naming both cuts and their homes.
  • Eval: case 20 appended at the tail of 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 the writeRequiresMasterRead case of this file). The prompt tempts "just set the total's currency to USD"; must_contain summary, amount_home, currencyMode: 'dynamic'; must_not_contain defaultCurrency: 'USD' (the code a wrong answer writes; a correct restatement such as "no defaultCurrency" or "never currencyMode: 'fixed'" does not trip it). The expected output satisfies its own assertions (checked by script).
  • Changeset: .changeset/33714-home-currency-rollup-skill.md, @objectstack/skills patch.

Size readings (published skills/**)

Reading Before (fb79d47c) After
field-types.md lines / bytes 246 / 12821 252 / 13395
field-types.md tokens / ceiling 3206 / 3208 3349 / 3349
objectstack-data package, all files, lines / bytes 4311 / 211790 4334 / 213777
all skills/**/SKILL.md, lines / bytes 4596 / 237075 4596 / 237075 (unchanged)
ratcheted (authored) tokens / ceilings, at 78cfc281 187806 / 194122 187950 / 194264
eval fixtures tokens 46787 47140
bundle total tokens 246388 246885

Tests

No code changed, so there is no unit test and no ablation. Forced test edits: none.

Gates at head 78cfc281 (base fb79d47c), run in this worktree after the last commit:

  • Build closure first: turbo run build --concurrency=2 --filter='./packages/**' under os-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. --ran reconciles: "63 derived famil(ies) accounted for — 63 run, 0 NOT-MEASURED (a DERIVED zero …)".
  • Also run: pnpm --filter @objectstack/spec check:skill-examples exit 0, check:skill-docs exit 0, check:skill-refs exit 0; the author ran check-skills-token-ratchet.mjs --self-test exit 0 (104 cases), pnpm check:skill-links exit 0, pnpm check:skill-identifier-liveness exit 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
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs --self-test :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:published-files :: exit 0
pnpm check:ratchet-remedy-authority :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:scripts-symbol-anchors :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-links :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:watch-hint-literal :: exit 0

Acceptance notes

  • Authoring route. dispatch-gates --tier mandates the contract-review tier for skills/** (clause ①). This card thread is served below that tier, so the skills/** text, the eval case, the changeset and the ratchet row were authored and committed by an isolated os-dev subagent 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.
  • Left out for budget: the running-server half of the refusal (a metadata-API save or publish answers INVALID_METADATA / 422 with the same message). currency.mdx § Roll-ups and datasets carries it.
  • The count refusal is the object door (refuseUnadmittedSummaryCurrency), which defineStack runs as part of the object parse; the skill names defineStack for both refusals in one sentence.
  • skills/objectstack-data/evals/README.md lists 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.
  • Review round 1 (at-tier review record 6898808993 at 78cfc281, PASS with one should-fix), head 7c9814a6, authored at the contract-review tier like the first commit, after merging origin/main (a640ecf3, clean):
    • F1: eval case 20 must_not_contain is now defaultCurrency: 'USD' alone; the bare defaultCurrency and currencyMode: 'fixed' entries failed a correct answer that restates the rule. Checked: the restatement "No defaultCurrency here, and never currencyMode: 'fixed' with it." passes; currencyConfig: { currencyMode: 'fixed', defaultCurrency: 'USD' } is caught.
    • N1: "without it, as a bare number" → "undeclared, a bare number".
    • N2: the currency row pointer is (→ Currency), the file's arrow form.
    • N3 (optional relationshipField in the snippet): skipped, about +30 B with nothing to pay for it.
    • Ratchet row re-pinned 3350 → 3349 at the measurement (13395 B); comment numbers updated.
    • Re-run at 7c9814a6: check-skills-token-ratchet.mjs 0, --self-test 0, spec check:skill-docs 0, check:skill-refs 0, check:skill-examples 0 (after a spec rebuild under the lock; the first run answered 3, stale dist after the merge), check:skill-links 0, check-nul-bytes 0, case-20 self-consistency script 0. The 63-command derived set below is the run at 78cfc281.
  • Out-of-scope findings: none.

Verification

node scripts/check-skills-token-ratchet.mjs | grep field-types   # 3349 / 3349, exit 0
pnpm --filter @objectstack/spec check:skill-docs
pnpm --filter @objectstack/spec check:skill-examples

Generated by Claude Code

…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>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 78cfc281fea6a9825e62bef2fc7e0cfc82cdd564
Local-runs: none
Scope: skills/objectstack-data/rules/field-types.md, skills/objectstack-data/evals/objects-fields-relationships.json + scripts/check-skills-token-ratchet.mjs, .changeset/33714-home-currency-rollup-skill.md

Read, never reviewed (origin/main d3bea96d): packages/spec/src/stack.zod.ts (collectRecordCurrencyPathErrors, case (d)), packages/spec/src/data/object.zod.ts (refuseUnadmittedSummaryCurrency), packages/spec/src/data/field.zod.ts (CurrencyConfigSchema jsdoc, Field.summary, summaryOperations), content/docs/data-modeling/currency.mdx, ui/packages/fields/src/currency.ts and widgets/SummaryField.tsx, ADR-0144 D8 rule 5.

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 judgments

Each taught sentence against main:

  • "A sum / min / max / avg summary over a child's homeAmount.field declares currencyMode: 'dynamic', no defaultCurrency". HOLDS. stack.zod.ts case (d): "A summary (sum, min, max, avg) declaring currencyMode: 'dynamic' ... is admitted only when the child field it rolls up is a stored home amount: a field that some currencyConfig.homeAmount.field on the child object names (A summary over a stored home-currency amount is drawn as a bare number, and no summary currencyConfig can say "the home currency" without naming it #33659)". object.zod.ts: "A dynamic summary that names no child amount, or carries a defaultCurrency (which dynamic never reads, and which would name the home currency in metadata), is refused here."
  • "It shows in localization.currency". HOLDS. currency.mdx: "The Console then draws the total in localization.currency on the record page and in the list cell"; summaryDeclaresCurrency returns true for dynamic, and SummaryField then formats with resolveFieldCurrency(field, tenantCurrency, ...).
  • "without it, as a bare number". HOLDS on both readings of "it" (see N1): currency.mdx "Without the declaration the roll-up stays a bare number"; currency.ts "a plain number when none is set".
  • "defineStack (os validate, the build) refuses 'dynamic' on any other roll-up". HOLDS. Case (d): "Any other dynamic roll-up is refused"; currency.mdx: "by defineStack (os validate and the build)". Simplified, acceptably: a child the stack knows only through an extension is judged by the engine registry instead, and the running-server 422 half is left to currency.mdx.
  • "and any currencyConfig on a count". HOLDS. object.zod.ts: "a count roll-up refuses every mode, fixed included"; message "A count is a number of rows, never an amount, so it has no currency: delete currencyConfig." The object door runs inside the object parse, so naming defineStack is true.
  • "(ADR-0144: metadata never names the home currency, so never 'fixed' with it)". HOLDS as an authoring rule: ADR-0144 D8 rule 5, "Metadata never names the home currency." The text rightly does not claim a refusal: fixed on a sum/min/max/avg still parses.
  • Snippet. Field.summary exists (field.zod.ts), relationshipField is optional and auto-detected, the config names a child object and field with no defaultCurrency (passes the object door), and with expense.amount_home named by a valid homeAmount.field it passes case (d). It is the shape of the sibling subtotal snippet in the same section and of the currency.mdx example. Parses in the skill's dialect and passes the refinement.

② Semver level

'@objectstack/skills': patch: the right package (packages/skills/package.json) and the level every other pending skills changeset on main uses; prose only, no schema or runtime. Clause-②: no and Metadata-protocol: none are present on both the PR body and the changeset, and both are true of the tree: nothing narrows, no protocol surface moves. Check Changeset is green.

③ Boundary flags

  • Authoring route. The claim and the dev report say the skills/** text was written by an isolated os-dev subagent pinned to the contract tier because the thread is served below it. The tree cannot show this: the one commit carries the thread's session trailer (session_01ADHkmPwzDmc8SYayZfateR). Recorded as declared, not verified; the text itself was judged on its merits in ① and ④.
  • Paid-down cut 1, the currency row's key list to "(§ Currency)". Home kept and reachable: the ### Currency snippet and prose in the same file spell currencyMode, defaultCurrency, currencyField and homeAmount. 45 bytes, as stated.
  • Paid-down cut 2, the Autonumber snippet. Home kept: the autonumber row (format (shorthand) / autonumberFormat (canonical), e.g. "CASE-{0000}") and the token table's CASE-{0000} row. 70 bytes, as stated. No fact lost.
  • Ratchet raise. Measured: 12821 B to 13397 B, net +576 (+691 new, 115 cut); ceil(13397 / 4) = 3350, pinned at the measurement, zero headroom. The file grows 144 tokens (3206 to 3350); the ceiling moves 142 because 2 tokens of slack were absorbed. The new text costs about 173 tokens gross, about 29 paid down. Proportionate to a six-line paragraph and a three-line snippet; the comment's arithmetic is right. The two record ids it cites were not in this review's inputs; the first is cited by 37 other rows on main.
  • Eval case at the tail. Ids 1 to 20 are unique; no existing case is touched; the writeRequiresMasterRead case 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 is id 17, untouched. Residual risk: if docs(ADR-0055) and skills(data): wording follow-ups from the writeRequiresMasterRead reviews (stale chain bullet, refusal scope, optional-master parenthetical, eval guard) #33432 also appends at the tail, the two meet textually at the closing lines and on id 20; whoever lands second rebases.
  • Behind main. 7 commits behind (fb79d47c to d3bea96d). git merge-tree --write-tree origin/main is clean (tree 69f637b0). Main touched other rows of the ratchet script only and nothing under skills/objectstack-data/, so the 13397 B pin survives the merge.
  • Landing tier (check-governed-merges --pr 34076, read-only): GOVERNED, landing tier H (人合). skills/** ×2 hit the register. The low-risk skills arm does not apply, because scripts/check-skills-token-ratchet.mjs is a path outside skills wording. The PR is a draft, correctly.
  • Local runs: nothing built or run from the diff. Two read-only PM scripts were run as ordered (record-recognisers --template, check-governed-merges --pr).

④ Design judgment

field-types.md: true against the spec on main and the card's fix shape (admitted shape, home-field-only, count never carries a currency), and placed directly after the homeAmount paragraph it depends on, before the parent-currency line, mirroring that paragraph's own "summary snippet" form. It agrees with the "Currency resolution" paragraph above it ('dynamic': tenant localization.currency, else a plain number) and with skills/objectstack-ui/rules/dashboards.md ("measure its homeAmount field or the parent's summary"). No statement under skills/** contradicts it.

Eval case 20: self-consistent as written (every must_contain is in expected_output, no must_not_contain is). It tests the card's scenario and the tempting wrong answer.

  • F1 (should-fix). must_not_contain: "defaultCurrency" fails a correct answer. The rule this PR teaches reads "declares currencyMode: 'dynamic', no defaultCurrency", and the card says the same; an answer that restates it, or that answers the prompt's question with "do not set defaultCurrency: 'USD'", is scored wrong. The expected output passes only by paraphrasing ("with no currency code"). Use the code spelling the file's other cases use (assignee:, label: '负责人'), for example defaultCurrency:, or drop the entry. currencyMode: 'fixed' has the same weakness for an answer that says "not currencyMode: 'fixed'", but a restatement of the rule ("never 'fixed'") avoids it and case 18 sets the precedent, so that half is a nit.
  • N1 (nit). "It shows in localization.currency; without it, as a bare number." The nearest antecedent of "it" is localization.currency, not the declaration. Both readings are true, so nothing false is taught; "undeclared, a bare number" would be exact.
  • N2 (nit). "(§ Currency)" is the only "§" pointer in this file; its other pointers use the arrow form ("objectstack-ui → Dashboards").
  • N3 (nit). The snippet omits relationshipField, which currency.mdx writes. Correct while expense has one relation to project, and the summary row already lists the key as optional.

No must-fix. One should-fix (F1), three nits.

Implemented-by: claude/project-thread-iroo1f
Reviewed-by: session_01ADHkmRxXmVQ41fqnaTPGAv

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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7c9814a64061be3cf7d34f7e728519593569f3b3
Local-runs: none
Scope: skills/objectstack-data/rules/field-types.md, skills/objectstack-data/evals/objects-fields-relationships.json + scripts/check-skills-token-ratchet.mjs, .changeset/33714-home-currency-rollup-skill.md

Delta record. It reopens record 6898808993 (head 78cfc281) only for what moved: a merge of origin/main (a640ecf3) and one fix commit (7c9814a6). Everything else in that record stands.

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 judgments

Unchanged from 6898808993, with one sentence re-tested: "It shows in localization.currency; undeclared, a bare number." HOLDS, now on one reading only: currency.mdx "Without the declaration the roll-up stays a bare number." The snippet is untouched.

② Semver level

Unchanged: '@objectstack/skills': patch, Clause-②: no, Metadata-protocol: none. The changeset file did not move in this round.

③ Boundary flags

  • Merge. The head contains origin/main d3bea96d and is 0 commits behind; git merge-tree --write-tree origin/main is clean (tree b6f7aea6). The net diff against main is the same four files, +53 / -9. The filters.md ratchet row visible between the two heads is main's own, brought in by the merge.
  • Ratchet re-pin. Measured: field-types.md is 13395 B; ceil(13395 / 4) = 3349. Net +574 over 12821 = +689 new, 115 cut; ceiling +141; zero headroom. The two bytes saved are the fix commit's (the pointer glyph +1, the rewording -3). The comment's arithmetic is right.
  • The cut homes, the tail eval case, the authoring-route note and the landing tier (H, governed, draft) stand as recorded.

④ Design judgment

  • F1: closed. must_not_contain is now only defaultCurrency: 'USD'. Read against the prompt: it asks "can I just set the total's currency to USD?" and never spells defaultCurrency. An answer that restates the taught rule ("currencyMode: 'dynamic', no defaultCurrency", "never 'fixed' with it") passes; an answer that authors the wrong config ({ currencyMode: 'fixed', defaultCurrency: 'USD' }) is caught, so dropping the currencyMode: 'fixed' entry loses no coverage. The expected output still satisfies its own assertions.
  • N4 (nit, new, residual of F1). A correct answer that quotes the wrong code in order to refuse it ("do not add defaultCurrency: 'USD'") still trips the entry. That is the file's standing convention for a negative pattern (case 18 currencyMode: 'fixed', case 19 label: '负责人'), the prompt does not hand the answer that spelling, and a string check cannot tell quoting from authoring. Not a correctness matter for the taught rule.
  • N1: closed. "undeclared, a bare number" has one reading, and it is the true one.
  • N2: closed. (→ Currency) is the arrow form the file's other pointers use; the heading it names is in the same file.
  • N3: open, nit, skipped by the dev. The snippet still omits relationshipField; correct while expense has one relation to project. No effect on the verdict.

No must-fix, no should-fix. Two nits open (N3, N4).

Implemented-by: claude/project-thread-iroo1f
Reviewed-by: session_01ADHkmRxXmVQ41fqnaTPGAv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

维护者速读

  • 改了什么:objectstack-data 的 field-types.md 在「货币」一节补一段和一个三行示例:对子对象本位币字段(homeAmount.field 指的那个)做 sum/min/max/avg 的汇总字段,声明 currencyConfig: { currencyMode: 'dynamic' }、不写 defaultCurrency,显示时用组织本位币;其他汇总写 dynamic 会被 defineStack 拒,count 不能带任何 currencyConfig;按 ADR-0144 不能用 fixed 写死本位币。评测加第 20 例。为腾篇幅删了同文件两处重复(货币行的键清单、自动编号示例,规则都还在本文件别处)。+53/−9,changeset @objectstack/skills: patch。
  • 为什么改:feat(spec, fields): a roll-up of a stored home amount declares currencyMode dynamic and is drawn in the home currency #33710 放开了这种汇总写法,技能没教,agent 要么留成裸数字,要么写 fixed 加本位币代码(ADR-0144 不允许)。
  • 风险与回滚:只改技能文字、一个评测用例和一行 token 棘轮上限(field-types.md 3208→3349,按实测钉住),不动运行时。回滚 = revert。
  • 先看:field-types.md「A roll-up of the home field」那段和示例。
  • 两分钟验证:对照 packages/spec/src/stack.zod.ts 的 case (d) 与 packages/spec/src/data/object.zod.ts 的 refuseUnadmittedSummaryCurrency,看三条规则是否逐条对得上。
  • 需要你做的:受管面 Tier H(diff 含 scripts/check-skills-token-ratchet.mjs,低风险技能臂不适用)。达档(CONTRACT_REVIEW_TIER)复审:首轮 6898808993 PASS(F1 should-fix),delta 6898898914 在本 head PASS,F1 已关。请批准并合并,或批准后由席位落地。
  • 席位意见:可以合。

席位核对

Verdict: ACCEPT, held for the maintainer · head 7c9814a64061be3cf7d34f7e728519593569f3b3 · card #33714 · report 6898745814 · at-tier contract review 6898808993 (PASS on 78cfc281, F1 should-fix) + delta 6898898914 (PASS on this head, F1: closed, N1: closed, N2: closed) · read 2026-11-15T18:11Z.

  • Shape: draft → main, Fixes #33714. skills/objectstack-data/rules/field-types.md, case 20 appended to skills/objectstack-data/evals/objects-fields-relationships.json, one ratchet row, changeset '@objectstack/skills': patch. GOVERNED, Tier H. Clause-②: no; Metadata-protocol: none.
  • Premise measured: PR feat(spec, fields): a roll-up of a stored home amount declares currencyMode dynamic and is drawn in the home currency #33710 merged as f64c0f90; the review checked each taught rule against stack.zod.ts case (d), object.zod.ts and currency.mdx on main.
  • Gates: on this head, none failed. Green so far: Build Core, Test UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards, every Type Check job, and the Lint families that carry the skill gates and the ratchet (docs & code guards, repo & tooling gates, CI/release/engine, ESLint, tooling self-tests, query-options erasure). Two Test Core shards and two Lint families (slot lookup & corpus, PM dispatch-gates) are still running at this read. Dev at 78cfc281: 63 derived, 63 exit 0, --ran reconciles. At this head the dev re-ran the ratchet and the skill-docs, skill-refs, skill-examples and skill-links gates, all exit 0.
  • Accepted deviations: authoring by a subagent pinned to CONTRACT_REVIEW_TIER inside a lower-tier thread (declared in the claim and body). Main merged in. The ratchet raise was paid down first by two same-file cuts, and each cut rule keeps its home. Nits N3 (no relationshipField in the snippet) and N4 (a quoted refusal of defaultCurrency: 'USD' would trip the case, as in cases 18 and 19) are left as they are.
  • Out of scope: none filed.
  • Landing: Tier H. The seat does not flip this PR ready or enqueue it. It needs the maintainer's merge, or an authorised APPROVED review after which the seat lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 15, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 16, 2026 01:08
@os-zhuang
os-zhuang enabled auto-merge November 16, 2026 01:08
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 9e0bc61 Nov 16, 2026
55 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-iroo1f branch November 16, 2026 01:41
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills: field-types teaches the stored home field but not that a summary over it declares currencyMode: 'dynamic'

3 participants