You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e396095
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(types)!: delete nine Spec Report Bridge names nothing reads (#31038)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoDjfmEr3MKz1q8Xz5W6ZahJ)_
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`。
- 为什么改:#25921 清理零消费者公开面;这 9 个名字在仓内与 hotcrm 都没有任何引用(只剩 CHANGELOG 记录行),其中
4 个只是 `@objectstack/spec/ui` 已有符号的改名转出,留着会被当成 UI 协议包的公开承诺。
- 风险与回滚:其中 `mapAggregateToQL`、`isJoinedSpecReport` 是运行时函数,dist
也随之删除;仓内无调用方,Console 与各 `@object-ui/*` 包不受影响。对外部 npm 使用者是破坏性变更,带一个 `!`
patch changeset(BREAKING、FROM/TO、ADR-0087 `runtime-export-retired` 9
个)。回滚即 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 of
`src/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 the
`SpecReportChartSchema` / `SpecReportTypeEnum` constants go, with the
four `@objectstack/spec/ui` imports only they read (`ReportChartParsed`,
`ReportChart`, `ReportChartSchema`, `ReportType`); the "Aggregate
mapping" section (`QLAggregationFunction`, `mapAggregateToQL`) and
`SpecReportAggregate` go, with the header's "Aggregation naming"
paragraph that pointed at them; `JoinedSpecReport` and
`isJoinedSpecReport` go. The rest of the module stays as it was:
`SpecReport`, `SpecReportInput`, `SpecReportTypeName`,
`SpecReportDateGranularity`, `SpecReportSchema`, the `SpecReport`
factory, `LegacyReportPresentationLike`, `specReportToPresentation`,
`isSpecReport`, `JoinedReportBlock`.
- `src/index.ts`: the block's two named lists lose the 9 names; a
comment names them (#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 and
`SpecReportTypeEnum` → `ReportChartParsed` / `ReportChart` /
`ReportChartSchema` / `ReportType` of `@objectstack/spec/ui`; the
aggregate trio and the joined pair → no replacement, with the one-line
rewrite for the guard), and the ADR-0087 `runtime-export-retired` marker
naming all 9.
`spec-report.ts` is 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`: the
`describe('mapAggregateToQL')` block (2 tests) and its import go with
the function; the schema, adapter and `isSpecReport` blocks stay.
- `src/__tests__/spec-ui-schema-reexports.test.ts`: the
`SpecReportTypeEnum` `toBeDefined` line goes; the `SpecReportSchema`
line stays as the control for the same assertion.
- `src/__tests__/report-chart-query-spec-parity.test.ts`: the two
derivation pins on `JoinedSpecReport.blocks`
(`_joinedReportBlocksAreTheSpecReportBlocks`,
`_joinedReportBlocksAreParsedTier`, their `PublishedJoinedBlocks` alias
and `void` lines), the `JoinedSpecReport` import, the
`JoinedReportBlockParsed` import only they used, and the header prose
naming them. Every `JoinedReportBlock` pin (state, derivation, member)
stays. The file is compiled by the package's `type-check` (`tsc -p
tsconfig.test.json` lists it).
- No ablation: a deletion of exports with no tested behaviour left
behind. The reverse probe below is the proof that the built `.d.ts` is
the one read.
## Verification
<details><summary>Census (read-only, before any edit; origin/main
0306761, hotcrm 6961ab1)</summary>
- Tool: the batch 8 census (TS AST of every published `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.ts` 10 of them. Note: this project's files
`ui-seat-3/r2026-11-06/25921-b10-census.md`.
- `git grep -lw` per name: every hit outside `ui/packages/types/` is a
CHANGELOG record line (types, ui, app-shell, components, core); hotcrm 0
for all 9.
- Readers among the 9 are each other only (`mapAggregateToQL`'s
signature names `SpecReportAggregate` / `QLAggregationFunction`;
`isJoinedSpecReport` names `JoinedSpecReport`). No zod twin, not an arm
of `AnySchema`, no subpath entry, not taught.
- Kept on rule 3 although the tool listed it:
`SpecReportDateGranularity`, reached through `specReportToPresentation`
→ `LegacyReportPresentationLike.groupBy[].dateGranularity` (the tool's
one-level proxy does not see the transitive reach).
- Positive controls, same module, same tool: `specReportToPresentation`
(4 files outside the package), `isSpecReport` (1).
- No pending changeset names any of the 9; none of the 29 open PRs
touches `ui/packages/types/`.
</details>
<details><summary>Local runs on head 6db3704 (base 0306761)</summary>
- `env -u OS_SKIP_DTS pnpm --filter '@object-ui/types...' build` (fresh
worktree, no prior `dist`): VERDICT command-exit 0. Built `dist`: 0
files name `mapAggregateToQL`, `isJoinedSpecReport` or
`SpecReportChartSchema`; the control `specReportToPresentation` is in 5.
- `pnpm --filter @object-ui/types run type-check` (src, examples, and
`tsconfig.test.json`, which lists
`report-chart-query-spec-parity.test.ts`) and `pnpm --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 two
`mapAggregateToQL` tests).
- Reverse probe against the built `dist/index.d.ts`: a scratch file
importing the 9 names plus the controls `isSpecReport` and
`specReportToPresentation`, `tsc --noEmit --module nodenext`: 9 errors
(TS2305 / TS2724, one per retired name), 0 on the control line.
- `node scripts/pm/dispatch-gates.mjs --commands` on 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); `--ran`
reconciliation: 36 run, 0 NOT-MEASURED, 0 UNRUN.
- `origin/main` merged (9 commits, none under `ui/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.
- Full dogfood (owed by the `(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).
- Records: this project's files `ui-seat-3/r2026-11-06/25921-b10/`
(`gates-ran-a63b2a0f.list`, `gates-ran-6db37048.list`,
`reverse-probe.txt`).
</details>
## Acceptance notes
- Still open on #25921 after this batch: `clearSharedDiscoveryCache`
(needs a test-support home first) and the other barrel batches.
`@object-ui/types` keeps about 45 more candidates (`product-blocks.ts` /
`designer.ts` whose census hits are reached through kept unions,
`data-protocol.ts` 6, `ui-action.ts` 4, the `@objectstack/spec/ui`
re-exports 7 and others). Census and tools: this project's files
`ui-seat-3/r2026-11-06/25921-b10-census.md`.
- `types/src/ai.ts` keeps its `never` tombstones until the sunset rule
of #25912; not touched here.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibyCtmv9kCQuHZPh6eW)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L9qibyCtmv9kCQuHZPh6eW
Co-authored-by: Claude <noreply@anthropic.com>
refactor(types)!: delete nine Spec Report Bridge names nothing reads
6
+
7
+
Clause-②: no (narrowing)
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/types#SpecReportChart, @object-ui/types#SpecReportChartInput, @object-ui/types#SpecReportChartSchema, @object-ui/types#SpecReportTypeEnum, @object-ui/types#SpecReportAggregate, @object-ui/types#QLAggregationFunction, @object-ui/types#mapAggregateToQL, @object-ui/types#JoinedSpecReport, @object-ui/types#isJoinedSpecReport) the retired operands are package re-exports of `@objectstack/spec/ui` symbols, two string unions, a helper function and a type guard that no renderer, adapter or host reads; nothing in the workspace or in hotcrm imports any of them from the package entry, they are not arms of `AnySchema`, and the spec schemas they re-exported stay where they are in `@objectstack/spec/ui`, so no stored shape, registered node type or conversion surface changes and there is nothing for `objectstack migrate meta` to rewrite -->
11
+
12
+
**BREAKING** for a host that imports any of these nine names from `@object-ui/types`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected.
13
+
14
+
They are **gone from the package, not only from the entry**: `src/spec-report.ts` no longer declares them. Two of them, `mapAggregateToQL` and `isJoinedSpecReport`, are runtime values, so the built `dist` loses them too. The rest of the Spec Report Bridge stays: `SpecReport`, `SpecReportInput`, `SpecReportTypeName`, `SpecReportDateGranularity`, `SpecReportSchema`, `LegacyReportPresentationLike`, `specReportToPresentation`, `isSpecReport` and `JoinedReportBlock`.
15
+
16
+
What leaves, and what to write instead:
17
+
18
+
- FROM `SpecReportChart` TO `ReportChartParsed` from `@objectstack/spec/ui`.
19
+
- FROM `SpecReportChartInput` TO `ReportChart` from `@objectstack/spec/ui`.
20
+
- FROM `SpecReportChartSchema` TO `ReportChartSchema` from `@objectstack/spec/ui`.
21
+
- FROM `SpecReportTypeEnum` TO `ReportType` from `@objectstack/spec/ui`.
22
+
- FROM `SpecReportAggregate`, `QLAggregationFunction`, `mapAggregateToQL` TO no replacement. A spec report is dataset-bound: its `values` name measures whose aggregation the dataset declares, so there is no per-column aggregate left to translate.
23
+
- FROM `JoinedSpecReport`, `isJoinedSpecReport` TO no replacement in this package. Test `isSpecReport(value) && value.type === 'joined'` and read `value.blocks`, each a `JoinedReportBlock`.
0 commit comments