This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
chore(packages): declare sideEffects on every published package (objectui#13464) - #13495
Merged
Merged
Conversation
The 29 published manifests that did not declare the field now do, each from a read of its own modules: - `false` for react, auth, collaboration, data-objectstack, mobile, permissions and providers: no module registers, imports CSS or writes a global at load time. - An array, derived by `scripts/check-side-effects-array.mjs`, for the plugins whose registrations the gate can enumerate exactly. - `true` for plugin-ai, plugin-chatbot, plugin-grid, cli, create-plugin and runner. The consistency test learns the array gate's module-local write carve-out (`X.displayName = 'X'` on a binding the module declares), with pins in both directions, and its census grows to the new population. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4K9dtZAX6vw67etsxBeuP
plugin-dashboard registers its retired node types in a loop, so the key set is not statically readable and check-sdui-registration-pins cannot pin it. `true` is the conservative claim for it. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4K9dtZAX6vw67etsxBeuP
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contributor
Author
席位核对 — ACCEPT · PR #13495 @
|
This was referenced Oct 25, 2026
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Elon · project thread
Part of objectstack-ai/objectstack#25913. This PR does the card's first task item (declare
sideEffectson every published package). The longer-term item, explicitregister*()so every package can sayfalse, stays on the card for its own decision, so merging this should not close it.Clause-②: no
Metadata-protocol: none
What changes
29 published manifests that had no
sideEffectsnow declare one.apps/consoleis out of scope per the claim. Only thesideEffectsfield moves in each manifest.falsereact,auth,collaboration,data-objectstack,mobile,permissions,providerssrc/scanned with the array gate's ownscanModule(a superset of what any import reaches, lazy targets included): no registration, no bare import (CSS or otherwise), no global orwindowwrite. The only top-level statements areX.displayName = 'X'on a binding the same module declares: react 6, auth 1, mobile 1, permissions 1, the other three none.collaboration's one top-level call,createSafeTranslation(...), is a pure factory (read: it builds a closure and touches nothing outside).plugin-calendar,plugin-charts,plugin-designer,plugin-detail,plugin-editor,plugin-form,plugin-gantt,plugin-kanban,plugin-list,plugin-map,plugin-markdown,plugin-report,plugin-timeline,plugin-tree,plugin-viewscripts/check-side-effects-array.mjsderives: the entry forms plus every module that registers at load time, in both spellings. The gate passes on all 15 (plus the existingapp-shellandlayout).trueplugin-ai,plugin-chatbot,plugin-dashboard,plugin-gridplugin-aihas no bundler alias to its source, so the consistency test reads itssrc/index.tsxas a phantom path;plugin-chatbot's barrels are pure and register throughexport *from./renderer, so the consistency test refuses them as named entries while the array gate requires them;plugin-dashboardregisters retired node types in a loop, socheck-sdui-registration-pinscannot read the keys;plugin-grid'sObjectGridimportshooks/useRecordCrudVerdicts(top-levelsubscribeDataChanges), and the gate's reachability rule rejects that chain without namingObjectGrid, which it would then call STALE.truecli,create-plugin,runnerbinentry (cli,create-plugin) or the app entry (runner'smain.tsx,ReactDOM.createRoot(...)) runs on load. Nothing bundles them as a library, sotrueis the honest, free answer.The consistency test
scripts/__tests__/side-effects-declaration-consistency.test.tschanges in the two ways the amended claim allows:falseand array packages, and the anti-vacuity floors move with it.local-binding-write:X.prop = ...whereXis declared in the same module and the right-hand side calls or constructs nothing. A newdescribepins both directions: a function, class or const of the module is pure; an imported binding, a namespace import,windowandglobalThiswrites, a right-hand side with a call ornew, and an element write stay findings.Reverse check, on
c16787awith the carve-out line removed:no sideEffects: false package has a load-time side effectand the new pure-direction pin go red (Tests 2 failed / 113 passed); restored fromHEAD,git diff HEADempty.Measured
Console production build (
pnpm turbo run build --filter='./packages/*'thenpnpm --filter @object-ui/console build, the same two steps asperformance-budget.yml),apps/console/dist/eager-closure.json:6f629a7(main)fcfc372A 182 B drop: no real saving for the console, which imports almost every package and whose arrays name each barrel. The gain is for external hosts that bundle only some
@object-ui/*packages. No ceiling moves, as the claim asked. The build's other plugin lines (declared-lazy-views,assert-types-zod-stays-lazy) read the same before and after.node scripts/check-sdui-registration-pins.mjson thefcfc372build: all 68 registrations the arrays promise are present in the built console.Tests and gates (local, head
fcfc372unless noted)pnpm exec vitest run scripts/__tests__/side-effects-declaration-consistency.test.ts scripts/__tests__/check-side-effects-array.test.ts scripts/__tests__/check-sdui-registration-pins.test.ts:Test Files 3 passed (3),Tests 172 passed (172).node scripts/check-side-effects-array.mjs: exit 0, 17 packages green.node scripts/check-eager-closure-budget.mjs: exit 0 (3033.4 KB, budget 3496.0 KB).c16787a(before theplugin-dashboardswitch):pnpm exec vitest run --maxWorkers=2 scripts/gave 1 failed of 5857,check-sdui-registration-pins.test.tsreading the dashboard loop as unreadable, whichfcfc372fixes and the run above re-checks;packages/vscode-extensionexport-to-react-preambleandapp-shelltenancyPostureWall.paritytests (the other two that readsideEffects): 9 passed.node scripts/check-changeset-presence.mjs,node scripts/check-changeset-no-major.mjs,node scripts/check-changeset-fixed.mjs,pnpm check:new-line-citations, eslint on the changed test: exit 0 each.pnpm testmatrix andpnpm lint, which CI runs.Acceptance notes
sideEffectsguards disagree about a pure barrel:check-side-effects-array.mjsrequires every entry form in an array, and the consistency test refuses a named source entry with no load-time effect. That is whyplugin-chatbotistrueinstead of an array. Not filed: it is a reading, with no consumer-visible defect today.plugin-grid's andplugin-detail's top-levelsubscribeDataChanges(...)calls invalidate module-local caches. The gate counts them as registrations, which is the conservative reading.Checklist
Session:
https://claude.ai/code/session_01Q4K9dtZAX6vw67etsxBeuP🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4K9dtZAX6vw67etsxBeuP
Generated by Claude Code