Repository navigation
refactor(types)!: delete nine Spec Report Bridge names nothing reads - #31038
Conversation
Nine names of ui/packages/types/src/spec-report.ts leave the package: the chart re-export trio, SpecReportTypeEnum, the aggregate-mapping trio and the joined-report wrapper type with its guard. Their in-package test pins go with them; the JoinedReportBlock pins and SpecReportSchema control stay. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyCtmv9kCQuHZPh6eW
|
domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp Contract-review-claim: session_01L9qibxW6qraU2Z3mwupUGp · head 6db3704 · 2026-11-06T19:29Z |
|
domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flagsNone. No ④ Design judgmentDead surface only. Four names were renames of Implemented-by: VERDICT: PASS |
|
domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp 维护者速读
席位核对 — ACCEPT · head 6db3704
|
Requested by Tesla · project thread
Part of #25921 (batch 10, claim 6691851032 with amendments 6691892486 naming the branch and 6691972228 naming the batch; the card's other open items stay on it)
Clause-②: no (narrowing)
Metadata-protocol: none
维护者速读
@object-ui/types的spec-report.ts(入口上的 "Spec Report Bridge" 一组)删除 9 个没人读的名字:SpecReportChart、SpecReportChartInput、SpecReportChartSchema、SpecReportTypeEnum、SpecReportAggregate、QLAggregationFunction、mapAggregateToQL、JoinedSpecReport、isJoinedSpecReport。@objectstack/spec/ui已有符号的改名转出,留着会被当成 UI 协议包的公开承诺。mapAggregateToQL、isJoinedSpecReport是运行时函数,dist 也随之删除;仓内无调用方,Console 与各@object-ui/*包不受影响。对外部 npm 使用者是破坏性变更,带一个!patch changeset(BREAKING、FROM/TO、ADR-0087runtime-export-retired9 个)。回滚即 revert 本 PR。ui/packages/types/src/spec-report.ts(删掉的声明与两条 spec 导入)、.changeset/25921-types-spec-report-bridge.md(迁移说明)、ui/packages/types/src/__tests__/report-chart-query-spec-parity.test.ts(按席位裁决 A 删掉两条JoinedSpecReport.blocks派生钉子,JoinedReportBlock的钉子全部保留)。git grep -lw -e mapAggregateToQL -e JoinedSpecReport -- ui/packages预期只命中ui/packages/types/src/index.ts的退役注释(及 CHANGELOG);pnpm --dir ui exec vitest run packages/types/预期全绿。What changes
@object-ui/types(its.entry) loses 9 names ofsrc/spec-report.ts, the entry's "Spec Report Bridge" block. They are deleted from the module, not only from the entry:SpecReportChart,SpecReportChartInput,SpecReportChartSchema,SpecReportTypeEnum,SpecReportAggregate,QLAggregationFunction,mapAggregateToQL,JoinedSpecReport,isJoinedSpecReport.src/spec-report.ts: the chart type pair and theSpecReportChartSchema/SpecReportTypeEnumconstants go, with the four@objectstack/spec/uiimports only they read (ReportChartParsed,ReportChart,ReportChartSchema,ReportType); the "Aggregate mapping" section (QLAggregationFunction,mapAggregateToQL) andSpecReportAggregatego, with the header's "Aggregation naming" paragraph that pointed at them;JoinedSpecReportandisJoinedSpecReportgo. The rest of the module stays as it was:SpecReport,SpecReportInput,SpecReportTypeName,SpecReportDateGranularity,SpecReportSchema, theSpecReportfactory,LegacyReportPresentationLike,specReportToPresentation,isSpecReport,JoinedReportBlock.src/index.ts: the block's two named lists lose the 9 names; a comment names them (retire the zero-consumer surface: nine dead modules (2,211 LOC), plugin-ai, runner's publish flag, test-only reset helpers on public barrels, the providers trio, 122 dead i18n keys, root orphans #25921) and where the four spec re-exports' originals live..changeset/25921-types-spec-report-bridge.md: one!patch changeset, BREAKING, FROM/TO per name (the chart trio andSpecReportTypeEnum→ReportChartParsed/ReportChart/ReportChartSchema/ReportTypeof@objectstack/spec/ui; the aggregate trio and the joined pair → no replacement, with the one-line rewrite for the guard), and the ADR-0087runtime-export-retiredmarker naming all 9.spec-report.tsis reached only through the.entry; no subpath entry of the package exports it.Tests
Seat ruling A (amendment 6691972228): only what pins a retired name goes; every other row stays.
src/__tests__/spec-report.test.ts: thedescribe('mapAggregateToQL')block (2 tests) and its import go with the function; the schema, adapter andisSpecReportblocks stay.src/__tests__/spec-ui-schema-reexports.test.ts: theSpecReportTypeEnumtoBeDefinedline goes; theSpecReportSchemaline stays as the control for the same assertion.src/__tests__/report-chart-query-spec-parity.test.ts: the two derivation pins onJoinedSpecReport.blocks(_joinedReportBlocksAreTheSpecReportBlocks,_joinedReportBlocksAreParsedTier, theirPublishedJoinedBlocksalias andvoidlines), theJoinedSpecReportimport, theJoinedReportBlockParsedimport only they used, and the header prose naming them. EveryJoinedReportBlockpin (state, derivation, member) stays. The file is compiled by the package'stype-check(tsc -p tsconfig.test.jsonlists it)..d.tsis the one read.Verification
Census (read-only, before any edit; origin/main 0306761, hotcrm 6961ab1)
ui/packages/*main entry; identifier-token index over every tracked file of both repositories minus CHANGELOGs, changesets, the lockfile and release notes; prose and tests count as consumers; then not taught in README/demo/docs and not named by a kept export's declaration).@object-ui/types: 716 entry names, 156 zero-outside, 54 candidates;spec-report.ts10 of them. Note: this project's filesui-seat-3/r2026-11-06/25921-b10-census.md.git grep -lwper name: every hit outsideui/packages/types/is a CHANGELOG record line (types, ui, app-shell, components, core); hotcrm 0 for all 9.mapAggregateToQL's signature namesSpecReportAggregate/QLAggregationFunction;isJoinedSpecReportnamesJoinedSpecReport). No zod twin, not an arm ofAnySchema, no subpath entry, not taught.SpecReportDateGranularity, reached throughspecReportToPresentation→LegacyReportPresentationLike.groupBy[].dateGranularity(the tool's one-level proxy does not see the transitive reach).specReportToPresentation(4 files outside the package),isSpecReport(1).ui/packages/types/.Local runs on head 6db3704 (base 0306761)
env -u OS_SKIP_DTS pnpm --filter '@object-ui/types...' build(fresh worktree, no priordist): VERDICT command-exit 0. Builtdist: 0 files namemapAggregateToQL,isJoinedSpecReportorSpecReportChartSchema; the controlspecReportToPresentationis in 5.pnpm --filter @object-ui/types run type-check(src, examples, andtsconfig.test.json, which listsreport-chart-query-spec-parity.test.ts) andpnpm --dir ui exec vitest run packages/types/: VERDICT command-exit 0; Test Files 387 passed (387), Tests 10460 passed (10460) (batch 9's 10462 minus the twomapAggregateToQLtests).dist/index.d.ts: a scratch file importing the 9 names plus the controlsisSpecReportandspecReportToPresentation,tsc --noEmit --module nodenext: 9 errors (TS2305 / TS2724, one per retired name), 0 on the control line.node scripts/pm/dispatch-gates.mjs --commandson a63b2a0: 36 derived families, every line run with stdin closed, all exit 0 (pnpm --dir ui exec vitest run scripts/: Test Files 170 passed, 2 skipped (172), after building@objectstack/client...and@objectstack/formula...in this fresh worktree first);--ranreconciliation: 36 run, 0 NOT-MEASURED, 0 UNRUN.origin/mainmerged (9 commits, none underui/packages/types/) → head 6db3704; the derivation is byte-identical. Re-run there with stdin closed, all exit 0:check-adr-0087-registration --base origin/main,check-changeset-no-major,check-empty-changeset,check:type-check-coverage,check:type-check-debt(first attempt exit 3 while the dogfood build held the verify lock; rerun after it: exit 0, "0 raw tsc error(s) total"),check:test-source-alias,check:cross-package-test-inputs,check-sdui-manifest,check:nul-bytes.node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0 (0 anchored files).pnpm --dir ui run check:new-line-citations: 0 new citations.(narrowing)arm), head 6db3704:bash scripts/pm/os-verify-lock.sh -c "env -u OS_SKIP_DTS pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test": VERDICT command-exit 0; Test Files 428 passed, 3 skipped (431); Tests 3562 passed, 41 skipped (3603).ui-seat-3/r2026-11-06/25921-b10/(gates-ran-a63b2a0f.list,gates-ran-6db37048.list,reverse-probe.txt).Acceptance notes
clearSharedDiscoveryCache(needs a test-support home first) and the other barrel batches.@object-ui/typeskeeps about 45 more candidates (product-blocks.ts/designer.tswhose census hits are reached through kept unions,data-protocol.ts6,ui-action.ts4, the@objectstack/spec/uire-exports 7 and others). Census and tools: this project's filesui-seat-3/r2026-11-06/25921-b10-census.md.types/src/ai.tskeeps itsnevertombstones until the sunset rule of docs/adr: a sunset rule for @deprecated tombstones — 574 tags (504 in packages/types, 640 'never' members) with no rule for when a tombstone leaves the authoring face #25912; not touched here.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibyCtmv9kCQuHZPh6eW