Skip to content

refactor(types)!: delete the fifteen driver and datasource interfaces nothing reads - #30852

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-0r9l9y
Nov 6, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-0r9l9y

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Part of #25921 (batch 8, claim 6677520603 with amendments 6677541846 and 6677640939; the card's other open items stay on it)

Clause-②: no (narrowing)
Metadata-protocol: none

维护者速读

  • 改了什么:从 @object-ui/types 删除 data-protocol.ts 末尾的 15 个服务端驱动与数据源接口(SqlDriverInterface、DatasourceManager、ConnectionPool 等),连同入口上的两组导出。
  • 为什么改: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 清理零消费者公开面;这些接口描述的是服务端 SQL 驱动和数据源管理器,没有任何渲染器、适配器或宿主实现它们,仓内与 hotcrm 都没有引用,留着只会被当成 UI 协议包的公开承诺。
  • 风险与回滚:只删 TypeScript 类型,运行时零变化;对外部 npm 使用者是破坏性变更,带一个 ! patch changeset(BREAKING、FROM/TO、ADR-0087 runtime-export-retired 15 个)。回滚即 revert 本 PR。
  • 先看:ui/packages/types/src/index.ts(删掉的两组导出)、.changeset/25921-types-driver-datasource-block.md(迁移说明)、ui/packages/types/src/__tests__/report-chart-query-spec-parity.test.ts(按席位裁决删两行)。
  • 两分钟验证:git grep -w -e SqlDriverInterface -e DatasourceManager -- ui/packages/types/src 预期 0 命中;pnpm --dir ui exec vitest run packages/types/ 预期全绿。
  • 需要你做的:无,席位落地。

What changes

@object-ui/types (its . entry) loses the "Phase 3.6" driver interfaces and the "Phase 3.7" datasource interfaces at the end of src/data-protocol.ts. All 15 are deleted from the package, not only from the entry, because their only readers were each other:

SqlDriverInterface, ConnectionConfig, DriverQueryResult, BatchOperation, BatchResult, TransactionContext, CacheManager, ConnectionPool, DatasourceRegistration, DatasourceType, DatasourceMetric, DatasourceAlert, DatasourceManager, HealthCheckResult, DatasourceMetrics.

  • src/index.ts: the two comment-headed groups go from the ./data-protocol.js named list. Every other name of that list stays.
  • src/data-protocol.ts: the block is deleted; the module header stops naming the two interfaces.
  • src/data.ts: the BatchTransactionOperation docblock stops contrasting itself with the deleted driver-level BatchOperation.
  • src/__tests__/report-chart-query-spec-parity.test.ts: see Tests.
  • .changeset/25921-types-driver-datasource-block.md: one ! patch changeset, BREAKING, FROM/TO per group (no replacement in this package; the platform's contracts are DriverInterface and DatasourceSchema in @objectstack/spec/data), and the ADR-0087 runtime-export-retired marker naming all 15.

No module other than data-protocol.ts changes shape. data-protocol.ts is reached only through the . entry; no subpath entry of the package re-exports it.

Tests

  • Two it.each rows dropped, by the seat's ruling (amendment 6677640939, answer A): report-chart-query-spec-parity.test.ts pinned "the spec does not own SqlDriverInterface" and "… DatasourceRegistration". With both names gone there is no ui name left for the spec to collide with. The file's "Renamed" docblock bullet drops the two names with them. Every other row of the file stays, including the spec-owned positive list (DriverInterface, DatasourceSchema among it).
  • No test is added: the deletion is TypeScript-only, and the absence is held by check-adr-0087-registration reading the 15 operands against the built entry.

Verification

Census (read-only, before any edit; origin/main 9b24f3c, hotcrm 6961ab1)
  • Method: 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 the package README / demo / docs, and not named by a kept export's declaration.
  • 10 of the 15 have 0 hits outside ui/packages/types/ in either repository.
  • 5 have homonym hits only, each resolved to another declaration: ConnectionConfig (mysql2's class, in service-datasource comments and a test), BatchResult (a test-local interface in plugin-security), HealthCheckResult (the cli doctor's own interface), CacheManager (prose in hotcrm's archived legacy specs about another class). None imports @object-ui/types.
  • Positive controls in the same module: DriverQueryConfig, ObjectValidationRule (kept; still exported, still in the built dist).
  • No pending changeset names any of the 15; none of the 37 open PRs touches ui/packages/types/.
Local runs on head 7577983 (base c17719d)
  • env -u OS_SKIP_DTS pnpm --filter '@object-ui/types...' build: VERDICT command-exit 0. The built dist has 0 files naming SqlDriverInterface, DatasourceManager, HealthCheckResult or ConnectionPool; DriverQueryConfig is in 2.
  • pnpm --filter @object-ui/types run type-check (src, examples, tests): exit 0.
  • pnpm --dir ui exec vitest run packages/types/: Test Files 387 passed (387), Tests 10462 passed (10462).
  • node scripts/pm/dispatch-gates.mjs --commands: 35 derived families, every line run with stdin closed; --ran reconciliation: 35 run, 0 NOT-MEASURED, 0 UNRUN, all exit 0.
  • pnpm --dir ui exec vitest run scripts/: the first run went red in two files (unit-registry-absence-collision.test.ts: "Failed to resolve entry for package @objectstack/formula"; date-only-zone-pins-10183.test.ts: the forked runs "ran no case at all"), because @objectstack/formula had no dist in this fresh worktree. After pnpm --filter '@objectstack/formula...' build both files pass (2 files, 44 tests), and the full rerun is Test Files 170 passed, 2 skipped (172), Tests 4970 passed, 2 skipped.
  • node scripts/check-sdui-manifest.mjs: exit 0.
  • node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0 (no anchored file in the change set).
  • pnpm --dir ui run check:new-line-citations: 0 new citations.
  • Full dogfood (owed by the (narrowing) arm): head 7577983, bash scripts/pm/os-verify-lock.sh -c "pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test": VERDICT command-exit 0; Test Files 423 passed, 3 skipped (426); Tests 3533 passed, 41 skipped (3574); no failure.

Acceptance notes


Generated by Claude Code

… nothing reads

The Phase 3.6 driver and Phase 3.7 datasource interfaces at the end of
data-protocol.ts were read only by each other, and nothing in the
workspace or hotcrm imports them. Two parity-test rows that guarded a
spec collision for two of the names go with them.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibwHV3BxRgPuX4fK7sj
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 6, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp

Contract-review-claim: session_01L9qibxW6qraU2Z3mwupUGp · head 7577983 · 2026-11-06T06:41Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 757798318ea3b2938f6067cfc66f29d5bafa4797
Local-runs: none
Scope: .changeset/25921-types-driver-datasource-block.md, ui/packages/types/src/data-protocol.ts, ui/packages/types/src/index.ts, ui/packages/types/src/data.ts, ui/packages/types/src/tests/report-chart-query-spec-parity.test.ts + ui/packages/types/package.json (exports map), .changeset/config.json, .changeset/25921-core-zero-consumer-exports.md, .changeset/25921-components-helpers-and-family-heads.md at 7da99b7 (merged PR #30791), scripts/check-adr-0087-registration.mjs (readDisposition, parseExportOperand, readFromBlock, verifyRuntimeExportRetired), scripts/check-changeset-no-major.mjs, scripts/pm/clause2-line.mjs, hotcrm at 6961ab1

① Derived judgments

  • Diff shape: 5 files, +24/-701. data-protocol.ts loses only the Phase 3.6/3.7 block and a two-line header-comment rewrite; no declaration is added or altered. index.ts drops exactly the two comment-headed groups (15 names) from the ./data-protocol.js list. data.ts edits one docblock sentence.
  • Unread outside the block: git grep -n -w NAME 7577983 -- ui/ packages/ apps/ examples/ skills/ content/ per name, then a second pass over docs/, scripts/, .github/ and root files (CHANGELOGs and .changeset excluded). Eleven names: zero hits. Four have homonym hits only, each a different declaration: ConnectionConfig = mysql2's class (service-datasource comments and test), BatchResult = a test-local interface in plugin-security comment-reaction-own-record-floor.test.ts:224, HealthCheckResult = the cli doctor's own non-exported interface (doctor.ts:39), CacheManager = hotcrm legacy prose. No docs page teaches any of the 15.
  • Kept exports and d.ts: no remaining line of data-protocol.ts, index.ts, data.ts or any zod file names a deleted symbol; the block was self-referential and leaves whole.
  • Subpath reachability: the exports map has ., ./base, ./layout, ./form, ./data-display, ./feedback, ./overlay, ./navigation, ./complex, ./data, ./zod, ./internal/retired-field-keys; no ./data-protocol; the only non-test importer of data-protocol is src/index.ts. Reachable from . only.
  • Zod twin / spec schema: none for any of the 15. The spec owns DriverInterface and DatasourceSchema, which the kept rows of the parity test still assert.
  • hotcrm at 6961ab1: 0 imports from @object-ui/types; only legacy archive prose names an unrelated CacheManager.
  • Test-row deletion: the two dropped it.each rows asserted a renamed LOCAL name does not collide with a spec export; with the local names deleted there is nothing left to collide. Every other row stays.

② Semver level

! patch with BREAKING, Clause-②: no (narrowing), Metadata-protocol: none: the same structure as merged PR #30791's changeset and the head sibling 25921-core-zero-consumer-exports.md. @object-ui/types is in the fixed group and check-changeset-no-major grades a Metadata-protocol: none entry patch, so BREAKING is the carrier. ADR-0087 marker: readDisposition reads not-required (runtime-export-retired …) with 15 operands and a non-empty why; each @object-ui/types#Name parses; predicate 1 (exported at base, gone at head) holds for all 15; predicate 2 (no zod/spec/contract declaration at base) holds; predicate 3: the FROM sides of the two bullets name 8 + 7 = 15 spans matching the marker 1:1, TO-side spans are not read, no arrows.

③ Boundary flags

  • Nit, non-blocking: the parity test's prose near the Renamed list still says "these six"; no assertion depends on the count.
  • The ADR-0087 gate was read, not run here; CI runs it on the head.

④ Design judgment

Dead surface only. The 15 names described a server-side SQL driver and a datasource manager inside a client UI types package; nothing in the workspace or hotcrm implements, constructs, imports or documents them, and the platform's real contracts live in @objectstack/spec/data. The client data path (DataSource, BatchTransactionOperation) is untouched. No declared capability a consumer could exercise is taken away.

Implemented-by: claude/project-thread-0r9l9y
Reviewed-by: session_01L9qibxW6qraU2Z3mwupUGp

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp

维护者速读

席位核对 — ACCEPT · head 7577983

  • 形态:5 个文件,+24/−701。check-governed-merges --branch origin/claude/project-thread-0r9l9y:0/5 路径在受管面,725 行 ≤ 3000。Part of #25921,目标 main。批次与认领 6677520603 及修订 6677541846、6677640939 一致。本 PR 由本席派出的卡线程实现(claude/project-thread-0r9l9y),席位自己不写码。
  • 契约(收窄,契约复审档):Clause-②: no (narrowing),Metadata-protocol: none,@object-ui/types patch,! 标题、BREAKING、FROM → TO、ADR-0087 runtime-export-retired ×15。CONTRACT_REVIEW_TIER 复审 6679019070 在本 head 上 PASS,无必改项;唯一 nit 是 parity 测试注释里的 "these six" 计数,不影响断言,留着。
  • 席位自己核对:在本 head 上 git grep -w 十个非同名名字,ui/packages/apps/examples/skills/content 全部 0 命中;正控 DriverQueryConfig 命中 core/src/query/query-ast.ts。changeset 两条 FROM 行逐句对 diff:15 个名字恰好对应删掉的 15 个导出,TO 侧所指 DataSource、BatchTransactionOperation 在 data.ts 保留,DriverInterface / DatasourceSchema 在 spec。parity 测试删的两行按裁决 A(6677640939),其余行不动。
  • 前提实测:dev 报告 6678898753(status done)。types 387 个文件 / 10462 个测试全绿,type-check 0;派生门禁 35/35 exit 0,--ran 0 NOT-MEASURED;完整 dogfood(收窄必跑)426 个文件中 423 过、3 跳过、0 失败。
  • 门禁 check-runs:本 head 55 个,44 success、11 skipped、0 红;mergeable_state clean。
  • 落地条款:维护者常设令 「按 pm-dispatch 审过的pr你可以自主落地」(2026-10-30T14:20Z),本场 「ui 车道跟进一下 3小时内没更新的pr和已派发的issue,接手处理。」。中继 pr_ready,约一分钟后 automerge_enable。合并后在 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 写落地记录和 Release(Part of,卡不关),摘 pm:dispatched,回 pm:queue,清 assignee。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant