Repository navigation
Commit 46255b1
fix(scripts): ADR-0087 registration gate reads ui workspace packages and .tsx modules (#26319)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9Ex6pB8edHJLnCCc1tgdXz5)_
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 #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
#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>`:
- #26219 at `5bf229f6`: **exit 0**. All 54 `@object-ui/app-shell`
operands verified. Before this change: exit 1 at predicate 1 on all 54;
with part 1 only: exit 1 at predicate 2 on 16.
- #26293 at `e349c832`: **exit 1**, now on predicate 4 only. Predicate 1
(`@object-ui/types`, `@object-ui/components` publish) passes. Predicate
4 is part 3, not done here.
## 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 #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
- **Part 3 is not in this PR.** ADR-0087 D8 defines predicate 4 as
"`any` / `unknown` / no annotation at base, and a concrete type at
HEAD", and says to never weaken it to make something else pass. #26293's
`ComponentRendererProps` is a concrete interface at base (`{ schema:
TSchema; [key: string]: any; }`), and its HEAD index signature is
`unknown`, which D8 also counts as erased. Admitting it changes
predicate 4's definition, so it needs D8 wording first (Tier H). The
proposed limb: admit an exported interface whose surface at base and
HEAD is identical except that an `any` index signature carries a
non-`any` value type at HEAD (`unknown` included); #6048's shape (a
member removed) stays refused. The decision is with the maintainer;
#26220 remains open for it.
- `scripts/check-skill-compatibility-version.mjs` carries the same
three-root `PACKAGE_ROOTS`. It is outside this claim and left unchanged;
whether ui packages belong to its population is that gate's question.
Noted, not filed.
- No changeset: the diff touches only repository scripts, which no
package publishes (`skip-changeset`).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Am8eYNReiNP66D2JihPS1q)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 61ba04f commit 46255b1
2 files changed
Lines changed: 187 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
| |||
457 | 461 | | |
458 | 462 | | |
459 | 463 | | |
| 464 | + | |
460 | 465 | | |
461 | 466 | | |
462 | 467 | | |
| |||
489 | 494 | | |
490 | 495 | | |
491 | 496 | | |
492 | | - | |
| 497 | + | |
493 | 498 | | |
494 | 499 | | |
495 | 500 | | |
| |||
533 | 538 | | |
534 | 539 | | |
535 | 540 | | |
536 | | - | |
537 | | - | |
538 | 541 | | |
539 | 542 | | |
540 | 543 | | |
| |||
2663 | 2666 | | |
2664 | 2667 | | |
2665 | 2668 | | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
2666 | 2728 | | |
2667 | 2729 | | |
2668 | 2730 | | |
2669 | 2731 | | |
2670 | 2732 | | |
2671 | | - | |
| 2733 | + | |
| 2734 | + | |
2672 | 2735 | | |
2673 | 2736 | | |
2674 | 2737 | | |
| 2738 | + | |
2675 | 2739 | | |
2676 | 2740 | | |
2677 | 2741 | | |
2678 | 2742 | | |
2679 | 2743 | | |
2680 | | - | |
| 2744 | + | |
2681 | 2745 | | |
2682 | 2746 | | |
2683 | 2747 | | |
| |||
4537 | 4601 | | |
4538 | 4602 | | |
4539 | 4603 | | |
| 4604 | + | |
4540 | 4605 | | |
4541 | 4606 | | |
4542 | 4607 | | |
| |||
5587 | 5652 | | |
5588 | 5653 | | |
5589 | 5654 | | |
5590 | | - | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
| 5661 | + | |
| 5662 | + | |
| 5663 | + | |
| 5664 | + | |
5591 | 5665 | | |
5592 | 5666 | | |
5593 | 5667 | | |
| |||
5601 | 5675 | | |
5602 | 5676 | | |
5603 | 5677 | | |
| 5678 | + | |
5604 | 5679 | | |
5605 | 5680 | | |
5606 | 5681 | | |
| |||
7533 | 7608 | | |
7534 | 7609 | | |
7535 | 7610 | | |
| 7611 | + | |
| 7612 | + | |
| 7613 | + | |
| 7614 | + | |
| 7615 | + | |
| 7616 | + | |
| 7617 | + | |
| 7618 | + | |
| 7619 | + | |
| 7620 | + | |
| 7621 | + | |
| 7622 | + | |
| 7623 | + | |
| 7624 | + | |
| 7625 | + | |
| 7626 | + | |
| 7627 | + | |
| 7628 | + | |
| 7629 | + | |
| 7630 | + | |
| 7631 | + | |
| 7632 | + | |
| 7633 | + | |
| 7634 | + | |
| 7635 | + | |
| 7636 | + | |
| 7637 | + | |
| 7638 | + | |
| 7639 | + | |
| 7640 | + | |
| 7641 | + | |
| 7642 | + | |
| 7643 | + | |
| 7644 | + | |
| 7645 | + | |
| 7646 | + | |
| 7647 | + | |
| 7648 | + | |
| 7649 | + | |
| 7650 | + | |
| 7651 | + | |
| 7652 | + | |
| 7653 | + | |
| 7654 | + | |
| 7655 | + | |
| 7656 | + | |
| 7657 | + | |
| 7658 | + | |
| 7659 | + | |
| 7660 | + | |
| 7661 | + | |
| 7662 | + | |
| 7663 | + | |
| 7664 | + | |
| 7665 | + | |
| 7666 | + | |
| 7667 | + | |
| 7668 | + | |
| 7669 | + | |
| 7670 | + | |
| 7671 | + | |
| 7672 | + | |
| 7673 | + | |
| 7674 | + | |
| 7675 | + | |
| 7676 | + | |
| 7677 | + | |
| 7678 | + | |
| 7679 | + | |
| 7680 | + | |
| 7681 | + | |
| 7682 | + | |
| 7683 | + | |
| 7684 | + | |
| 7685 | + | |
| 7686 | + | |
| 7687 | + | |
| 7688 | + | |
| 7689 | + | |
| 7690 | + | |
| 7691 | + | |
| 7692 | + | |
| 7693 | + | |
| 7694 | + | |
| 7695 | + | |
| 7696 | + | |
| 7697 | + | |
| 7698 | + | |
| 7699 | + | |
| 7700 | + | |
| 7701 | + | |
| 7702 | + | |
| 7703 | + | |
| 7704 | + | |
| 7705 | + | |
| 7706 | + | |
| 7707 | + | |
| 7708 | + | |
| 7709 | + | |
| 7710 | + | |
| 7711 | + | |
| 7712 | + | |
7536 | 7713 | | |
7537 | 7714 | | |
7538 | 7715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | 1204 | | |
1230 | 1205 | | |
1231 | 1206 | | |
| |||
2093 | 2068 | | |
2094 | 2069 | | |
2095 | 2070 | | |
2096 | | - | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
2097 | 2075 | | |
2098 | 2076 | | |
2099 | 2077 | | |
| |||
0 commit comments