Repository navigation
feat(types)!: a static chart node's series refuses the renderer-internal measureFormat carrier by name - #38145
Conversation
Claude-Session: https://claude.ai/code/session_01L9qibvWkyWZ5TH7f1iwUVp Co-authored-by: Claude <noreply@anthropic.com>
… refusal Claude-Session: https://claude.ai/code/session_01L9qibvWkyWZ5TH7f1iwUVp Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 177 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 db454817ef68a0b923e8fc6682f61f23c7fb6622 && git checkout db454817ef68a0b923e8fc6682f61f23c7fb6622
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 608f5a6b90ac1b0c57d92b2121fee1d4ff5c02c2 && git checkout -B drift-repro 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 && git merge --no-ff 608f5a6b90ac1b0c57d92b2121fee1d4ff5c02c2
node scripts/docs-audit/affected-docs.mjs --json 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 |
Claude-Session: https://claude.ai/code/session_01L9qibvWkyWZ5TH7f1iwUVp Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 58dedb3 · 2026-11-28T05:07Z |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Inputs read: card #37214 (body and its 5 comments), PR #38145 (body, file list, comments), the net diff of 5 files against merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing, against the published spec on main: Attempts to break it:
Findings:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 The brief the contract reviewer above was handed, filled, for the seat to read before it adopts the record: Contract review brief — PR #38145 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 608f5a6 · 2026-11-28T05:13Z |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Merge-main record. This head is a merge commit whose parents are Inputs read: card #37214 and its comments, PR #38145 (body, file list, comments), the net diff against main at this head, main's delta ① Derived judgmentsUnchanged from the record on
What main brought in, against each of these:
② Semver level
③ Boundary flags
④ Design judgmentThe judgment on Findings carried forward:
No new finding on this head. No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a: ACCEPT at
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Recorded 2026-11-28T05:57Z. 维护者速读
席位意见:可以合。两个文字 nit(坐标轴 席位核对 — ACCEPT · repo:objectstack#3 · head
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Narrowing approval request at 2026-11-28T05:58Z. Seat record: the newest |
Requested by Tesla · project thread
Fixes #37214
repo:objectstack#3 · os-tesla · session_01L9qibvWkyWZ5TH7f1iwUVp
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — the key is renderer-internal and taught nowhere (
git grep measureFormat -- skills contentfinds 0)维护者速读
What changes
@object-ui/typesChartDataSeriesSchema(zod/data-display.zod.ts) declaresmeasureFormatas aretirementTombstone, beside theaggregaterefusal it mirrors. The series object is non-strict, so until now an authoredmeasureFormatwas kept in the parse output and honoured by the renderer. It is now refused with oneinvalid_typeissue atseries.N.measureFormat; the guidance names the key, says the report and dashboard producers fill it, and points at the authored channel, the axisformat(yAxis: [{ field, format }]), which already takes precedence over the carrier.ChartDataSeries(data-display.ts) types itmeasureFormat?: never, so a typed literal failstsc.DatasetReportRendererandDatasetWidgetbuild their series past this schema and keep filling the carrier.chart-series-measure-format-carrier-refused(packages/spec/src/migrations/entries/semantic/19.chart-series-measure-format-carrier-refused.ts); no D2 conversion, because the carrier has no authored equivalent to rewrite into.@object-ui/typesminor,@objectstack/specminor (the ledger entry ships in its migration registry), with the FROM → TO row and theadr-0087: registeredmarker.Tests
ui/packages/types/src/__tests__/chart-series-aggregate-refusal-11681.test.ts(the existing series-refusal harness), two new top-leveldescribes:{ format: '0.0%', percentScale: 'whole' },{ format: '0,0.00', currency: 'CNY' },{}) is refused byChartDataSeriesSchemawith exactly oneinvalid_typeissue atmeasureFormatwhose message names the key;series.0.measureFormat, with the control node parsing;aggregateandmeasureFormatis refused at both paths, so theaggregaterefusal stays;yAxis: [{ field, format }]on the same node parses;undefinedand the TS twin's member isnever(type-levelEq), and a typed literal carrying it is a@ts-expect-error.Readings at 58dedb3 (base origin/main 10321fa)
ChartDataSeriesSchema.safeParse({ name, measureFormat })→success: truewith the key kept; a static chart node withseries[0].measureFormat→success: true; addingaggregate→ onlyseries.0.aggregaterefused.pnpm --filter @object-ui/types test:Test Files 390 passed (390),Tests 10526 passed (10526)(after a full@objectstack/specbuild with declarations).pnpm --filter @object-ui/types type-checkexit 0;tsc -p tsconfig.test.json --listFilesincludes the harness (1 hit), so the@ts-expect-errorand theEqpins are compiled.scripts/ablation-replace.mjson the committed fix: rename the zod armmeasureFormat→measureFormat_ABLATED→Tests 5 failed | 10 passed (15)(all five runtimemeasureFormatpins); restored, blob == HEAD,git diff HEADempty.measureFormat?: never→measureFormat?: { format?: string }→tsc -p tsconfig.test.jsonexit 2,TS2322at the harness's twinEqpin and atzod-mirror-parity.test.ts's ledger; restored, blob == HEAD.node scripts/check-adr-0087-registration.mjs:1 declared-breaking changeset(s), each carrying an ADR-0087 disposition—[BREAKING+bang+clause-②-narrowing+metadata-protocol-narrowed] registered chart-series-measure-format-carrier-refused.dispatch-gates --commands: 90 derived, 90 run, every one exit 0 on its final run, 0 NOT-MEASURED (a derived zero), 0 unrun (dispatch-gates --ran, listgates-ran-58dedb3e.list). Seven exited non-zero on the first pass for local prerequisites, not this diff, and passed on a re-run: five needed apnpm installafter the worktree was fast-forwarded to a base whose lockfile adds a link, and the dogfood build closure (check:dual-build-cjs-loads,check:lean-entry-closure,check:type-check-debt,check:doc-formula-expressions, the climigrate-meta-engine-guidancetest);check-plugin-teardown-shape --self-testneeded its fixture commit fetched into the shallow clone;uivitest run scripts/needed the built closure (Test Files 172 passed | 2 skipped (174),Tests 5144 passed | 2 skipped (5146)).DatasetReportRenderer.chartChrome,.comparePrevious-36645,.measureFormatCarrierParity-37053,DatasetWidget.integerMeasureTicks-11681andAdvancedChartImpl.axisLabels:Test Files 5 passed (5),Tests 86 passed (86)— the producers still fill the carrier and the axis still reads it.os-verify-lock: VERDICT command-exit 0(pnpm --filter @objectstack/dogfood test, no shard, no path, afterpnpm turbo run build --filter='@objectstack/dogfood^...'exit 0) ·Test Files 490 passed | 3 skipped (493)·Tests 4144 passed | 68 skipped (4212)· no failures.Acceptance notes
@object-ui/types(the static SDUI chart node's zod face) and the TS authoring face. The spec's ownChartSeriesSchemaalready refuses the key as unknown, so no spec schema changes.measureFormatoff a raw node it is handed; this PR closes the authoring door, not the reader, which the producers need.Verification
Read first (by risk):
ui/packages/types/src/zod/data-display.zod.ts: themeasureFormatarm afteraggregateand its guidance string.ui/packages/types/src/data-display.ts:measureFormat?: neverat the end ofChartDataSeries.packages/spec/src/migrations/entries/semantic/19.chart-series-measure-format-carrier-refused.ts.Two-minute check:
cd ui && pnpm --filter @object-ui/types exec vitest run --root ../.. packages/types/src/__tests__/chart-series-aggregate-refusal-11681.test.tsshows 15 passing; rename the zod arm's key and the same command shows 5 failing.Generated by Claude Code