Repository navigation
Description
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
- Install probes (
scripts/check-doc-snippet-types.mjs):findInstalledCopyand the census controls resolve from the pnpm workspace root found upward (theworkspace-root.mjshelpers 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. - CLI generator context (
packages/cli/src/utils/app-generator.tscurrentContext()andpackages/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 thatisMonorepowalks up to the nearestpnpm-workspace.yamland the test derivesIN_WORKSPACEfrom that same root instead of fromREPO_ROOT. The product behaviour for a user's own project (apnpm-workspace.yamlincwd, or none) must not change; add the case that pins it. - 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. - 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-treebreak 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.yamljoined 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. - 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 wholescripts/__tests__suite — green, no gate skipped; CI green. - Merged layout (scratch copy of
/home/claude/objectstack-issue-25697with the patch underui/): the three test files green from the ui root (pnpm --dir ui exec vitest run …),check:doc-snippet-typesreaches 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
maincarries 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 (thedevcommand 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 apnpm-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-typesis 3,500 lines with its own self-test battery; the probe change should be a few lines infindInstalledCopyand 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
objectstack-fleet commentedon Oct 25, 2026
Claim: epic #25677 round 6 (card threads; Tesla 2026-10-25 「你应该使用 pm-dispatch 技能派发」「并发可以到6」)
Session:
session_01RSDL3SFtJaKzcymvCD8RsUAccount:
os-teslaBranch:
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 toclaude/issue-<n>-<slug>)Worktree:
objectui-issue-25733Domain:
domain:devxSeat:
epic:#25677File surface:
scripts/check-doc-snippet-types.mjs(install probes),packages/cli/src/utils/app-generator.tscurrentContext()+packages/cli/src/__tests__/app-generator.test.ts,scripts/__tests__/vite-objectstack-{workspace,spec-dist,client-dist}.test.ts, thecheck-ui-root-lookupsgate + its tests,scripts/workspace-root.mjs; no.github/**, no regex change inscripts/vite-objectstack-workspace.tsContainer & model: M,
mode:thread(thread sessionsession_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
mainbefore 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
objectstack-fleet commentedon Oct 25, 2026
ACCEPT — dispatch seat. objectui#13498 (head
33dffb76d2, branchclaude/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):scripts/workspace-root.mjsonly: the newvirtualStorePath()sits besideworkspaceRoot()/uiRoot()and throws the same way when no workspace governs the tree;findInstalledCopyreads it. No second walk, no cwd heuristics.currentContext()wording accepted as proposed: "runs at a workspace root" means cwd itself holdspnpm-workspace.yaml(isWorkspaceRoot(cwd), the predicatedev/serve/buildalready 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.scripts/vite-objectstack-workspace.tsare unchanged; the three tests read both arms off fixtures and ask the checkout only which arm its layout names, withisNestedWorkspace()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 staleapp-generator.tsallowlist entry removed) accepted.check:ui-root-lookupslearnsworkspace-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.cfa1676afc+ design:isSystem写入是否在租户审计控制范围内?——#13178 类级装置(A/B/C)的共同前置,从未被裁过 #13491 + this diff underui/: the 7 touched script test files 293/293, CLI 48/48,check:ui-root-lookupsOK,check:doc-snippetsexit 0 with both controls live at../node_modules/.pnpm; the control (before the diff) reproduces the 12 reds andcheck:doc-snippetsexit 2.scripts/__tests__whole (196 files, 5787 tests), CLI 416 tests, the touched gates, type-check:scripts, eslint — all exit 0.check-governed-merges --pr objectstack-ai/objectui#13498: NOT governed (0 of 14 paths hit the register), 488 changed lines ≤ 3000 — ordinary queue landing.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 objectuimainup at its next subtree refresh (run 6).Generated by Claude Code
objectstack-fleet commentedon Oct 25, 2026
Landed — dispatch seat. objectui#13498 merged to objectui
mainvia the merge queue at 04:17Z. The workspace's own files (pnpm-workspace.yaml,node_modules/.pnpm) now come fromscripts/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, andcheck:ui-root-lookupsguards theworkspace-file-at-ui-rootshape.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 thecheck:doc-snippetsexit 2 are expected to clear there.Generated by Claude Code