Repository navigation
Commit cd70b78
tooling(objectui-readiness): make the objectui tree merge-ready in its own repo before cutover (objectstack#25685) (#13472)
Fixes #25685
Part of #25677 (sub-issue 2/6).
Clause-②: no
Metadata-protocol: none
One draft PR for the whole card, one commit per scope item in card
order. Branch `claude/project-thread-dwhq6r`, base `main` at a3c0da9
(chore: release packages, #13289). Nothing under `.github/`,
`AGENTS.md`, `.changeset/config.json` or any other governed surface is
touched; the objectui tree is prepared in its own repo so the `ui/`
import (ruling D1 / A+) merges without a follow-up fix-up commit.
## What changed, per item
### 1. One react line (commit 8474f4dfa)
- 34 manifests (root `package.json` devDependencies and
`pnpm.overrides`, every `packages/*`, `apps/console`, `apps/site`, the
three examples): `react` / `react-dom` 19.2.8 to 19.3.0, `@types/react`
19.2.18 to 19.3.0, `@types/react-dom` 19.2.4 to 19.3.0.
- `packages/cli/src/utils/scaffold-dependencies.ts`: `REACT_RANGE =
'19.3.0'` and the `@types/react*` entries of the shared dev-dependency
map, which the CLI anchor test compares to the root manifest.
- `pnpm-lock.yaml` regenerated with `pnpm install --no-frozen-lockfile`
(1337 lines added / 1337 removed). It also carries item 2's single-zod
resolution, because one install produced both.
- Changeset `.changeset/25685-one-react-line.md`: patch for the 30
published packages whose manifests moved.
Before: `grep -c '"react": "19.2.8"'` over the workspace manifests = 33;
after = 0, and `pnpm ls react --depth 0` across the workspace resolves
one `react@19.3.0`.
### 2. One zod range (commit 1d6a03800)
- `packages/types`, `components`, `app-shell`, `test-support`,
`plugin-timeline`: `"zod": "^4.6.5"` (was `^4.4.3` x3 and `^4.6.1` x2).
- Changeset `.changeset/25685-one-zod-range.md` for the four published
packages.
Before: three distinct declared ranges; after: one, and the lockfile
holds a single `zod@4.6.7` for the workspace (the unrelated
`zod@3.25.76` is a transitive dependency of a third-party tool and is
unchanged).
### 3. `uiRoot()` instead of `.git` / `pnpm-workspace.yaml` lookups
(commit 5cc535435)
- New `scripts/ui-root.mjs` (`UI_ROOT`, `uiRoot()`, derived from the
helper's own location; node builtins only) and its declaration twin
`scripts/ui-root.d.mts`: package tsconfigs have no `allowJs`, so without
the twin every migrated package test's import is TS7016 (2195392f1
removed it, the Type Check job proved it needed, ae7fcc585 restored it).
`check-lint-rule-coverage` reports a `.d.mts` as a file no ESLint config
reaches, so its predicate-2 ledger (`UNREACHED_GROUPS`, exact paths)
carries a row for it, owned by this PR; the gate's own test pins the
unreached population as `scripts/ui-root.d.mts` + `vitest.config.mts`.
- Migrated: 15 `repoRoot()` walkers in package tests (types x7,
components, plugin-calendar x2, plugin-gantt, app-shell x2,
data-objectstack, core), the sdui-parser census IIFE, four
`existsSync(join(root, 'pnpm-workspace.yaml'))` sanity assertions (now
`expect(root).toBe(uiRoot())`), and four scripts that shelled out to
`git rev-parse --show-toplevel` (`cross-file-line-citation-census.mjs`,
`dollar-dialect-alias-census.mjs`,
`check-new-cross-file-line-citations.mjs`,
`check-cross-repo-closer-outcome.mjs`).
`check-new-cross-file-line-citations.mjs` now diffs with `--relative`
and reads blobs as `rev:./path`, so it keeps working when the git
toplevel is a parent of the ui root; its root is `gateRoot()`
(753720692): the repository at the cwd via `--show-toplevel` — its
self-test drives the gate against a scratch repository — narrowed to
`uiRoot()` when the objectui tree lies inside it.
- New gate `scripts/check-ui-root-lookups.mjs` (`pnpm
check:ui-root-lookups`; `--list`, `--json`, `--self-test` with 13
cases): a TypeScript-AST scan of `scripts/`, `packages/`, `apps/` for
marker probes (`existsSync` / `statSync` / `lstatSync` / `accessSync` on
`.git` or `pnpm-workspace.yaml`, directly, via a const binding or a
template literal), `--show-toplevel` / `--git-common-dir` literals, and
`find-up`. Allowlist is a ledger (a stale entry is red) with five
entries: `scripts/objectstack-pin.mjs` (deleted at cutover),
`scripts/check-new-cross-file-line-citations.mjs` (its subject is the
repository at the cwd, above) and three CLI product predicates that
probe the USER's cwd (`app-generator.ts`, `workspace-vite.ts`,
`app-generator.test.ts`).
- `scripts/check-test-path-roots.mjs` classifies `uiRoot()` / `UI_ROOT`
as the self root (two new self-test cases).
Before: on `main` the fifteen walkers and four shell-outs resolved the
root through `.git` / `pnpm-workspace.yaml` / `git rev-parse`, and
`check-test-path-roots` reported 1264 self / 590 unclassified roots.
After: `check-ui-root-lookups: OK (7796 files scanned, 55 parsed, 6
probes all on the allowlist, 5 allowlist entries live)`;
`check-test-path-roots: OK`, 1264 self / 579 unclassified. The card's
crude grep (A4) re-derived to 55 unique files on `main` (the card quoted
71); 20 package test files and 4 scripts were migrated, and the residue
is comments, `readFileSync` DATA reads of the workspace globs, fixture
writes, two `'.git'` directory skip-list entries and the allowlisted CLI
predicates — the gate, not the grep, is the instrument that fails when a
new lookup lands.
### 4. tsc heap for app-shell and console (commits 02eaff511, c464a4a3f)
- `packages/app-shell/package.json` and `apps/console/package.json`: the
`tsc` of `build` and `type-check` runs as
`NODE_OPTIONS=--max-old-space-size=4096 tsc ...` — the spelling
objectstack's `packages/spec` uses for the same purpose.
- `scripts/__tests__/helpers/build-program.ts`: `stripEnvAssignments()`
skips the leading `NAME=value` words of a command before classifying the
tool, so the two builds are still tsc runs in the `turbo-build-inputs`
sweep and contribute their tsconfig chain.
- Why not the wrapper script the card suggested: a root
`scripts/with-heap.mjs` (02eaff511) is a file outside the two packages,
so `turbo-build-inputs.test.ts` requires it as a `$TURBO_ROOT$` input of
`build`, and `docs-build-trigger.test.ts` then requires every such input
in the docs job's pathspec in `ci.yml` — a `.github/workflows/**` edit
the maintainer must approve. Shard 15 went red on the second gate;
c464a4a3f removes the wrapper, its test and its turbo.json line. A heap
ceiling is not a build input.
Measured (A3) with `tsc --noEmit --extendedDiagnostics` in this tree:
app-shell `Memory used: 2234110K` (3915 files, 50.7 s), console `Memory
used: 2355117K` (4122 files, 25.4 s). Both exceed what the default
old-space limit left on the merged-tree runner in the spike measurement;
4096 MB has headroom.
### 5. Vite chunk tests derived from the workspace layout (commit
5c76fe324)
- New `scripts/vite-objectstack-workspace.ts`:
`candidateFrameworkPackagesDir(consoleDir)` (`../../../packages` from
`ui/apps/console`), `frameworkPackagesDir(consoleDir)` (that directory
when it exists, else `null`) and `workspaceChunkTests(dir | null)`
returning `{ vendor, spec, lint }` regexes that keep the baseline
`node_modules` / pnpm-store spellings and add an anchored, escaped
`dir/` alternative (vendor excludes `lint/`, which must stay lazy). With
`null` — standalone — it returns `BASELINE_CHUNK_TESTS`, the baseline
literals byte for byte (dde5e6dac): `vite-objectstack-spec-dist.test.ts`
pins the vendor literal as one of objectui#4854's flagged surfaces, and
an unconditional arm had moved it (shard 7).
- `apps/console/vite.config.ts` uses them for `VENDOR_OBJECTSTACK_TEST`,
`SPEC_MODULE_TEST` and the lazy-linter assertion.
- Ported from spike commit 3efb112 (A5) with the unit test it lacked,
`scripts/__tests__/vite-objectstack-workspace.test.ts`: standalone the
three tests are the baseline literals; a
`node_modules/@objectstack/spec/...` id is matched in both layouts;
`<monorepo>/packages/spec/dist/x.mjs` is matched by spec and vendor;
`<monorepo>/packages/lint/...` is excluded from vendor and matched by
lint; a sibling directory, a FILE named `packages` and objectui's own
`ui/packages/*` are not matched.
- `scripts/vite-objectstack-client-dist.ts` judged and left alone: its
chunk test has no `node_modules` assumption, and `packageResolvesFrom`
walks `node_modules/name`, which workspace links satisfy.
### 6. `pnpm typecheck` alias and `workspace:` spec ranges (commit
11bc20922)
- Root `package.json`: `"typecheck": "turbo run type-check"`.
- `scripts/check-spec-range-floors.mjs`: `WORKSPACE_PROTOCOL`;
`minVersionOf(range, { workspaceVersion })` reads `workspace:*` / `^` /
`~` / bare as the workspace package's own version and
`workspace:^18.1.0` as its range tail; `workspaceSpecVersion(root)`
reads the installed `@objectstack/spec/package.json`; a `workspace:`
range met without that version throws instead of passing.
- `scripts/objectstack-floor.mjs`: `installedVersion`, `floorOfRange`,
`planRanges(..., { workspaceVersionOf })`.
-
`packages/core/src/utils/__tests__/normalize-list-view.declaredSpecFloor-9012.test.ts`:
`floorOf` reads a `workspace:` range as the installed spec's own version
(the old `workspace:* is not a floor` assertion replaced by that test).
- Tests appended to `scripts/__tests__/check-spec-range-floors.test.ts`
and `scripts/__tests__/objectstack-floor.test.ts`.
Other readers of `@objectstack/spec` ranges that were NOT changed (they
do not fail on `workspace:` today):
`scripts/check-changeset-no-major.mjs` (`majorOfRange`) and
`scripts/sync-quick-reference-release.mjs`.
## Verification (local, this worktree)
Install: `pnpm install --no-frozen-lockfile` against a stand-in
`OBJECTSTACK_ROOT` (sibling objectstack checkout at 3efb112; pin
manifests and sibling manifests have identical dependency names and
exports, all 18.1.0, so `.objectstack-pin` and the `file:` lockfile
snapshots are unchanged). react / react-dom / @types 19.3.0 resolved.
Under the shared verify lock (`--concurrency=2`, 4096 MB heap):
- `turbo run build` for the dependency closure of console, cli and
app-shell: 34 tasks, 34 successful.
- `pnpm --filter @object-ui/app-shell type-check`, `pnpm --filter
@object-ui/console build` (vite build + sdui manifest + plugin), `pnpm
--filter @object-ui/cli build`, `type-check`, `test`: all exit 0.
- 24 touched package test files (the 21 migrated files,
`declaredSpecFloor-9012`, cli `app-generator`,
`console-vite-alias-closure-4925`, `doc-version-claims`): 24 passed, 325
tests.
Unlocked (the dev's run, before the five red shards below): `pnpm
type-check:scripts` exit 0; `scripts/__tests__` suites naming an edited
script (`ui-root`, `with-heap`, `check-ui-root-lookups`,
`check-test-path-roots`, `vite-objectstack-workspace`,
`objectstack-floor`, `check-spec-range-floors`,
`react-peer-range-norm-3741`, `quick-reference-commands-4149`,
`turbo-type-check-inputs`, `turbo-build-inputs`, `turbo-test-inputs`,
`turbo-lint-inputs`, `scripts-type-check`): all green. Gates exit 0:
`check:lockfile-integrity`, `check:lockfile-dedupe`,
`check:phantom-deps`, `check:unused-deps`, `check:installed-pin-claims`,
`check:test-path-roots`, `check:ui-root-lookups`, `check:entry-guard`,
`check:pre-install-import-graph`, `check:control-bytes`,
`type-check:coverage`, `check:new-line-citations`,
`check-changeset-presence`, `check-changeset-no-major`,
`check-changeset-fixed`. `eslint` over all 41 changed source files: 0
errors (4 pre-existing `no-explicit-any` warnings on lines this PR did
not touch).
`pnpm check:spec-floors` after the build: exit 1 with two
`floor-too-low` findings (`@object-ui/auth` `MEMBERSHIP_ROLE_EXTERNAL`,
`@object-ui/types` `navItemVisibleDataNeedsDataSource` against the
FETCHED `@objectstack/spec@18.0.0-next.x`). Identical verdict with the
unmodified gate script from `main` on the same dists, and both symbols
are referenced by `main`'s source, so this is pre-existing and not
introduced here; CI's `spec-range-floors.yml` runs the gate with
`--cross-check`, which is the measurement that counts.
NOT MEASURED locally (CI's): the full `turbo run test`, `lint` and
`type-check` across the workspace, `check:published-dist`, performance
budgets, the react 19.3.0 runtime behaviour beyond building and the
touched test files.
## Epic PM follow-up (commits 6f3d9d538, c464a4a3f, dde5e6dac,
753720692, 2195392f1, ae7fcc585)
The first CI run on 11bc20922 had five red shards, all in
`scripts/__tests__`: `check-hand-rolled-comment-mask` (the `uiRoot()`
test stripped comments with its own regex), `vite-objectstack-spec-dist`
(vendor literal moved), `check-new-cross-file-line-citations` (gate
rooted off its scratch repository), `check-lint-rule-coverage`
(`ui-root.d.mts` unreached), `docs-build-trigger` (new turbo input not
in the governed docs pathspec). The second run's Type Check job then
failed on `@object-ui/data-objectstack` (TS7016, the twin deleted by
2195392f1 was needed); ae7fcc585 restores it with a ledger row. Fixed as
described in items 3–5; verified locally after `pnpm run setup` (the pin
built): `vitest run scripts/__tests__` 194 files passed / 2 skipped,
`vite-objectstack-spec-dist.test.ts` 84 passed,
`check-lint-rule-coverage` + `ui-root` tests green with the twin, `pnpm
type-check:scripts` exit 0, `turbo run type-check
--filter=@object-ui/data-objectstack --filter=@object-ui/types
--filter=@object-ui/core` 6/6 tasks, `check:ui-root-lookups` OK.
## Acceptance notes
- One PR instead of the two the claim mentioned, per the ruling; commit
order equals card order 1 to 6.
- The lockfile effect of item 2 lands in commit 1 (a single `pnpm
install` regenerates the whole file); commit 2 holds the manifest hunks
and the changeset.
- The heap flag is an inline `NODE_OPTIONS=` prefix rather than the
card's cross-platform wrapper: a root wrapper is a build input, and a
new build input must be in the governed docs pathspec (item 4). The flag
changes the heap, not the program, so turbo's cache verdicts are
unaffected.
- The A4 crude-grep residue (data reads of `pnpm-workspace.yaml` globs
in `scripts/objectstack-pin.mjs`, `release-github-releases.mjs` and the
workspace-reading tests; `'.git'` in two directory skip lists) is
deliberate: those are not root lookups. The `pnpm-workspace.yaml` DATA
readers will need a path once `ui/` has no workspace file of its own;
that belongs to the carrier sub-issue, and is listed in the report.
- Stand-in pin (A1): the sibling checkout is one day newer than the pin
SHA; no dependency-name or export surface differs, so no manifest or
lockfile snapshot moved. `--write-manifests` was not passed.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a3c0da9 commit cd70b78
81 files changed
Lines changed: 2637 additions & 1705 deletions
File tree
- .changeset
- apps
- console
- site
- examples
- byo-backend-console
- console-starter
- hello-world
- packages
- app-shell
- src/views/metadata-admin/previews
- __tests__
- auth
- cli/src/utils
- collaboration
- components
- src/__tests__
- core/src/utils/__tests__
- data-objectstack/src
- fields
- i18n
- layout
- mobile
- permissions
- plugin-ai
- plugin-calendar
- src
- __tests__
- plugin-charts
- plugin-chatbot
- plugin-dashboard
- plugin-designer
- plugin-detail
- src/renderers/__tests__
- plugin-editor
- plugin-gantt
- src
- plugin-kanban
- plugin-list
- plugin-map
- plugin-markdown
- plugin-report
- plugin-timeline
- plugin-tree
- providers
- react
- src
- context/__tests__
- hooks/__tests__
- runner
- sdui-parser/src/__tests__
- test-support
- types
- src/__tests__
- scripts
- __tests__
- helpers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
| 111 | + | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
739 | 740 | | |
740 | 741 | | |
741 | 742 | | |
742 | | - | |
743 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
744 | 754 | | |
745 | 755 | | |
746 | 756 | | |
| |||
749 | 759 | | |
750 | 760 | | |
751 | 761 | | |
752 | | - | |
753 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
754 | 765 | | |
755 | 766 | | |
756 | 767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | | - | |
158 | | - | |
| 159 | + | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
172 | | - | |
173 | | - | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
0 commit comments