Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.

tooling(objectui-readiness 2): readers of pnpm-workspace.yaml, turbo.json, pnpm-lock.yaml and the root manifest resolve the workspace root upward (objectstack#25723) - #13484

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-dwhq6r
Oct 25, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-dwhq6r

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Part of objectstack-ai/objectstack#25723 (sub-issue 2b of objectstack-ai/objectstack#25677, the objectui → objectstack ui/ merge). Follow-up of #13472.

What

Adds scripts/workspace-root.mjs (Node builtins only, importable before pnpm install) and its .d.mts twin: workspaceRoot(), workspaceGlobs(), lockfilePath(), rootManifest(), uiTurboConfigPath(), uiScopedTurboConfig(). Every reader of pnpm-workspace.yaml, pnpm-lock.yaml, the root package.json and turbo.json under scripts/, scripts/__tests__/, two package tests and the five e2e specs resolves those files through it. The three ad-hoc packages: parsers are unified (union of their refusals). check-ui-root-lookups learns the marker-walk shape that let the e2e REPO_ROOT IIFEs escape #13472, with self-test cases. Standalone behaviour is byte-identical: every helper branch is the identity when <uiRoot>/pnpm-workspace.yaml exists.

Why

Once objectui is ui/ of the objectstack monorepo, the workspace root, lockfile and overrides live one directory up and turbo.json is parked as turbo.objectui.json (a nested turbo.json must extends the root). Readers that assumed those files at uiRoot() fail with ENOENT (measured on the verification PR objectstack-ai/objectstack#25718: Type Check UI at check:side-effects-array, Build & E2E UI at the first e2e spec, 15 of 16 Test UI shards) or walk up to the wrong root (five e2e specs). This PR makes them layout-aware ahead of the import.

Verification

command standalone merged layout (ui/ in objectstack, scratch copy of the verification tree)
pnpm check:ui-root-lookups / --self-test 0 / 0 (17 cases) 0
pnpm exec vitest run scripts/__tests__ 0 (195 files, 5772 tests) card's failing files + every touched test: all reader reds green; 10 remaining reds are the spec-pin gates (spec is workspace: post-import), the QUICK_REFERENCE script list, the vendor-chunk arm, one dom test — none a root-file read, all carried on objectstack#25697
pnpm --filter @object-ui/cli test 0 (415) workspace-vite.test.ts green
pnpm check:side-effects-array 0 0
pnpm check:docs-route-closure 0 0
pnpm check:lockfile-dedupe / check:lockfile-integrity / check:installed-pin-claims 0 / 0 / 0 n/a (the pin gates presuppose the pin)
pnpm type-check:scripts / type-check:e2e 0 / 0 0 / 0
pnpm lint:coverage, lint:root, the pre-push gate list 0 —
playwright test --list --project=chromium 0 (78 tests) 0 (78 tests, 0 ENOENT)

The same patch is on the verification branch as objectstack commit 1cade6932a (run 3 of objectstack-ai/objectstack#25718).

Landing

Tooling and tests only; no product code (packages/cli/src/utils/workspace-vite.ts, app-generator.ts unchanged); no governed surface touched. Changeset .changeset/25723-workspace-root-readers.md with empty frontmatter — present because two package test files under src/ changed; releases nothing. Draft until CI is green; then the epic PM asks for review.

Clause-②: no
Metadata-protocol: none

🤖 Generated with Claude Code

https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU

…t files are, in both layouts (objectstack#25723)

`scripts/workspace-root.mjs` (Node builtins + `ui-root.mjs` only, so the
pre-install gates may import it) answers where `pnpm-workspace.yaml`,
`pnpm-lock.yaml`, the root manifest and `turbo.json` are: at `uiRoot()` when
that directory holds the workspace file, else at its parent when THAT does
(the objectstack monorepo, where the tree is `ui/` and a nested workspace root
is ignored), else a throw -- never a silent pick of some other workspace.
`workspaceGlobs()` returns the file's `packages:` globs relative to the tree in
both layouts (the parent's `ui/...` entries with the prefix stripped, the bare
`ui` entry dropped). `parseWorkspaceGlobs` is the union of the three ad-hoc
parsers' refusals. For `turbo.json`: `turboConfigPath()` is the nearest one
upward (what turbo hashes from), `uiTurboConfigPath()` objectui's own
declaration (`turbo.json`, else the parked `turbo.objectui.json`), and
`uiScopedTurboConfig()` the nearest one narrowed to the `$TURBO_ROOT$/ui/`
subset. Every function takes an explicit root for fixtures.

`check-ui-root-lookups` learns the shape that escaped objectstack#25685: a
`readFileSync` of a marker inside a loop that steps a directory upward is the
walk's existence test (`marker-walk`), not a data read; a marker read in a loop
over known roots stays silent. The helper's own two `existsSync` probes are
allowlisted with their reason. The `.d.mts` twin is ledgered in
`check-lint-rule-coverage`'s predicate-2 rows like `ui-root.d.mts`.

Clause-②: no
Metadata-protocol: none

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU
…ot files resolve them through the helper (objectstack#25723)

The three `packages:` parsers (`check-side-effects-array`,
`select-affected-tests`, `check-docs-route-eager-closure`) become
`workspaceGlobs()` / `parseWorkspaceGlobs()`; each keeps its own expansion, so
standalone it lists exactly the directories it listed before.

`select-type-check-scope` reads the nearest `turbo.json` upward through
`uiScopedTurboConfig()`: under the monorepo the root's `$TURBO_ROOT$/ui/x`
inputs are read as `$TURBO_ROOT$/x` and its other root inputs and
`globalDependencies` are dropped, so the root rule stays the objectui subset
instead of widening every change to the whole monorepo; the changed files are
listed `--relative` to the tree (a no-op at the repository root) and the dry
run's tasks are narrowed to packages under it.

`check-lockfile-dedupe` runs `pnpm dedupe --check` at `workspaceRoot()` and
requires the pinned build's stamp only where the root manifest declares the
pin (`pinDeclared()`): under the monorepo the `@objectstack/*` packages are
workspace members and no manifest does, so the missing stamp is not a reason
to refuse a reading. Its pin test follows the precondition's new spelling and
holds `pinDeclared` on both manifest shapes. `check-lockfile-integrity` reads
`lockfilePath()` and runs git at `workspaceRoot()`;
`check-installed-spec-pin-claims` reads `lockfilePath(root)`.

Clause-②: no
Metadata-protocol: none

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU
…les through the helper (objectstack#25723)

Nine hand-rolled `packages:` parsers in `scripts/__tests__` (and the one in
`packages/i18n`'s locale census) become `workspaceGlobs(repoRoot)`; each test
keeps its own expansion. `helpers/turbo-inputs.ts` roots on `uiRoot()` and
reads objectui's own task declaration through `uiTurboConfigPath()`, as do the
eight tests that pin task shapes out of `turbo.json`: under the monorepo that
is the parked `turbo.objectui.json`, the file whose `$TURBO_ROOT$` inputs are
relative to this tree, which is what those pins assert. The three lockfile
readers take `lockfilePath()`.

`packages/cli`'s alias-table test asks the product helper about
`workspaceRoot(REPO_ROOT)` -- the pnpm workspace root that governs this tree,
which standalone is the repository root -- and builds its expectation from the
globs relative to the tree; the product code itself (`workspace-vite.ts`,
`app-generator.ts`) asks about the USER's cwd and is unchanged. The two package
test files are the only published-source paths touched, so an empty-frontmatter
changeset declares that nothing releases.

Clause-②: no
Metadata-protocol: none

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU
… of walking to pnpm-workspace.yaml (objectstack#25723)

Each spec located "the repo root" by reading `pnpm-workspace.yaml` upward
from its own file inside a `try/catch` loop -- a `readFileSync`, so
`check-ui-root-lookups` did not read it as the existence probe it was, and on
the merged tree the walk stopped at the OBJECTSTACK root and the first spec
died with ENOENT on `packages/plugin-detail/src/DetailView.tsx` before the
browser started. The sources these specs read live under this tree's
`packages/`, so `uiRoot()` from `scripts/ui-root.mjs` is the answer in both
layouts; the gate now fires on the shape that escaped. The e2e program imports
the helper through its `.d.mts` twin (`allowJs` stays off), and
`tsconfig.e2e.json`'s header says so where it stated the old premise.

Clause-②: no
Metadata-protocol: none

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 85 chunks) 3014.5 KB 3496.0 KB
Main entry chunk (gzip) 80.3 KB 350 KB
Entry file index-1aCKWKqh.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (buildIdentity.js) 0.80KB 0.49KB
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 21.41KB 7.90KB
app-shell (runtime-config.js) 24.52KB 8.48KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 45.59KB 12.03KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 20.67KB 6.12KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.74KB 3.94KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.62KB 0.83KB
auth (authStyles.js) 5.27KB 1.86KB
auth (createAuthClient.js) 42.84KB 11.66KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 8.84KB 3.61KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.26KB 8.03KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.28KB 2.60KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (commentAuthorship.js) 1.39KB 0.78KB
collaboration (index.js) 1.93KB 0.85KB
collaboration (useCollaborationTranslation.js) 6.50KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 614.94KB 150.52KB
core (index.js) 10.18KB 4.04KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 253.04KB 70.68KB
fields (index.js) 295.90KB 75.88KB
i18n (LocalizationContext.js) 2.92KB 1.42KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.52KB 2.39KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.35KB 12.88KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 36.87KB 9.88KB
i18n (useSafeTranslation.js) 7.14KB 2.92KB
layout (index.js) 41.17KB 11.96KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 15.35KB 5.51KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.82KB 2.38KB
permissions (ServerReadScope.js) 4.03KB 1.82KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.99KB 0.43KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.91KB
plugin-calendar (index.js) 55.41KB 16.19KB
plugin-charts (index.js) 88.30KB 24.33KB
plugin-chatbot (core.js) 5.22KB 2.18KB
plugin-chatbot (index.js) 237.93KB 56.26KB
plugin-dashboard (index.js) 147.15KB 39.95KB
plugin-designer (index.js) 232.83KB 50.01KB
plugin-detail (index.js) 267.21KB 71.14KB
plugin-editor (index.js) 2.21KB 1.04KB
plugin-form (index.js) 185.46KB 48.48KB
plugin-gantt (index.js) 178.19KB 45.06KB
plugin-grid (index.js) 278.30KB 77.57KB
plugin-kanban (index.js) 64.27KB 19.81KB
plugin-list (index.js) 149.60KB 39.26KB
plugin-map (index.js) 27.11KB 8.99KB
plugin-markdown (index.js) 13.79KB 4.79KB
plugin-report (index.js) 46.42KB 13.06KB
plugin-timeline (index.js) 39.30KB 11.87KB
plugin-tree (index.js) 15.25KB 5.38KB
plugin-view (index.js) 94.26KB 24.27KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 12.07KB 3.68KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 129.13KB 42.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.71KB 2.11KB
react (schema-input.js) 4.31KB 2.07KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.50KB 1.99KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.07KB 1.30KB
sdui-parser (index.js) 7.30KB 3.12KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 25.28KB 7.81KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 23.87KB 7.83KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (authoring-nodes.js) 0.20KB 0.19KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (cloud.js) 0.20KB 0.18KB
types (complex.js) 4.44KB 2.07KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (dashboard-widget-layout.js) 2.06KB 0.96KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 1.13KB 0.65KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 5.78KB 2.70KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (node-slots.js) 7.18KB 2.34KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (product-blocks.js) 0.20KB 0.19KB
types (record-approval-decision.js) 0.20KB 0.20KB
types (record-components.js) 0.20KB 0.19KB
types (record-panels.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 4.99KB 1.96KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.93KB 7.26KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.48KB 3.50KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对(dispatch seat landing record)

改了什么 —— objectstack#25723(epic #25677 子单 2b):新增 scripts/workspace-root.mjs(仅 Node 内建;.d.mts 同步),所有读 pnpm-workspace.yaml / pnpm-lock.yaml / 根 package.json / turbo.json 的脚本、scripts/__tests__、两个包测试和五个 e2e 用例改经它解析;三个各自解析 packages: 的函数合为一个;check-ui-root-lookups 学会 marker-walk 形状。独立仓行为逐字节不变。44 个文件,+981 / −421,4 个提交。

为什么 —— objectui 并入 objectstack ui/ 后,这四个根文件要么在上一级、要么被停放(turbo.objectui.json)。验证分支首轮 CI 里 Type Check UI、Build & E2E UI、Test UI 15/16 片都在这些读取器上第一个变红。本 PR 的补丁打到验证分支后第三轮实测:读取器类红全部消失,Build & E2E UI 首次全绿(objectstack#25718 run 3)。

席位核对

  1. Shape — 一卡一 draft PR,4 个提交按 scope 顺序;作者 objectstack-fleet[bot];派发产物,故由派发席落地(AGENTS.md ②)。
  2. Gates — 13 个 workflow 全部 success / 预期 skip(dff61d5c8);check-governed-merges.mjs --pr objectstack-ai/objectui#13484:0/44 路径命中受管面,1402 行 ≤ 3000 → NOT governed,普通入队。Changeset:.changeset/25723-workspace-root-readers.md 空 frontmatter(两个 src/ 下的测试文件动了,不发版)。
  3. 接受的偏差 — rootManifest() 只暴露清单,不读 overrides(pnpm 10 把它们放在根 pnpm-workspace.yaml);check-lockfile-dedupe 的守卫改为 pinDeclared() && pinnedBuildMissing()。
  4. 范围外去向 — 合并树上剩余红(spec-pin 门禁在 workspace: 下失去前提、QUICK_REFERENCE 命令清单、Console vendor-objectstack 分包臂、依赖重算导致的 radix/lucide 变化)记在 objectstack#25697 的切换账单与子单 #25726。

落地 —— 本席执行 pr_ready + automerge_enable(入合并队列);合并后 #25723 由 Fixes 关闭,父单 #25677 子项 2b 打勾。


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 25, 2026 01:22
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 25, 2026 01:22
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit c85408f Oct 25, 2026
39 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-dwhq6r branch October 25, 2026 01:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant