Skip to content

tooling(objectui-readiness 2): scripts, tests and e2e specs that read pnpm-workspace.yaml, turbo.json, pnpm-lock.yaml or root overrides at the objectui root resolve the workspace root upward (parent #25677, 2b/6) #25723

Closed

Description

@objectstack-fleet

Filing gate ④: sub-issue 2b/6 of the epic #25677 (pm:epic; epic PM session_01RSDL3SFtJaKzcymvCD8RsU). Part of #25677. ⛔ Not a claim. Follow-up of #25685 (objectui#13472), measured on the first CI run of the DO NOT MERGE verification PR #25710 → #25718 (run 40144323591, head b2ba3a4).

Why a second readiness card. #25685 rooted "where is the objectui tree" on scripts/ui-root.mjs and removed the .git / pnpm-workspace.yaml marker walks. The import also deletes or moves four files at that root, and the readers of those files were not in #25685's scope: pnpm-workspace.yaml (deleted — a nested workspace root is ignored), turbo.json (parked — a nested turbo.json must extends the root), pnpm-lock.yaml (deleted — one lockfile at the git root) and the root package.json's pnpm.overrides / patchedDependencies (moved to the git-root manifest). On the merged tree those readers are the first red in Type Check UI, Build & E2E UI and Test UI, before the type-check, e2e or component tests run. Until they are fixed, the cutover PR cannot be measured and the three jobs cannot go green.

Who does it, where it lands: the epic PM dispatches it (os-dev, objectui checkout). One PR to objectstack-ai/objectui main before cutover, inert for the standalone layout (every reader keeps answering exactly what it answers today when the file is at the objectui root). The epic PM also applies the same patch as a verify-only commit on the verification branch to re-measure the three jobs.

维护者速读

#25685 已经把"objectui 树在哪"统一到 scripts/ui-root.mjs,但导入时还会删掉或挪走 objectui 根目录的四个文件:pnpm-workspace.yaml(嵌套的工作区根会被忽略)、turbo.json(嵌套 turbo.json 必须 extends 根)、pnpm-lock.yaml(全仓一个锁文件)、根 package.json 里的 pnpm.overrides / patchedDependencies(并入根清单)。读这四个文件的脚本、测试和 e2e 用例在合并树上第一个变红:验证分支首轮 CI 里 Type Check UI 在 check:side-effects-array 就停、Build & E2E UI 在第一个 e2e 文件就停、Test UI 已跑完的 6 片各挂 5–6 个文件,全是同一类原因。本卡只做一件事:这些读取器改为"objectui 根有这个文件就读它,没有就向上一层读 objectstack 根的,并按 ui/ 前缀过滤",独立仓行为不变。objectui 这边一个 PR,切换前合;不改受管面。

Measured on the merged tree (run 40144323591)

Job Where it stopped Reader
Type Check UI pnpm --dir ui run check:side-effects-array scripts/check-side-effects-array.mjs:282 reads <root>/pnpm-workspace.yaml
Build & E2E UI e2e/record-header-title-width.spec.ts:65 ENOENT <git root>/packages/plugin-detail/src/DetailView.tsx REPO_ROOT IIFE walks up to the first pnpm-workspace.yaml = objectstack's root. Same IIFE in dashboard-metric-tile-height, sidebar-offcanvas-geometry, studio-item-header-title-width, toast-under-modal. check-ui-root-lookups is SILENT on a readFileSync of the marker, so this probe shape escaped #25685.
Test UI 9/16 ENOENT ui/pnpm-workspace.yaml scripts/__tests__/check-side-effects-array.test.ts (5), zero-test-member-exclusion-9106.test.ts, packages/cli/src/__tests__/workspace-vite.test.ts (4), app-shell/.../CreateViewDialog.chartBinding-11576.test.tsx
Test UI 9/16 ENOENT ui/turbo.json scripts/select-type-check-scope.mjs via its test; scripts/__tests__/turbo-lint-inputs.test.ts (shard 1)
Test UI 1/16 "the stub did not serve this run — a live pnpm reached the registry" ×10 scripts/__tests__/check-lockfile-dedupe.test.ts — check-lockfile-dedupe.mjs resolves the lockfile / runs pnpm at uiRoot(), where no lockfile exists
Test UI 1/16 3 failures scripts/__tests__/react-peer-range-norm-3741.test.ts — overrides now live in the git-root manifest

Other readers of the same files on main (not yet reached by CI, same fix): scripts/check-docs-route-eager-closure.mjs:204, scripts/select-affected-tests.mjs:186, scripts/release-github-releases.mjs, scripts/check-lockfile-integrity.mjs, scripts/check-installed-spec-pin-claims.mjs, scripts/dependabot-merge-gate.mjs, scripts/check-new-cross-file-line-citations.mjs / cross-file-line-citation-census.mjs, scripts/dollar-dialect-alias-census.mjs. packages/cli/src/utils/workspace-vite.ts and app-generator.ts ask about the USER's cwd (product behaviour, allowlisted in check-ui-root-lookups) and are out of scope; only their tests, which read this repo's manifest, are in.

Scope

  1. One helper, Node builtins only (it must be importable before pnpm install, like ui-root.mjs): scripts/workspace-root.mjs (name is the dev's) answering (a) workspaceRoot() — uiRoot() when <uiRoot>/pnpm-workspace.yaml exists, else path.resolve(uiRoot(), '..') when THAT holds one, else throw; (b) workspaceGlobs() — the packages: globs of that file, and when the root is the parent, only the globs under ui/ with the prefix stripped (the bare ui entry is the objectui root itself and is dropped); (c) lockfilePath(), rootManifest() (the manifest whose pnpm block holds overrides / patchedDependencies) on the same rule. Each reader above imports the helper instead of joining uiRoot() (or a walk) with the file name. The three existing ad-hoc packages: parsers (check-side-effects-array, select-affected-tests, check-docs-route-eager-closure) become one parser with their union of refusals kept.
  2. turbo.json readers (select-type-check-scope.mjs, turbo-lint-inputs.test.ts): read the nearest turbo.json upward (uiRoot() then the parent) and tolerate the parent's $TURBO_ROOT$/ui/-re-rooted inputs (objectstack#25710 re-roots objectui's repo-root inputs that way). Where a test pins objectui's own task shapes, it reads the parked copy turbo.objectui.json when turbo.json is absent at uiRoot() — the dev states which.
  3. The five e2e REPO_ROOT IIFEs → uiRoot() (the specs read source files under packages/, so the objectui root is the right answer).
  4. check-ui-root-lookups learns the escaped shape: a readFileSync / existsSync of a marker inside a loop that reassigns its directory to path.dirname(...) is a root lookup, not a data read. Self-test cases: the e2e IIFE (fires), the data read at a known root (still silent).
  5. Tests that build fixtures of a workspace root keep working: a fixture that writes its own pnpm-workspace.yaml is a root by rule (a) — the helper takes an optional explicit root for exactly that.

Out of scope (cutover adaptation commit, sub-issue 5, tracked on #25697): dropping the turbo-recursive scripts from ui/package.json; QUICK_REFERENCE.md's "Current Release" block stating workspace:^; the dom-test failures not attributed to a reader (ListView.fieldListRead-11984, importWriteModes-12697, ImportWizard.csvFileSource-13315) — re-measured after this card's patch is on the verification branch.

Verification (the dev's)

Done when

  • PR merged on objectui main; git grep -n "pnpm-workspace.yaml\|pnpm-lock.yaml\|'turbo.json'" scripts packages/cli/src e2e shows only the helper, the allowlisted cwd predicates and comments.
  • On the verification branch: Type Check UI reaches "Run type-check over the ui packages", Build & E2E UI reaches the browser, Test UI's reader failures are gone.

Size: M — one helper, ~20 call sites, 5 e2e files, one gate case. Clause-②: no. Metadata-protocol: none.

风险

  • A helper that silently picks the parent root in the standalone layout would hide a deleted file; rule (a) prefers the objectui root and throws when neither holds the file.
  • select-type-check-scope reading the merged turbo.json sees objectstack tasks too; it must select from the ui subset only (filter on ui/ paths), or the scope it computes widens to the whole repo.

Dedupe

Open issues 2026-10-25 00:05Z filtered on workspace / ui-root / readiness / pnpm-workspace: #25685 (closed, scope = marker walks, not file readers) and this epic's own cards. New.

Activity

  1. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: epic #25677 round 3 (dispatch of sub-issue 2b)
    Session: session_01RSDL3SFtJaKzcymvCD8RsU
    Account: os-tesla
    Branch: claude/project-thread-dwhq6r (objectstack-ai/objectui; recreated from main — the previous branch of that name was deleted when objectui#13472 merged; mode:thread, no force push)
    Worktree: objectui (the thread's own objectui checkout)
    Domain: domain:devx (card) — the PR lands in objectui under the domain:ui lane's PR rules (changesets, draft until CI, governed-surface check)
    Seat: epic:#25677
    File surface: objectui scripts/*.mjs readers of pnpm-workspace.yaml / turbo.json / pnpm-lock.yaml / the root manifest and their scripts/__tests__, packages/cli/src/__tests__/{workspace-vite,app-generator}.test.ts, the five e2e/*.spec.ts REPO_ROOT IIFEs, scripts/check-ui-root-lookups.mjs (+ one self-test case), one new helper under scripts/; no .github/**, no AGENTS.md, no product code in packages/cli/src/utils
    Container & model: M, mode:subagent, model: opus (default; no governed path on the surface, so no tier ceiling applies — the dev runs dispatch-gates --tier --repo objectstack-ai/objectui on its own paths before the PR), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: none
    Serial constraints cleared: objectui open PRs on 2026-10-25 00:10Z: #13289 (Version Packages, maintainer's) touches only CHANGELOGs and versions; no open claim on scripts/ or e2e/. The epic PM applies the same patch as a verify-only commit on objectstack's claude/project-thread-dwhq6r-25697-verify (#25718) to re-measure Type Check UI / Test UI / Build & E2E UI; that branch is DO NOT MERGE and never the PR's source.


    Generated by Claude Code

  2. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    PR opened: objectstack-ai/objectui#13484 (draft; branch claude/project-thread-dwhq6r at dff61d5c8, 4 commits, 44 files, +981/−421). Scope items 1–5 of this card are in it; the dev's verification table is in the PR body (standalone: whole scripts/__tests__ suite 195 files green, check:ui-root-lookups with the new marker-walk shape, cli tests, type-check:scripts/e2e, playwright list; merged layout: every reader red from run 1 is green).

    The same patch is on the verification branch as objectstack commit 1cade69 → #25718 run 3, which reads Type Check UI past check:side-effects-array and Build & E2E UI past the first spec.

    Measured in the merged layout and outside this card (carried on #25697 for the adaptation commit / later sub-issues):

    • spec-pin gates (check-installed-spec-pin-claims, check-lockfile-integrity, ci-cd-pipeline-doc tests): post-import @objectstack/* are workspace: links, so the pin's premise is gone → retire with the pin scripts (sub-issue 4a already deletes both pin script sets).
    • QUICK_REFERENCE.md documents pnpm build/type-check/lint, dropped from ui/package.json by the adaptation → same doc update as the "Current Release" line.
    • vite-objectstack-spec-dist.test.ts: @objectstack/spec resolves to <root>/packages/spec in the merged tree; the console vite config's vendor-objectstack test needs a ^<root>/packages[\\/] arm.
    • CreateViewDialog.chartBinding-11576.test.tsx: dom behaviour, no fs read — unattributed, re-measured on run 3.

    Next on this card: CI on #13484, then review request; the card closes when the PR merges.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT → PR objectstack-ai/objectui#13484 (head dff61d5c8).

    Delivered as one draft PR (4 commits, 44 files, +981/−421): the workspace-root.mjs helper, every root-file reader behind it, the five e2e specs on uiRoot(), the marker-walk shape in check-ui-root-lookups. CI green (13 workflows). check-governed-merges.mjs --pr: NOT governed, 1402 lines ≤ 3000 → the dispatch seat lands it now (pr_ready + automerge_enable). Measured effect on the verification branch (objectstack#25718 run 3, patch as verify commit 1cade69): the reader class is gone from Type Check UI / Build & E2E UI (green, 7:33) / Test UI; what remains is the dependency-resolution class, filed as #25726. This card closes by the PR's Fixes; parent #25677 item 2b ticks on MERGED.


    Generated by Claude Code

  4. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed. objectui#13484 (head dff61d5c8) MERGED into objectui main as c85408f on 2026-10-25 (merge queue, auto-merge armed by the dispatch seat after the ACCEPT above). The same patch was verified in the merged layout as verify commit 1cade69 on objectstack#25718 run 3: the pnpm-workspace.yaml / turbo.json / pnpm-lock.yaml readers and the five e2e REPO_ROOT walks resolve the workspace root upward; Build & E2E UI green for the first time there. The second half of the class — scripts that hand git repository-root-relative paths (git show ref:packages/…, ls-tree, diff --name-only / ls-files matching) — is #25728 (sub-issue 2d), dispatched as its own card thread. Closing this card; the parent #25677 ticks item 2b.


    Generated by Claude Code

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:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratedomain:devxpm:epicpriority:p1High: required for production / M2tooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions