Skip to content

refactor(types)!: delete the api-types module and its eight names nothing reads - #31002

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

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

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Part of #25921 (batch 9, claim 6688016193 with amendments naming the branch and 6688131809 naming the batch; the card's other open items stay on it)

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

维护者速读

What changes

@object-ui/types (its . entry) loses the whole src/api-types.ts module, which was the entry's "API and Events" block. All 8 names are deleted from the package, not only from the entry:

HTTPMethod, APIRequest, APIConfig, DataFetchConfig, DataFetchableSchema, ExpressionContext, ExpressionNodeSchema, APISchema.

  • src/api-types.ts: deleted (342 lines). Its only other content was the objectui#6497 tombstone for UIEventHandler / EventableSchema.
  • src/index.ts: the "API and Events" export block is replaced by a comment that names the 8 retired names (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 carries the objectui#6497 tombstone, moved verbatim in substance from the deleted module (seat ruling A, amendment 6688131809). One sentence is reworded (the dialog member's action entries) so the barrel does not match the \.actions\b anchor of handler-keys-string-any-mirrors-7344.test.ts's prose census.
  • src/__tests__/eventable-schema-retired-6497.test.ts: see Tests.
  • .changeset/25921-types-api-block.md: one ! patch changeset, BREAKING, FROM/TO per group (no replacement in this package; data goes through DataSource, expressions through @object-ui/core's ExpressionEvaluator and its own ExpressionContext class), and the ADR-0087 runtime-export-retired marker naming all 8.

No other module changes shape. api-types.ts was reached only through the . entry; no subpath entry of the package exported it.

Tests

The objectui#6497 pin is reshaped per the seat's ruling; every assertion it had that UIEventHandler / EventableSchema stay unexported is kept, only the file it reads moved:

  • Module legs: the two @ts-expect-error legs on import('../api-types') and their module lit control go with the module; a runtime leg asserts api-types.ts does not exist, with the barrel's existence as the lit control on the same probe.
  • Declaration check: reads index.ts for export interface|type UIEventHandler / EventableSchema (absent), lit control AnySchema on the same matcher; the "tombstone stays" text check reads index.ts.
  • The APISchema-arm check becomes "the barrel's AnySchema union carries no EventableSchema arm", lit control BaseSchema on the same extracted text.
  • Barrel legs: both @ts-expect-error legs on import('../index') stay; type lit controls are now BaseSchema and AnySchema; the export-list matcher's lit control is BaseSchema.
  • Tree scan: the api-types.ts exclusion row is gone (the file is gone); its ActionDef lit control stays.
  • Mutation check: restoring api-types.ts from origin/main reds the module leg ("the DECLARING module is gone…"), 1 failed / 5 passed; removed again, 6 passed.

Verification

Census (read-only, before any edit; origin/main 1aeeafd, hotcrm 6961ab1)
  • 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: 724 entry names, 163 zero-outside, 61 candidates.
  • 7 of the 8 have 0 hits outside ui/packages/types/ in either repository (CHANGELOG record lines only).
  • ExpressionContext has homonym hits only, each resolved to another declaration: core's class core/src/evaluator/ExpressionContext.ts (and its evaluator and tests), app-shell's useExpressionContext hook and its React-context header comment, and prose naming core's file (content/docs/frontend/architecture-overview.mdx:207, skills/objectui/guides/schema-expressions.md:15). No file importing @object-ui/types reads it; hotcrm has 0.
  • No zod twin, not an arm of AnySchema, no subpath entry, not taught.
  • Positive control on the same tool: BaseSchema (470 files).
  • No pending changeset names any of the 8; none of the 44 open PRs touches ui/packages/types/.
Local runs on head 643031b (base 1aeeafd)
  • env -u OS_SKIP_DTS pnpm --filter '@object-ui/types' build (after removing dist and tsconfig.tsbuildinfo): exit 0, dist completeness 162 files; dist has no api-types.* and 0 files naming HTTPMethod, DataFetchConfig, DataFetchableSchema, ExpressionNodeSchema or APISchema; BaseSchema is in 63.
  • pnpm --filter @object-ui/types run type-check (src, examples, tests; makes the @ts-expect-error legs real): exit 0.
  • pnpm --dir ui exec vitest run packages/types/: Test Files 387 passed (387), Tests 10462 passed (10462). The first run went red in one file, handler-keys-string-any-mirrors-7344.test.ts (its prose census matched the moved tombstone's dialog.actions[] wording in index.ts); fixed by the rewording above, then green.
  • node scripts/pm/dispatch-gates.mjs --commands: 36 derived families, every line run with stdin closed; --ran reconciliation: 36 run, 0 NOT-MEASURED, 0 UNRUN, all exit 0. One of them, pnpm --dir ui exec vitest run scripts/, went red first in unit-registry-absence-collision.test.ts ("Failed to resolve entry for package @objectstack/client", no dist in this fresh worktree); after pnpm --filter '@objectstack/client...' build the rerun is Test Files 170 passed, 2 skipped (172), Tests 4991 passed, 2 skipped.
  • node scripts/check-sdui-manifest.mjs: exit 0. node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0. pnpm --dir ui run check:new-line-citations: 0 new citations.
  • Full dogfood (owed by the (narrowing) arm), head 643031b: bash scripts/pm/os-verify-lock.sh -c "pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test": VERDICT command-exit 0; Test Files 427 passed, 3 skipped (430); Tests 3556 passed, 41 skipped (3597).

Acceptance notes


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibzeiKfRPSysJDdZzQL

…hing reads

The whole ui/packages/types/src/api-types.ts module goes, with the
barrel's "API and Events" block: HTTPMethod, APIRequest, APIConfig,
DataFetchConfig, DataFetchableSchema, ExpressionContext,
ExpressionNodeSchema and APISchema. None has a reader in the workspace
or in hotcrm; the ExpressionContext hits elsewhere are core's own class.

The objectui#6497 tombstone the module carried moves into the barrel
where the block stood, and the 6497 pin now asserts the declaring file is
gone, keeps its barrel legs with lit controls on BaseSchema / AnySchema,
and reads the tombstone from the barrel.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzeiKfRPSysJDdZzQL
@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 643031b · 2026-11-06T16:26Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 643031bf288f5f6bbd7cc6982048b911ab30a58b
Local-runs: none
Scope: the PR's four files (.changeset/25921-types-api-block.md; ui/packages/types/src/index.ts diff and head lines 104, 820-870, 1115-1143; ui/packages/types/src/__tests__/eventable-schema-retired-6497.test.ts, old and new in full; ui/packages/types/src/api-types.ts as it stood on origin/main), plus ui/packages/types/package.json (exports), ui/packages/types/vite.config.ts, ui/packages/types/README.md, ui/packages/types/src/base.ts:89-94, ui/packages/types/src/__tests__/handler-keys-string-any-mirrors-7344.test.ts (lines 353-357, 367-368, 590-670), ui/packages/app-shell/src/providers/ExpressionProvider.tsx (imports), scripts/check-changeset-no-major.mjs, scripts/pm/clause2-line.mjs, scripts/check-adr-0087-registration.mjs (breakingDeclaration, readFromBlock, predicates 1-3), .changeset/config.json fixed group, precedent .changeset/25921-types-driver-datasource-block.md (merged #30852 as 2cf269f078), seat amendment 6688131809, PR #31002 body. hotcrm at 6961ab1.

① Derived judgments

  • Diff: 4 files, +119/-409, merge-base 1aeeafd9. No other pending changeset names any of the 8.
  • Readers on head: git grep -n -w NAME -- ui packages apps examples skills content docs scripts ':!*CHANGELOG.md' ':!.changeset' for HTTPMethod, APIRequest, APIConfig, DataFetchConfig, DataFetchableSchema, ExpressionNodeSchema, APISchema: every hit is the new comment in ui/packages/types/src/index.ts:826-852 (and the 6497 pin). Zero code readers, zero docs.
  • ExpressionContext homonyms, each its own declaration: core's export class ExpressionContext (ui/packages/core/src/evaluator/ExpressionContext.ts:21) and its readers; ui/packages/app-shell/src/providers/ExpressionProvider.tsx:2 is a header comment (imports from core/react/permissions/formula; declares its own ExpressionContextValue); content/docs/frontend/architecture-overview.mdx:207 and skills/objectui/guides/schema-expressions.md:15 name core's file. None imports it from @object-ui/types.
  • hotcrm: 0 hits for all 8; 0 imports of @object-ui/types.
  • d.ts integrity: no from './api-types' left; no zod file names any of the 8; AnySchema (index.ts:1115-1140) has none of them; api-types appears only in the pin, the index.ts comment and an unrelated lockfile entry.
  • Subpaths: package.json exports ., ./base, ./layout, ./form, ./data-display, ./feedback, ./overlay, ./navigation, ./complex, ./data, ./zod, ./internal/retired-field-keys; none reaches api-types. README teaches DataSource only; type: 'expression' is not a registered node type.
  • Pin, old vs new, every UIEventHandler / EventableSchema assertion: the @ts-expect-error import('../api-types') legs become existsSync(api-types.ts) === false with index.ts lit control (strictly stronger); barrel @ts-expect-error legs kept verbatim; lit controls move to BaseSchema / AnySchema; declaration test now reads index.ts with lit control AnySchema, and the "tombstone stays" text check matches index.ts:831; union-arm test reads AnySchema with lit control BaseSchema; barrel export-list absence legs kept; tree scan kept, only the exclusion row for the deleted file dropped. Nothing weakened.
  • Tombstone fidelity (old api-types.ts:146-186 → index.ts:831-864): substance whole; bold labels flattened for a // comment, {@link} → code spans, "(since deleted) APISchema union", one added "(it moved here …)" note; the one reworded sentence ("The action entries of its dialog member carried …") keeps the meaning and avoids the 7344 census anchor \.actions\b, which allows packages/types prose only in its two declaring test files.

② Semver level

'@object-ui/types': patch with refactor(types)!:, **BREAKING**, Clause-②: no (narrowing), Metadata-protocol: none (PR body and changeset identical). @object-ui/types is in the fixed group; the level follows the metadata protocol (a declared none grades patch) and breaking-ness rides the bang, the banner and the ADR-0087 disposition. ADR-0087 marker: 8 @object-ui/types#Name operands; readFromBlock reads two - FROM … TO … segments whose FROM spans are exactly the 8, each once; TO spans not read; no arrows or tables. Same shape as batch 8 (#30852) and #30791.

③ Boundary flags

  • None crossed: one package, no spec schema, zod mirror, stored metadata or hotcrm consumer. Only a hypothetical external npm importer of one of the 8 is affected; the changeset names each with FROM/TO.
  • Non-blocking: the pin's ^export type AnySchema =([^;]*); extraction stops at a ; inside the union's comment at index.ts:1142, so arms after that line are outside that one matcher; the declaration matcher and tree scan still cover any re-declaration.

④ Design judgment

Dead surface only. The 8 names described a data-fetch / expression-node dialect no renderer, adapter or host ever read; none was an AnySchema arm or had a zod mirror. Deleting the module whole (seat option A) rather than keeping an export-less file is right, and the relocated tombstone keeps the #6497 ruling where the pin reads it. The FROM/TO guidance (DataSource; core's ExpressionContext class) is accurate.

Implemented-by: claude/project-thread-e6brg0
Reviewed-by: session_01L9qibxW6qraU2Z3mwupUGp

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp

维护者速读

席位核对 — ACCEPT · head 643031b

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 6, 2026 16:44
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 42257535677 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/admin-platform-admin-standing.dogfood.test.ts > #9482: what an ObjectStack platform admin gets from every /admin/ route > no /admin/ route refuses the
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: the stack serves /admin/ route(s) this file neither admits, refuses-by-design, nor classifies as answering for a non-authorization reason. A new admin route 
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 11 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibzeiKfRPSysJDdZzQL

Queue ejection 42257535677 is not this PR's. The queue build ran on gh-readonly-queue/main/pr-31002-45b4e886, whose base 45b4e886 is #30991's speculative queue commit (SCIM credential routes), not main (69e133ea). The failing assertion in packages/qa/dogfood/test/admin-platform-admin-standing.dogfood.test.ts:795 names exactly the two routes #30991 adds and does not classify: POST /api/v1/auth/admin/scim/mint-credential and POST /api/v1/auth/admin/scim/revoke-credential. origin/main has 0 hits for mint-credential. This PR touches only @object-ui/types (TypeScript-only) and its own full dogfood on head 643031bf passed (427 files / 3556 tests). Fix belongs on #30991 (classify the two routes in that file); this head can be re-queued unchanged once #30991 is out of the group ahead of it. Tracking issue: #31012.

Merged via the queue into main with commit ac5d0ce Nov 6, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-e6brg0 branch November 6, 2026 17:32
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