Skip to content

fix(scripts): ADR-0087 registration gate reads ui workspace packages and .tsx modules - #26319

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-rcgxug
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-rcgxug

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Part of #26220 (parts 1 and 2 of the claim. Part 3, predicate 4 on an any index signature, needs ADR-0087 D8 wording and waits on the maintainer: see Acceptance notes).

Clause-②: no
Metadata-protocol: none

What changes

  • Part 1: the package globs come from pnpm-workspace.yaml. scripts/check-adr-0087-registration.mjs drops its hand-kept PACKAGE_ROOTS (three roots that predate the ui/ import). workspaceGlobsAt(rev) reads the workspace file at the judged rev through workspace-enumerator.mjs's parseWorkspaceGlobs (the repo's one parse of it), and isWorkspaceManifest matches a listed <dir>/package.json against the <dir> / <dir>/* globs the way expandWorkspaceGlob expands them. A missing workspace file, an empty block and a glob richer than <dir>/* throw WorkspaceEnumerationError instead of reading as an empty workspace. A manifest nested below a member (a test fixture package.json) is no longer a member.
  • Part 2: predicate 2 now locates declarations behind .tsx modules. The card listed aliases, shim re-exports and .tsx declarations. Measured on refactor(app-shell)!: retire the 54 root-entry exports that nothing outside the package names #26219's branch, all 16 failures had one cause: the export reader's Program had no jsx option, so TypeScript refused every import that resolves to a .tsx file (TS6142) and the aliased symbol had no declaration. The alias (MetadataPageShell → PageShell.tsx) and the shim (useRecentItems.ts → RecentItemsProvider.tsx) already resolved once the target module loaded. The fix is one option, jsx: ts.JsxEmit.Preserve. The Program is still noEmit and only syntactic diagnostics are read.
  • scripts/pm/bare-root-worklist.mjs: its three check-adr-0087-registration.mjs PACKAGE_ROOTS … rows are deleted, because the bare words they judged are gone (the self-test reported them STALE: "Delete the entry"). The declaration battery's floor follows, 126 → 122 (two cases per row; 128 → 122 on a run), with a comment in the dispatch-gates: a change under scripts/ does not derive check-position-name-fold-loaders, though that gate scans scripts/ — the local --ran reconciliation read 98/98 while CI's lint lane went red on it #24037 style.

Battery rows

New battery WS (#26220): ui workspace packages, .tsx modules, aliases and shims, 11 cases, floor 11, roster floor 55 → 56:

  • WS-G1 / G1b: a ui/packages/* package retires a .tsx export, an alias of a .tsx export and a type behind a .ts shim under runtime-export-retired; green, and the verdict names each declaration where the compiler resolved it (ExpressionProvider.tsx, PageShell.tsx, RecentItemsProvider.tsx).
  • WS-R1: the same tree with the ui/packages/* glob removed is refused ("no workspace manifest … named @object-ui/app-shell"), so membership comes from the workspace file only.
  • WS-R2: a rev with no pnpm-workspace.yaml throws, never reads as an empty workspace.
  • WS-G2: unpublished on a private ui/apps/* package is green.
  • WS-U1 to U5: unit pins on isWorkspaceManifest (<dir>/*, bare <dir>, nested manifest refused, node_modules and dot-dirs refused) and on workspaceGlobsAt refusing packages/**.

The self-test fixture repo now writes a pnpm-workspace.yaml that mirrors the real file's glob shapes (build({ workspace }), null writes none).

Proof on the two held PRs

All with this branch's gate, --base origin/main --head <their head>:

Tests and gates

  • Ablation of part 2 (one-time, committed fix first, restored with git checkout HEAD --, blob hash re-checked): removing the jsx line turns WS-G1 and WS-G1b red with exactly refactor(app-shell)!: retire the 54 root-entry exports that nothing outside the package names #26219's message ("the declaration of useExpressionContext cannot be located at the merge base"), 2 failures; restored, green.
  • node scripts/check-adr-0087-registration.mjs --self-test: exit 0, "575 assertions over real temp git repos" (564 before this branch), on head ca0155f2.
  • node scripts/pm/bare-root-worklist.mjs --self-test: exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 33 commands derived at ca0155f2 (after merging origin/main 6ea429df). All 33 exit 0, including node scripts/check-adr-0087-registration.mjs --base origin/main (no declared-breaking changeset in this diff), pnpm check:changeset-gate-self-tests, pnpm check:pm-dispatch-gates and node scripts/pm/bare-root-worklist.mjs --self-test. --ran: 33 derived, 33 run, 0 NOT-MEASURED, 0 UNRUN. No package is touched, so there is no build closure and no package test or typecheck to run; no test file names either edited script.

Acceptance notes


Generated by Claude Code

…mpiles .tsx

The gate's hand-kept PACKAGE_ROOTS predated the ui/ import, so no
@object-ui/* package had a workspace manifest here. It now reads the
package globs from pnpm-workspace.yaml at the judged rev, through
workspace-enumerator's parse. The export reader's Program also sets
`jsx`, without which every .tsx module failed to resolve (TS6142) and
predicate 2 could not locate any declaration behind it.

bare-root-worklist: the three PACKAGE_ROOTS rows are deleted (stale)
and the declaration battery's floor follows (126 -> 122).

Claude-Session: https://claude.ai/code/session_01Am8eYNReiNP66D2JihPS1q
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · seat domain:ui#1 · 2026-10-26T21:01Z

Head ca0155f2 (read from the PR object).

Landing: ready + auto-merge through the relay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants