Repository navigation
docs(skills): teach the derived-measure fixed-currency refusal beside the two fixed-currency refusals - #28431
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
… the two fixed-currency refusals A derived sum or difference whose operands all resolve to one fixed code refuses another currency at compile (DATASET_INVALID / 400); the prescription is the shipped message's: delete the measure's currency (the column takes the operands' code), or restate it. The two skill texts and the two docs pages teach it in those words, and the docs say the derived column carries that code on the wire too, as main now does. The skills token ratchet is paid by deleting a convention already shown in the example above it (field-types.md) and a retired-key parenthetical the parse refusal and the Dataset-Bound Widgets paragraph already carry (dashboards.md). Claude-Session: https://claude.ai/code/session_01FEkQ5nqSVzKxNiy5ZH2o44 Co-authored-by: Claude <noreply@anthropic.com>
…refusal texts The skills catalog ships in @objectstack/skills (its build copies skills/** into dist), so a skills text change publishes and takes a patch changeset. Claude-Session: https://claude.ai/code/session_01FEkQ5nqSVzKxNiy5ZH2o44 Co-authored-by: Claude <noreply@anthropic.com>
|
domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo Contract reviewServed-tier: Read-only shape held: the diff of ① Derived judgmentsThe PR moves no published schema, export or runtime:
② Semver level
③ Boundary flags
④ Design judgment
The two devx pages ( The changeset names the right package and level (②) and its prose matches what the diff does. No must-fix. No delta review owed: both commits on the branch ( Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo 席位核对ACCEPT · The maintainer's standing authorisation for landing reviewed PRs, verbatim: 「按照 pm-dispatch 规则复核过的都授权」. This PR is Tier H: that authorisation does not reach it. It stays draft until the maintainer approves.
Generated by Claude Code |
Requested by Leehom · project thread
Fixes #28051
Clause-②: no
Metadata-protocol: none
Cross-lane dispatch:
domain:skillscard dispatched and reviewed bydomain:server#2under the maintainer's 「座位之间可以协调,你有空你就可以派」 (claim 6545242148); the two devx pages ride as the sibling PR #28015 (#27994) carried them.维护者速读
fixed币种拒收:派生sum/difference的操作数全部落在同一个fixed币种时,度量自己声明另一个currency会在数据集编译时被拒(DATASET_INVALID/ 400)。改法照运行时的原话:删掉度量的currency(列取操作数的币种),或写同一币种。两页文档同时写明:这样的派生列在线上答复里也带那个币种(PR fix(service-analytics): a derived sum or difference over one fixed currency code carries that code on its column #28122 落地的行为,本任在main上实测)。currency: 'USD',数据集会被拒而文档没说。field-types.md删掉示例已给出的currency_code命名惯例;dashboards.md删掉已退役的categoryGranularity括注,解析拒收与 Dataset-Bound Widgets 段已有它)。回滚即撤本 PR。skills/objectstack-ui/rules/dashboards.md的数据集币种注释(L300-306),skills/objectstack-data/rules/field-types.md的 Currency resolution 段(L174-177)。node scripts/check-skills-token-ratchet.mjs预期全绿(field-types.md3207/3207,dashboards.md6259/6262);对照packages/services/service-analytics/src/measure-currency-coherence.tsGuard 1 末尾的resolved?.fixed分支读四处文字。skills/**是 Tier H 受管面:PR 留 draft,等你批准;契约复审由席位在本 head 上做。What changes
The shipped refusal, read from
measure-currency-coherence.tsGuard 1 onmain(and pinned inrecord-currency-analytics.test.ts): a derived measure that declares acurrencyover measures whose amounts are fixed to one code, with a different code, is refusedDATASET_INVALID/ 400; the message endsdelete the measure's \currency` (the column takes the operands' CODE), or restate CODE.Each of the four texts now teaches that case and that prescription in its own words, beside the twofixed` refusals PR #28015 taught:skills/objectstack-data/rules/field-types.md(Currency resolution): "over a'fixed'one, or a derived sum/difference over one'fixed'code, it may only restate that code, elseDATASET_INVALID: delete it, and the column takes the code". Reader: the agent writing acurrencyfield and then a dataset measure over it; the mistake prevented iscurrency: 'USD'on a derived sum of EUR-fixed measures. Paid for by deleting "(by conventioncurrency_code)", which the example two lines above already shows (currencyField: 'currency_code').skills/objectstack-ui/rules/dashboards.md(the dataset currency comment): "Afixedfield, or a derived sum/difference over onefixedcode, refuses anothercurrency(delete it, the column takes that code; restating is fine)". Reader: the agent writing a dataset measure for a dashboard; the same mistake. Paid for by deleting "(The old widget-levelcategoryGranularitywas removed in the single-form cutover.)": the parse refusal names that key with its prescription (LEGACY_WIDGET_ANALYTICS_KEYSindashboard.zod.ts) and the Dataset-Bound Widgets paragraph already says the closed schema rejects the legacy keys by name, so the sentence had two homes.content/docs/data-modeling/currency.mdx(Roll-ups and datasets): a new bullet for the derived case with the prescription, and the existing sentence "a derivedsumordifferenceover onefixedcode carries that code" now says "on its result column too": true on the wire since PR fix(service-analytics): a derived sum or difference over one fixed currency code carries that code on its column #28122 (analytics: a derived sum over onefixed-currency code reaches the wire with no currency code, though the docs say it carries that code #28049), measured below.content/docs/api/data-api.mdx(the currency chain): the chain paragraph gains the derived step (a derivedsum/differencewhose operands all resolve to onefixedcode takes that code at the field's step; any other derived measure is monetary only by its owncurrency, else its column carries none), and the refusal paragraph gains the derived case with the prescription..changeset/28051-skills-derived-currency-refusal.md:@objectstack/skillspatch. The order ruledskip-changeset; os-dev.md's published-surface criterion wins over the order on a conflict, and it is measured:packages/skills/scripts/sync-catalog.mjscopiesskills/**into that package'sdist/, which is in itsfiles[], and the sibling PR docs(skills): a dataset measure's currency no longer always wins over a fixed field; teach the two fixed-currency refusals #28015 carried the same patch changeset. Recorded in the report'sopen_questions.skills/**readings (lines, and tokens as the ratchet counts them)skills/objectstack-data/rules/field-types.mdskills/objectstack-ui/rules/dashboards.mdskills/*/SKILL.mdskills/**/*.mdNo ceiling row moves;
node scripts/check-skills-token-ratchet.mjsexits 0 on the head.Tests
No code changes. The wire behaviour the docs now teach was measured on
origin/main5da3a8cein this worktree, afterpnpm --filter '@objectstack/service-analytics^...' build(lock VERDICT command-exit 0):The refusal pin asserts the message tail
delete the measure's \currency` (the column takes the operands' EUR), or restate EUR.; the wire pin assertsfields[].currency === 'EUR'oneur_twice(sum) andeur_net(difference) with nocurrencyField, andcurrencyundefined on every derived column whose operands resolve to no onefixedcode (usd_and_tenant,tenant_twice,jpy_twice,eur_per_invoice,eur_product,total_twice`).Acceptance notes
fixed-currency code reaches the wire with no currency code, though the docs say it carries that code #28049) changed both the wire and that sentence before this card was dispatched; the order says to teach what landed, so the texts teach "the column takes the operands' code".content/docs/**is not a governed surface, but it rides this Tier H PR, so the whole PR waits for the maintainer's approval.Verification
Head
02980b19.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon the final diff (5 files): 67 derived families, every one run locally with its exit code captured before any pipe (cmd > log 2>&1 < /dev/null; EXIT=$?).--ran: "67 derived, 66 run, 1 NOT-MEASURED, 0 UNRUN".check-skills-token-ratchet(+--self-test),check:skill-examples(the editedos:checkblock indashboards.md; afterpnpm --filter '@objectstack/client-react...' build, the prerequisite it names),check:docs,check:doc-anchors,check:doc-authoring,check:docs-transcript-drift,check-docs-section-name,check:pm-skill-id-lint,check:skill-identifier-liveness,check:skill-frame-sync,check:dts-closure,check:pm-governed-merges,check-empty-changeset --base origin/main,check-adr-0087-registration --base origin/main,check:published-files,check-changeset-no-major.check:dual-build-cjs-loads, exit 3 (needs every package'sdist; 68 packages unbuilt here). CI runs it.node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-4snjmh: "GOVERNED — landing tier: H(人合)",skills/**×2 (field-types.md,dashboards.md);content/docs/**×2 and the changeset are off the register; size 47 changed lines, under the human-merge threshold. Exit 3 (its GOVERNED verdict).--no-inline-configon the four edited files: exit 0. The repo-widepnpm lintis CI's.!in the title, no(narrowing)arm).objectstack-ai/objectstack).Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (eslint--no-inline-configon the four files: exit 0; the repo-wide run is CI's.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5nqSVzKxNiy5ZH2o44