Repository navigation
feat(spec,objectql): a summary over a plain dynamic currency amount may declare currencyMode 'dynamic' - #35387
Conversation
…ld amount Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 176 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 07638bbaf141b2a97166465ac81bfe2dc0e57368 && git checkout 07638bbaf141b2a97166465ac81bfe2dc0e57368
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3f88af4c961aa8e63902d12e45ec5b335a07d5d7 5eda3731ce58d22da5da6f10b62f7964b95e89d4 && git checkout -B drift-repro 3f88af4c961aa8e63902d12e45ec5b335a07d5d7 && git merge --no-ff 5eda3731ce58d22da5da6f10b62f7964b95e89d4
node scripts/docs-audit/affected-docs.mjs --json 3f88af4c961aa8e63902d12e45ec5b335a07d5d7
|
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Final head for review · area data-2 · 2026-11-19T08:19Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Inputs read: card #35045 and all six of its comments (triage, seat ruling record 7000258793, claim 7001536938, both os-dev-reports, claim amendment 7002901285); PR #35387's body, its 18-file list, its three comments and the net diff against ① Derived judgments
② Semver levelClause-②: yes (widening) — on the PR body and in the changeset, agreeing with claim amendment 7002901285.
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
…namic-summary-tenant-child
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Landing · area data-2 · 2026-11-19T09:03Z
State: draft → ready + auto-merge (merge queue). #35045 closes on merge via |
Fixes #35045
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up owed — skills/objectstack-data/evals/objects-fields-relationships.json (eval 20's expected output still says
dynamicis admitted only on a roll-up of a home amount)维护者速读
What changes
@objectstack/spec: asummary(sum/min/max/avg) declaringcurrencyMode: 'dynamic'is admitted over any childcurrencyfield indynamicmode, not only over a stored home amount (seat ruling record 7000258793: a plaindynamicamount is in the tenant currency by definition, ADR-0144 D6 / D8 rule 5 read as written). One new predicate,isTenantCurrencyAmount(record-currency-path.ts, exported from@objectstack/spec/data), is the admission test indefineStackcase (d) (stack.zod.ts).@objectstack/objectql: the registry's follow door (record-currency-aggregate-door.ts) reads the same predicate at both registration orders, so a single save, a batch row and a run's end admit exactly whatdefineStackadmits.dynamicover a record-mode child (prescribing its stored home amount, orrecordwhen it follows the parent), over afixedchild (naming the code), over anumber, aformulaor anothersummary. A summary declaring nothing still has no currency.field.zod.tscurrencyConfigdescribe and JSDoc, the regenerated reference pages,content/docs/data-modeling/currency.mdxandfield-types.mdx, and a dated WIDENED line inpackages/spec/liveness/field.json.Tests
dynamicchild): speccurrency-summary-home-rollup.test.ts(plain child, plain child of a home-less record amount, forged-homeAmountlegs over plain amounts), objectqlrecord-currency-guards.test.ts(writable home field re-save), and the message-head constants in both packages.dynamicchild (no config, explicitdynamic, readonly,expression-computed; sum/min/max/avg;{}config) indefineStack, in the registry in both orders, and through a metadata-API publish. Controls kept refused: record-mode child,fixedchild,number,formula, childsummarydeclaringdynamic. A summary declaring nothing parses with nocurrencyConfig.Acceptance notes
dynamicchild amount; a childsummaryis not acurrencyfield, and the contract review that first named it (N3) asked for a follow-up only if a consumer needs it.ui/packages/fields(currency.ts:58,index.tsx:2881,SummaryField.tsx:64) still say "a roll-up of a stored home amount"; the behaviour is right (summaryDeclaresCurrencyanswers true for anydynamicsummary), and only the comments are narrow. Renderers are outside this card's fence.skills/objectstack-data/evals/objects-fields-relationships.jsoneval 20's expected output ends "dynamicis admitted only on a roll-up of a home amount". Its assertions do not read that sentence;skills/**is a governed surface outside this card.Verification
Head
76fb831b(base24cc61fa;overlap-checkclean againstorigin/main35c6331 and PR #35362, exit 0). All readings below were taken on this tree before the one commit; the commit added only the changeset's level and declaration lines.Package suites and typecheck
pnpm --filter @objectstack/spec test: Test Files 856 passed (856), Tests 27370 passed, 1 todo.pnpm --filter @objectstack/objectql test: Test Files 614 passed (614), Tests 13878 passed.pnpm --filter @objectstack/spec typecheck && pnpm --filter @objectstack/objectql typecheck: VERDICT command-exit 0.pnpm --filter @objectstack/spec check:generated: 3 of 14 stale (api-surface, export-origins, docs).--fixregenerated those 3, and they are committed.Reverse verification (one-off, no permanent test)
24cc61fawith only the new test files copied in: spec 12 failed / 70 passed; objectql (base spec dist) 6 failed / 91 passed.ablation-dist-preflightfoundfunction isTenantCurrencyAmountin dist): objectql 3 failed / 94 passed. These are exactly the three admitted legs (registry in both orders, and metadata-API publish), so the door arm carries the fix.Derived gate families (dispatch-gates, 121)
--ranreconciliation: 121 accounted, 118 run, 3 NOT-MEASURED (exit 3, prerequisite dists not built locally):check:skill-examples,check:dual-build-cjs-loads,check:lean-entry-closure. CI builds them.check:platform-checklist, platform-core.seed-mode-matrix VARIANTS STALE (SeedMode has 0 members). It is red on the base tree; this diff touches neitherseed.zod.tsnordocs/qa.node scripts/check-nul-bytes.mjs: exit 0.Generated by Claude Code