Skip to content

tooling(objectui-readiness 5): three objectui tests assume the objectui root is the pnpm workspace root — .pnpm install probes, the CLI generator IN-WORKSPACE map, the Console vendor-chunk standalone baseline (parent #25677, 2e/6) #25733

Closed

Description

@objectstack-fleet

Filing gate ④: sub-issue 2e/6 of the epic #25677 (pm:epic; epic PM session_01RSDL3SFtJaKzcymvCD8RsU). Part of #25677. ⛔ Not a claim. Third and (as measured) last reader class after #25723 (file readers, objectui#13484) and #25728 (git root-relative paths, objectui#13491), measured on the DO NOT MERGE verification PR #25718, run 5 (40153788034, head cfa1676, with the #25726 lockfile splice applied).

Why. Run 5 is the first run where the dependency-resolution red class (#25726) is gone from Test UI: in the 8 shards read so far every remaining red is either a known class with an owner — pin scripts (#25711), spec drift (#25727), QUICK_REFERENCE.md (cutover bill on #25697) — or one of three tests that assume the objectui root is the pnpm workspace root. In the merged tree the workspace root is one level up (objectstack/), so ui/node_modules holds only the ui root package's own declared dependencies, there is no ui/node_modules/.pnpm, and ui/pnpm-workspace.yaml does not exist. Three readers trip on that, each in a different package, and the cutover PR cannot be green until they resolve the layout the way #25723's uiRoot() / workspace-root helpers already do. Like 2b and 2d this is fixed in objectui main first so the import carries it.

Who does it, where it lands: the epic PM dispatches it as a card thread (objectui checkout). One PR to objectstack-ai/objectui main; the epic PM re-measures on the verification branch and records the remaining reds on #25697.

维护者速读

第五轮验证里依赖解析那一类红已经消失。Test UI 剩下的红,除了已经有卡的(钉住脚本 #25711、spec 漂移 #25727、QUICK_REFERENCE 归切换账单)之外,只剩三处测试默认 objectui 根目录就是 pnpm 工作区根:check-doc-snippet-types 的安装探针在 ui/node_modules/.pnpm 找不到包;CLI 生成器的 currentContext() 用 存在 pnpm-workspace.yaml 判断工作区根,所以在 ui/ 下写出 STANDALONE 映射;Console vendor 分块测试把"独立布局"当成当前布局的基线。本卡让这三处用 #25723 已经提供的向上查找工作区根的办法,先落 objectui main。不改受管面。

Measured (run 5, Test UI)

Shard Files Red Reading
13 361/362 green scripts/__tests__/check-doc-snippet-types.test.ts "@floating-ui/react-dom is not installed, so 'it does not resolve' measures nothing" and the root-declared control (vitest) findInstalledCopy(root, …) → null. The census controls look for installed copies under the objectui root's node_modules (incl. .pnpm); in the merged workspace the store and the hoisted copies live under objectstack/node_modules
8 361/363 green packages/cli/src/__tests__/app-generator.test.ts › "writes the IN-WORKSPACE map when the generator runs at a workspace root" currentContext() (packages/cli/src/utils/app-generator.ts:280–287) says isMonorepo = existsSync(join(cwd, 'pnpm-workspace.yaml')); the test pins REPO_ROOT (walked up from import.meta.url, i.e. the objectui root) as the workspace root. In ui/ that file is absent one level down, so the generator writes the STANDALONE map
10 (and 7) 10 tests red in 4 files on shard 7, all pin/QUICK_REFERENCE except the vite pair scripts/__tests__/vite-objectstack-workspace.test.ts ("standalone: the three tests are the baseline literals, byte for byte"), vite-objectstack-spec-dist.test.ts, vite-objectstack-client-dist.test.ts #25685 made the Console's vendor-chunk tests workspace-aware by probing <monorepo>/packages three levels above the console; the tests then pin the standalone literals as what the current layout yields. In the merged tree the probe finds objectstack/packages, the workspace arm is active, and the "standalone" expectations are read against the merged regexes

Everything else red in the 8 shards read (3, 6, 7, 8, 10, 13, 15, 16) has an owner: check-installed-spec-pin-claims, objectstack-pin, check-lockfile-integrity sample, ci-cd-pipeline-doc.test.ts:1871 (pin class → #25711 / PR B on #25697); TranslationPreview.categories-11765, console loadLanguage (positions → #25727); sync-quick-reference-release, quick-reference-commands-4149 (cutover bill on #25697). The remaining 8 shards are read as they finish; a fourth member of this class, if any, is appended here by the epic PM before dispatch.

Scope

  1. Install probes (scripts/check-doc-snippet-types.mjs): findInstalledCopy and the census controls resolve from the pnpm workspace root found upward (the workspace-root.mjs helpers from 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), not from the objectui root; standalone (root === workspaceRoot) is unchanged. Keep the control's meaning: "installed somewhere in this workspace but undeclared by the importer" must still be the thing it measures.
  2. CLI generator context (packages/cli/src/utils/app-generator.ts currentContext() and packages/cli/src/__tests__/app-generator.test.ts): decide, and write down in the function's doc comment, what "runs at a workspace root" means when the objectui tree is itself a workspace member — the dev proposes; the likely answer is that isMonorepo walks up to the nearest pnpm-workspace.yaml and the test derives IN_WORKSPACE from that same root instead of from REPO_ROOT. The product behaviour for a user's own project (a pnpm-workspace.yaml in cwd, or none) must not change; add the case that pins it.
  3. Console vendor-chunk tests (scripts/__tests__/vite-objectstack-workspace.test.ts, vite-objectstack-spec-dist.test.ts, vite-objectstack-client-dist.test.ts): the "standalone" expectations are read against a fixture layout, not against the checkout's own layout — so the same three files are green standalone and merged. The regexes themselves (scripts/vite-objectstack-workspace.ts) are not changed unless the merged arm is wrong, which the run-5 Build & E2E UI read will say.
  4. Regrowth gate: extend check-ui-root-lookups (the gate 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 and tooling(objectui-readiness 4): objectui scripts address git paths relative to the repo root — git show ref:packages/…, diff --name-only, ls-files, ls-tree break one level down in ui/; prefix via nestedPrefix() (parent #25677, 2d/6) #25728 taught the walk and git shapes) with the shape "node_modules / .pnpm / pnpm-workspace.yaml joined to the objectui root without the helper", so the class does not regrow before cutover. Reverse check on the pre-fix tree must fire at exactly the sites fixed.
  5. Tests: the merged-layout verification 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 established (scratch copy of the verification worktree, patch applied under ui/, pnpm install --frozen-lockfile) for the three test files; scripts/__tests__ whole suite once (objectui gate chains).

Out of scope: pin scripts and the .objectstack-pin probes (#25711), spec drift (#25727), QUICK_REFERENCE.md and the dropped root scripts (cutover bill, #25697), lockfile/overrides (#25726), anything under .github/**.

Verification (the dev's)

  • objectui standalone: pnpm exec vitest run scripts/__tests__/check-doc-snippet-types.test.ts scripts/__tests__/vite-objectstack-*.test.ts packages/cli/src/__tests__/app-generator.test.ts, pnpm check:ui-root-lookups (+ --self-test), pnpm check:doc-snippet-types, the whole scripts/__tests__ suite — green, no gate skipped; CI green.
  • Merged layout (scratch copy of /home/claude/objectstack-issue-25697 with the patch under ui/): the three test files green from the ui root (pnpm --dir ui exec vitest run …), check:doc-snippet-types reaches a real verdict with both census controls live.
  • The epic PM: the same patch as a verify commit on DO NOT MERGE — verification run for #25697: PR A + the ui/ subtree import of objectui main cd70b7818d #25718 → run 6; Test UI shards 8, 10, 13 (and 7's vite pair) drop these files from their red lists.

Done when

  • objectui main carries the fix with the regrowth gate; on the verification branch no Test UI red names these three readers, and the only Test UI reds left are the owned classes above.

Size: M (three packages, one gate extension, one semantics decision in the CLI generator). Clause-②: no. Metadata-protocol: none. Blocked-by: objectui#13491 (#25728) must land first — same helper file (scripts/workspace-root.mjs) and the same gate (check-ui-root-lookups).

风险

  • currentContext() is product code (the dev command and the app generator use it): a wrong "walk up" turns a user's standalone project into "in a workspace" when a parent directory happens to hold a pnpm-workspace.yaml. The decision in Scope 2 must be pinned by a test for the user's layout, not only for ours.
  • check-doc-snippet-types is 3,500 lines with its own self-test battery; the probe change should be a few lines in findInstalledCopy and the census, nothing else.

Dedupe

Open issues 2026-10-25 02:50Z filtered on node_modules, workspace root, app-generator, check-doc-snippet-types, vite-objectstack: #25723 (closed; file readers), #25728 (git paths; in the merge queue), #25685 (closed; made the vite chunk tests workspace-aware — this card finishes that by making their standalone baseline layout-independent), #25726 (lockfile). Nothing covers the install probes or the generator context. New.

Activity

  1. added
    toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface
    priority:p1High: required for production / M2
    domain:devxDomain lane — seat card indexed by label:pm:seat
    pm:epicReserved by a dedicated epic PM, parent or sub-issue; other PMs never take it; never with pm:queue
    area:devpathThe road — create, dev, verify, publish/install, connect an agent, iterate
    on Oct 25, 2026
  2. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: epic #25677 round 6 (card threads; Tesla 2026-10-25 「你应该使用 pm-dispatch 技能派发」「并发可以到6」)
    Session: session_01RSDL3SFtJaKzcymvCD8RsU
    Account: os-tesla
    Branch: claude/project-thread-cwrm71 (the card thread's designated branch in objectstack-ai/objectui — the thread can push only this branch, a measured platform exception to claude/issue-<n>-<slug>)
    Worktree: objectui-issue-25733
    Domain: domain:devx
    Seat: epic:#25677
    File surface: scripts/check-doc-snippet-types.mjs (install probes), packages/cli/src/utils/app-generator.ts currentContext() + packages/cli/src/__tests__/app-generator.test.ts, scripts/__tests__/vite-objectstack-{workspace,spec-dist,client-dist}.test.ts, the check-ui-root-lookups gate + its tests, scripts/workspace-root.mjs; no .github/**, no regex change in scripts/vite-objectstack-workspace.ts
    Container & model: M, mode:thread (thread session session_018KHW3U8PmJue4aVvtXutRb; order: /mnt/project-files/d1-merge/dispatch/ in the project, FRAME.md + 2e-25733-objectui-workspace-root-assumptions.md), model: opus, effort: high (coordinator default)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: none
    Serial constraints: objectui#13491 (#25728) must be on objectui main before this card branches — same helper (scripts/workspace-root.mjs) and same gate (check-ui-root-lookups). At claim time #13491 is ready with auto-merge armed (merge queue); the thread holds read-only until it lands. #25727 (2c) edits .objectstack-sha + packages/** fallout, no overlap with these files.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT — dispatch seat. objectui#13498 (head 33dffb76d2, branch claude/project-thread-cwrm71, +436/−52, 14 files) is accepted as the fix for this card.

    Checked against the order (/mnt/project-files/d1-merge/dispatch/2e-25733-objectui-workspace-root-assumptions.md):

    • Workspace-root discovery goes through scripts/workspace-root.mjs only: the new virtualStorePath() sits beside workspaceRoot() / uiRoot() and throws the same way when no workspace governs the tree; findInstalledCopy reads it. No second walk, no cwd heuristics.
    • currentContext() wording accepted as proposed: "runs at a workspace root" means cwd itself holds pnpm-workspace.yaml (isWorkspaceRoot(cwd), the predicate dev / serve / build already use); a workspace member gets the standalone map. The expression is the one the function already spelled inline, so a user's project behaves exactly as before, and two fixture-based pins hold it (workspace root → IN-WORKSPACE map; member → standalone map). The order's "likely walk up" was a guess; the thread's reason for not walking (a member would get the empty in-workspace maps with no alias table behind them) is right.
    • The vendor-chunk regexes in scripts/vite-objectstack-workspace.ts are unchanged; the three tests read both arms off fixtures and ask the checkout only which arm its layout names, with isNestedWorkspace() as the independent witness. Deviation 1 (spec-dist compares the config's vendor test with the selected arm, baseline literal pinned on a fixture) accepted. Deviation 3 (the stale app-generator.ts allowlist entry removed) accepted.
    • Regrowth gate: check:ui-root-lookups learns workspace-file-at-ui-root (14 new self-test cases, 51 total); on the pristine design: isSystem 写入是否在租户审计控制范围内?——#13178 类级装置(A/B/C)的共同前置,从未被裁过 #13491 head it fires at exactly the two fixed sites. The gate header states its bound (two of the three fixed classes are not syntactic joins and stay outside the gate's reach): accepted as measured, not as a gap to widen.
    • Merged-layout verification on a scratch copy of the verify head cfa1676afc + design: isSystem 写入是否在租户审计控制范围内?——#13178 类级装置(A/B/C)的共同前置,从未被裁过 #13491 + this diff under ui/: the 7 touched script test files 293/293, CLI 48/48, check:ui-root-lookups OK, check:doc-snippets exit 0 with both controls live at ../node_modules/.pnpm; the control (before the diff) reproduces the 12 reds and check:doc-snippets exit 2.
    • objectui standalone: scripts/__tests__ whole (196 files, 5787 tests), CLI 416 tests, the touched gates, type-check:scripts, eslint — all exit 0.
    • CI on the PR head: 36/36 check runs completed, none failed (Type Check, Build & E2E, 16 test shards, dist pins, Lint, Repo Gates, changeset gates). check-governed-merges --pr objectstack-ai/objectui#13498: NOT governed (0 of 14 paths hit the register), 488 changed lines ≤ 3000 — ordinary queue landing.
    • Writes: 1 relay write (pr_create), 0 MCP writes, no review requested.

    Landing: the seat flips the PR ready and arms auto-merge via the relay now. The PR body says Part of objectstack#25733 (cross-repo, no auto-close), so the seat closes this card with a landing note once the merge lands; the parent #25677 ticks item 2e then. The verification branch #25718 picks the merged objectui main up at its next subtree refresh (run 6).


    Generated by Claude Code

  4. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed — dispatch seat. objectui#13498 merged to objectui main via the merge queue at 04:17Z. The workspace's own files (pnpm-workspace.yaml, node_modules/.pnpm) now come from scripts/workspace-root.mjs (virtualStorePath()), the three Console vendor-chunk tests read both arms off fixtures, currentContext() keeps its predicate with the meaning written in its doc comment, and check:ui-root-lookups guards the workspace-file-at-ui-root shape.

    Closing this card. Parent #25677 ticks item 2e. With 2b, 2c round 1, 2d and 2e on objectui main, the verification branch #25718 takes its next subtree refresh (run 6) now; the shard 7/8/10/13 reds and the check:doc-snippets exit 2 are expected to clear there.


    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

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratedomain:devxDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpm:epicReserved by a dedicated epic PM, parent or sub-issue; other PMs never take it; never with pm:queuepriority:p1High: required for production / M2toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions