Skip to content

tooling(monorepo): 在试验分支上把 objectui 并入 ui/ workspace(subtree add、单 lockfile、turbo 构建图),交冲突清单、必改脚本清单与各类 PR 的 CI 时长读数 — 不落 main(父单 1/6) #25678

Closed

Description

@objectstack-fleet

Filing gate ④:父单 #25677 的子单 1/6。Part of #25677。⛔ 不是认领。

动手的读者: domain:spec 席(按 SKILL.md 锚定规则,根 scripts/ 与 .github/workflows 归本域;车道标签由分诊定)。产出是一份报告评论和一条不合并的分支,不碰受管面。

要做

在 claude/issue-<n>-ui-workspace-spike 分支上:

  1. git subtree add --prefix=ui https://github.com/objectstack-ai/objectui.git main --squash 与不 --squash 各试一次,记录仓体积与 git log 可读性;最终形态按保留历史(不 squash)准备。
  2. pnpm-workspace.yaml 加入 ui/packages/*、ui/apps/*;turbo.json 接入 ui/ 的 build / typecheck / test 任务;根 tsconfig 不吞并 ui/ 的 tsconfig 树。
  3. 单 lockfile:删 ui/pnpm-lock.yaml,pnpm install 后记录每个版本冲突(重点 zod 单实例、vite、react、vitest、eslint),以及为过 check:lockfile-* 门禁需要的 override。
  4. ui/ 包对 @objectstack/* 保持 npm 范围(^18.1.0),通过根 pnpm.overrides 指到 workspace;objectui 的 scripts/objectstack-pin.mjs、.objectstack-sha、preinstall 钩子在分支上移除。
  5. 跑一次:pnpm typecheck、pnpm test(含 ui/ 的分片)、pnpm --filter @object-ui/console build 用本仓 spec;记录每步墙钟时间。
  6. 交报告评论:冲突清单(文件、原因、建议处置);必改脚本清单(对照父单子单 2–4,逐个确认或删减);三类 PR 的 CI 时长估计(只改 ui/、只改 packages/spec、两者都改);build-console.sh 的注入逻辑哪些可以直接删、哪些要搬进 ui/apps/console 的 vite 配置。

Done when

  • 分支推到 origin(不开 PR 或只开 draft 并标注「不合并」),报告评论贴在本卡。
  • 报告回答父单子单 2–4 需要的每个读数;无法测的项目写明原因。
  • 本卡不改 main 上的任何文件。

Size: M(一个席位一到两天)。

Dedupe

同父单 #25677 的查重;本卡是其子单,无独立重复。

Activity

  1. added
    area:devpath
    domain:devx
    pm:awaiting-maintainer
    priority:p1
    tooling
    on Oct 24, 2026
  2. objectstack-fleet commented on Oct 24, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — tooling · priority:p1 · domain:devx · area:devpath · pm:awaiting-maintainer · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-24T15:53Z

    ⛔ Not a claim, ⛔ not a dispatch.

    Maintainer-action: the maintainer releases #25677 for dispatch — done when a maintainer comment on #25677 or here says go


    Generated by Claude Code

  3. added
    pm:dispatched
    pm:epic
    and removed
    pm:awaiting-maintainer
    on Oct 24, 2026
  4. objectstack-fleet commented on Oct 24, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: epic #25677 round 1
    Session: session_01RSDL3SFtJaKzcymvCD8RsU
    Account: os-tesla
    Branch: claude/project-thread-dwhq6r (mode:thread — a project thread pushes only its designated branch)
    Worktree: objectstack (the thread's own checkout)
    Domain: domain:devx
    Seat: epic:#25677
    File surface: ui/** (new subtree), pnpm-workspace.yaml, pnpm-lock.yaml, patches/@radix-ui__react-focus-scope.patch — on the branch only; nothing lands on main from this card
    Container & model: M, mode:thread, model: fable (reason: the maintainer placed this epic in the director's project thread, which runs at the ceiling — Tesla, 2026-10-24 15:17Z, verbatim 「这个任务建议什么时候开始处理,你负责」; dispatch-gates --tier --repo objectstack-ai/objectstack prints no path-derived mandate for the card's paths), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6386288327
    Serial constraints cleared: none — ui/ does not exist on main, no open PR or claim touches the root workspace files, and the branch opens no PR.

    Labels written in the same stroke: pm:epic + pm:dispatched on, pm:awaiting-maintainer off (maintainer-action done on #25677, 15:17Z 「你负责」), assignee os-tesla.


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 24, 2026

    @objectstack-fleet
    ContributorAuthor

    Report: subtree spike — feasible, 12 mechanical findings, no architectural blocker · session_01RSDL3SFtJaKzcymvCD8RsU · 2026-10-24T16:06Z

    Branch: claude/project-thread-dwhq6r (pushed; no PR — see "not measured"). Four commits on top of the full objectui history: 2bc1807eae subtree add of objectui main 0984c77 (#13445, pin already at the 18.1.0 release commit), ec74d9ecfa workspace wiring + single lockfile, 4f3149d015 one react type line, 3efb112efb Console Vite chunk tests made workspace-aware. Base: objectstack main dc6c7ee.

    维护者速读

    可行,没有架构级障碍。objectui 全历史并入 ui/ 2 秒、0 文件冲突;单 lockfile 一次装通(1 分 12 秒);Console 及 72 个依赖包能通过根 turbo 构建,产物通过本仓的"单 zod 金丝雀";objectui 单测在合并后的根下能跑。要在正式切换前做掉的 12 项都是机械性的(下表),其中 3 项 spike 里已顺手修了。两个要你知道的数:Console/app-shell 的 tsc 需要 ≥4 GB 堆;正式切换 PR 有 259 万行变更,按 Tier H 规则只能由维护者人工合并。建议直接进子卡 2。完整中文报告:项目库 d1-merge/spike-report.md。

    Measurements

    Item Reading
    objectui full history (git fetch --unshallow) 8 s, 12 330 commits, 191 MiB pack
    git subtree add --prefix=ui (history kept, no --squash) 2 s, 0 file conflicts (everything lands under ui/)
    ui/ source size (no node_modules) 147 MB; merged local pack 772 MiB
    single-lockfile pnpm install (cold store, not frozen) 1 m 12 s; warm re-install 40–48 s
    merged pnpm-lock.yaml 963 KB, 4 217 package entries (2 813 objectstack + 3 607 objectui before; ~2 200 deduped)
    turbo run build --filter='@object-ui/console^...' (72 packages, cold, 4 vCPU) 7 m 31 s (68/70 green; after the react fix the rest 3 m 15 s)
    pnpm --filter @object-ui/console build 2 m 01 s with NODE_OPTIONS=--max-old-space-size=6144; dist 64 MB, 2 376 chunks
    scripts/build-console.sh --check-single-zod ui/apps/console/dist/assets ✓ exactly one zod literal (4.6.5) in vendor-objectstack-*.js
    objectui vitest --project unit packages/core packages/i18n from ui/ 270 files in 26 s; 3 files fail, all of one kind (rows 1 and 6 below)
    full merge diff (dispatch-gates --tier on this branch) 9 267 paths, 2 589 924 changed lines — ⛔ OVER the 3 000-line human-merge threshold: the cutover PR is a Tier H landing (maintainer merge)

    What the wiring commit does (reusable by the cutover script)

    1. pnpm-workspace.yaml: add ui, ui/packages/*, ui/apps/*, ui/examples/*; carry objectui's security floor overrides (qs, shell-quote, tmp, uuid — dompurify already pinned here) and its @radix-ui/react-focus-scope@1.1.16 patch into root patches/.
    2. ui/package.json: drop the pnpm field (seven file:.objectstack-pin/* pins and the react 19.2.8 pins) and the preinstall pin check.
    3. 32 objectui manifests: 40 "@objectstack/*": "^18.0.0-next.N" ranges → workspace:^ (publishes as ^<version>; one fixed group makes the floor the version itself). ui/packages/core/node_modules/@objectstack/spec now symlinks to packages/spec. The card asked for npm range + root overrides instead; workspace:^ was chosen because pnpm 10 only reads overrides from pnpm-workspace.yaml and the fixed-group ruling makes a floating range meaningless — either shape works mechanically.
    4. Remove ui/pnpm-lock.yaml and ui/pnpm-workspace.yaml (nested roots are ignored); park ui/turbo.json as ui/turbo.objectui.json (a nested turbo.json without extends is a package-config error).

    Findings for sub-issues 2–5

    # Finding Evidence Owner
    1 Pin plumbing to delete: 191 objectstack files reference .objectui-sha/build-console.sh (7 workflows: ci, cut-rc, lint, release, scheduled-full-run-card, showcase-smoke, spec-shape-gate); 33 objectui files reference .objectstack-pin/.objectstack-sha (13 workflows); 12 objectui files implement a semver "spec floor" that workspace:^ voids — one unit test already fails on it grep counts; normalize-list-view.declaredSpecFloor-9012.test.ts 3, 4
    2 tsc heap: @object-ui/app-shell and the Console tsc OOM at the default ~2 GB heap; with 6 GB they use 2.3 GB (3 574 files, 1.15 M lines of .d.ts). Standalone objectui sat just under the default build logs 2: NODE_OPTIONS=--max-old-space-size=4096 in those build scripts or CI
    3 react line: @objectstack/client-react wants ^19.3.0, objectui pins 19.2.8 → two @types/react, plugin-view's d.ts build fails. Fixed in the spike by root overrides to 19.3.0 build log 2: bump objectui's 31 manifests in place
    4 zod ranges: 5 objectui manifests declare ^4.4.3/^4.6.1, objectstack ^4.6.5; the lock holds 4.6.1 and 4.6.5 but the Console bundle carries one (canary passes) lock + canary 2: align to ^4.6.5
    5 Console Vite config matches @objectstack/* by node_modules path: workspace links resolve to <root>/packages/<name>/dist/…, so the vendor group test, the spec counter-probe and the lazy-linter guard all missed and the build failed. Fixed (+14 lines) by adding the workspace prefix; scripts/vite-objectstack-client-dist.ts carries the same assumption, unexercised ui/apps/console/vite.config.ts fixed; 2 checks the client-dist helper
    6 "I am the repo root" assumption: 71 objectui files locate the root via .git / git rev-parse --show-toplevel / pnpm-workspace.yaml / find-up; merged, that is the objectstack root. One unit test already reads <root>/packages/core/... and fails filter-icontains-alignment-8976.test.ts 2: one uiRoot() helper
    7 turbo: nested ui/turbo.json cannot stay as is; task names differ (type-check vs typecheck, test:dist, lint); its globalDependencies point at .objectstack-sha turbo 2.11 2: root turbo.json absorbs the ui tasks
    8 Duplicated governance under ui/: .github (28 workflows), .claude (8 hooks vs 12 at root), .changeset (83 pending changesets + its own 40-package fixed group), AGENTS.md (630 lines vs 1 117), skills/, scripts/ (136 vs 288; lockfile-integrity/dedupe, bash32-floor, entry-guard duplicated by name) ls counts 3 (changeset group, ADR), 4 (workflows), 2 (AGENTS)
    9 pre-push hook refuses the imported history: check:commit-card-trailers judged 3 668 objectui commits (Fixes #n in messages). No bypass needed: git remote add objectui … && git fetch objectui main makes them "reachable from a remote-tracking ref", which the gate excludes by design. CI runs only the self-test, so the cutover PR is not red on this hook output 5: write into the cutover script
    10 Stale local main trap: the sibling objectui checkout's main was 28 commits behind; the first import used it and @object-ui/auth failed TS2741 on the external org role — the two-repo drift in miniature. The cutover script must take the sha from git ls-remote first build log 5
    11 liveness and lockstep: 34 liveness ledger files mention objectui; packages/sdui-parser/objectui-lockstep.json records "one objectui revision" ls/grep 4: in-repo paths
    12 install hooks: objectui's root preinstall pin check, setup and objectstack:build scripts are dead after the merge; preinstall removed in the spike ui/package.json 2

    Only remaining peer warning after install: objectstack's pre-existing ioredis-mock vs ioredis 6.

    Not measured, and why

    • CI wall-clock for the three PR classes (ui/ only, packages/spec only, both): no PR was opened. A 2.59 M-line PR exists only to read CI, and it trips the Tier H changed-lines gate and every path-filtered workflow at once; the local readings above are the substitute. Sub-issue 2 measures CI on its own branch once path filters exist.
    • --squash variant: not run; the tree is identical, only commit metadata differs, and the ruling keeps history.
    • Full pnpm typecheck / pnpm test across ui/: blocked by finding 7 (task names) — ran the unit project for two packages instead.

    Done when, checked: branch pushed ✓ · no PR ✓ · report on the card ✓ · nothing changed on main ✓.


    Generated by Claude Code

  6. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    Closing: done · 2026-10-27T14:10Z. The spike's done-when is met: the branch was pushed, no PR was opened, and the report is on this card (comment 6386424164). Its recipe went into the real import: objectui became ui/ in #25825 (merged 2026-10-25 22:51Z), and the readiness, wiring and release-lane work it fed landed as #25685, #25723, #25710, #25738 and #25745. Nothing from this card remains open. The spike branch claude/project-thread-dwhq6r is history only; nothing reads it.

  7. removed
    pm:dispatched
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:devpathdomain:devxpm:epicpriority:p1tooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions