Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

docs(create-plugin): record that in-repo scaffolding is already refused by named pins - #8042

Merged
baozhoutao merged 1 commit into
mainfrom
claude/issue-7524-create-plugin-in-repo-scaffold
Sep 6, 2026
Merged

baozhoutao merged 1 commit into
mainfrom
claude/issue-7524-create-plugin-in-repo-scaffold

Conversation

@baozhoutao

Copy link
Copy Markdown
Contributor

Fixes #7524

This was a measurement-first card. The measurement came back LOUD, so the route is 2(b): no gate change, a docblock note in packages/create-plugin/src/templates.ts naming the pins that already refuse an in-repo scaffold, plus an empty-frontmatter changeset. The scaffolder's published output is byte-identical to main.

All readings below are pinned to 121147911 (the branch head) except the Step-1 planted/removed legs, which were taken on the same tree with the scratch package added and then removed; the scratch package was never committed.

Step 1 — the measurement (mandatory, and it chose the route)

Ran the real scaffolder, not a hand-written imitation: pnpm --filter @object-ui/create-plugin build, then node packages/create-plugin/dist/index.js scaffold-probe-7524 -d ... -a ... from the worktree root, which writes packages/plugin-scaffold-probe-7524/. pnpm-workspace.yaml already globs packages/*, so it became a workspace package with no edit; pnpm install linked it.

Emitted shape, verified on disk before running anything: "test": "vitest run" in the manifest; a test block in vite.config.ts carrying globals: true, environment: 'jsdom', setupFiles: ['./vitest.setup.ts']; no vitest.config.*; and zero occurrences of assertCanonicalVitestInvocation in the generated config. Exactly the hazardous shape the card describes.

gate exit verdict caused by the scaffold?
the five named pins, clean tree (control) 0 Test Files 5 passed (5), Tests 112 passed (112) n/a — this is the control
the five named pins, scaffold planted 1 4 failed of 112 YES — every one names the generated package
vitest-invocation-guard.test.ts > calls the guard from every one of them 1 offender list is packages/plugin-scaffold-probe-7524/vite.config.ts YES
vitest-invocation-guard.test.ts > declares no `test` block — a build config must not carry test semantics 1 same file YES
vitest-invocation-guard.test.ts > derives the repo root instead of counting `..` 1 packages/plugin-scaffold-probe-7524/vite.config.ts calls the guard with a hand-counted repo root YES
runner-package-test-entry-3746.test.ts > admits no package beyond the recorded baseline 1 received ["packages/plugin-scaffold-probe-7524"], expected [] YES
package-scripts-vitest-projects.test.ts 0 passed with the scaffold planted NO — see A2 below
turbo-test-inputs.test.ts 0 passed with the scaffold planted NO
unit-registry-absence-collision.test.ts 0 passed with the scaffold planted NO
pnpm exec vitest run scripts/__tests__/, clean tree (control) 0 Test Files 110 passed (110), Tests 3323 passed (3323) n/a — this is the control
pnpm exec vitest run scripts/__tests__/, scaffold planted 1 11 failed of 3323, across 7 files YES — 10 of the 11 print the package name verbatim; the 11th is quick-reference-commands-4149 going from 38 published to 39 published
pnpm --filter @object-ui/plugin-scaffold-probe-7524 test (before pnpm install) 1 startup error: Could not resolve 'vite-plugin-dts' / Cannot find package '@vitejs/plugin-react' an install artifact, not a verdict — recorded so nobody mistakes it for a refusal
pnpm --filter @object-ui/plugin-scaffold-probe-7524 test (after pnpm install) 0 RUN v4.1.10 /…/packages/plugin-scaffold-probe-7524, Test Files 1 passed (1), no guard output at all YES — and this is the one that is SILENT
node scripts/vitest-invocation-guard.mjs 0 zero bytes of output not a reading: the file has a shebang but no main-module block, so it has no CLI. It is a module vitest.config.mts and the package vite configs import
check:unreferenced-sources, check:phantom-deps, check:self-import, check:side-effects-array, check:published-dist, check:readme-exports 0 each — NO — none of them looks at test shape

Reading. The two halves point opposite ways, and that is the whole answer:

  • the invocation itself is silently green — pnpm test inside a scaffolded in-repo package runs with the package as vitest's root, under the generated vite.config.ts as its test config, and the guard never fires because that config never calls it;
  • but the repo is loud about the shape existing at all. Four named assertions in two pins refuse it, plus seven more incidental ones. Nothing can be committed in that state.

So the card's premise splits. "The scaffolder emits the shape #3240 removed" is true. "…with nothing to refuse it" is false — objectui#3240 / objectui#5406 / objectui#3746 already built the refusal, on the repo side rather than in the scaffolder, and it fires on the first CI run. The one thing that was genuinely missing is the record of that, which is what this PR adds.

Removal proof. The scratch package is a measurement, never a commit: after rm -rf packages/plugin-scaffold-probe-7524 and restoring pnpm-lock.yaml from the base commit, git status --porcelain is empty and the lockfile md5 is back to its base value (85895a3d7f8051c61b1f4803ea1b3cf7). The control run of the whole scripts/__tests__/ directory above was taken after that removal, which is what makes the 11 failures attributable.

Step 2(b) — what changed

One docblock paragraph on buildViteConfig in packages/create-plugin/src/templates.ts. It records the measurement, names the two pins and their assertion texts, explains why the emitted shape is nevertheless right for the generator's actual audience (a plugin in its own repo, where the emitted config is the only config and the test block is the only thing giving the example test a DOM), and says explicitly not to teach the templates in-repo target detection.

No generated file changes — buildPackageJson, buildViteConfig's returned string, buildVitestSetup and the rest are byte-identical. The changeset therefore has empty frontmatter: node scripts/check-changeset-presence.mjs requires a declaration because src/ of a released package moved, and "this releases nothing" is the explicit exemption it names.

Zone-2 assumptions: one falsified

  • A1 — confirmed. templates.ts:150 emits test: 'vitest run'; the test block and VITEST_SETUP_FILE are where the dispatch said.
  • A2 — FALSIFIED, and it mattered. scripts/__tests__/package-scripts-vitest-projects.test.ts does not walk workspace packages' test scripts. It reads the root package.json for --project values and checks each is declared in vitest.config.mts (objectui#7096). It stayed green with the scaffold planted. The loudness comes from vitest-invocation-guard.test.ts and runner-package-test-entry-3746.test.ts instead — the answer is still (b), by a different route than the dispatch predicted.
  • A3 — confirmed. The scaffolded vite.config.ts contains zero occurrences of assertCanonicalVitestInvocation, so the guard cannot fire from it. Every red is repo-side.
  • A4 / A5 — nothing observed contradicting them; worked from the merged tree at a9e6f04b4.

Gates on 121147911

Exit codes captured by redirect-then-capture, never through a pipe.

gate exit
pnpm exec vitest run scripts/__tests__/ (whole directory) 1 on the first run, 0 on re-run — see the flake note below
pnpm type-check:scripts 0
pnpm lint:root 0 (32 warnings, 0 errors)
pnpm check:entry-guard 0
pnpm check:control-bytes 0 — OK (scanned 6449 tracked text file(s); skipped 85 binary)
grep -naP control-byte self-scan of both changed files no matches
node scripts/check-changeset-presence.mjs 0 — "Every one of them has an EMPTY frontmatter — declared as releasing nothing"
node scripts/check-changeset-no-major.mjs 0
node scripts/check-governed-queue-guard.mjs --test packages/create-plugin/src/templates.ts 0 — NOT GOVERNED
pnpm --filter @object-ui/create-plugin test 0 — Test Files 1 passed (1), Tests 19 passed (19)
pnpm --filter @object-ui/create-plugin type-check 0
pnpm --filter @object-ui/create-plugin lint 0
check:unreferenced-sources, check:phantom-deps, check:self-import, check:published-dist 0 each

Flake, not a regression. The first whole-directory run exited 1 on two cases in check-doc-links.test.ts (agrees with the real renderers on every heading in the scan surface, has no setext headings…), both with Error: Test timed out in 15000ms — timeouts, not assertion failures, in a run whose total duration was 145s under container contention. Re-run alone on the same HEAD: exit 0, Test Files 1 passed (1), Tests 121 passed (121), 10.36s. This diff touches no markdown that gate scans; the AGENTS.md flaky-test section describes this signature exactly.

pnpm check:skill-examples was not run and is not owed: the diff touches nothing under skills/, and the only skill mentions of this generator are a prose line and a bash fence (pnpm create-plugin my-widget) — that gate judges marked ts/tsx/json fences.

Live E2E (informational) is red on every branch today for an upstream reason (objectui#7990); not from this change.

Out of scope, filed separately

objectui#8041 — the scaffolded package.json declares license: "MIT" while buildPluginFiles writes no LICENSE file, so a published scaffolded plugin ships a tarball claiming a licence whose text is absent. Surfaced by the same measurement (package-files-exist.test.ts reds on it), deliberately not touched here because this card's ruling holds the scaffolder's published output constant. Filed unassigned, no labels, for triage.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr


Generated by Claude Code

…ed by named pins

Measured on a9e6f04: running the generator into `packages/` and re-running
`pnpm exec vitest run scripts/__tests__/` turns 11 assertions red across 7
files, every one naming the generated package. Four are about the emitted test
shape specifically -- three in `vitest-invocation-guard.test.ts` (#3240/#5406)
and one in `runner-package-test-entry-3746.test.ts` (#3746, which reads the
generated `"test": "vitest run"`).

So the emitted output needs no change: it is correct for the generator's actual
audience -- a plugin in its own repo, where the emitted config is the only
config -- and the in-repo case that would be wrong is caught by pins rather
than by a reviewer. The docblock records the measurement and the two pin names
so the next reader does not re-derive it, and says explicitly not to teach the
templates in-repo target detection.

Comment-only; an empty-frontmatter changeset declares that nothing publishes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3186.0 KB 3191.4 KB
Main entry chunk (gzip) 143.5 KB 350 KB
Entry file index-Cf0gKlBG.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.67KB 5.75KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 497.06KB 113.79KB
core (index.js) 6.96KB 2.79KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 182.08KB 50.62KB
fields (index.js) 242.44KB 61.25KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.16KB 3.68KB
plugin-calendar (index.js) 47.29KB 13.18KB
plugin-charts (index.js) 70.31KB 19.62KB
plugin-chatbot (index.js) 193.53KB 46.05KB
plugin-dashboard (index.js) 131.41KB 34.43KB
plugin-designer (index.js) 211.51KB 43.01KB
plugin-detail (index.js) 247.59KB 63.48KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 131.01KB 32.32KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 208.56KB 56.63KB
plugin-kanban (index.js) 52.30KB 14.49KB
plugin-list (index.js) 113.24KB 27.66KB
plugin-map (index.js) 20.35KB 6.77KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 29.95KB 8.67KB
plugin-tree (index.js) 9.19KB 3.19KB
plugin-view (index.js) 84.33KB 20.75KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Contributor Author

Standing down on Live E2E (informational): that check is red on main itself today (base-red, anchored on objectui#7990 / objectstack-ai/objectstack#16186), it is informational (not required), and this PR changes a docblock comment plus an empty changeset — nothing it exercises. No fix is ported because none exists yet upstream. All other checks are the ones this PR is judged on; the flip to ready happens only once every non-informational check on 121147911 is green.


Generated by Claude Code

@baozhoutao
baozhoutao marked this pull request as ready for review September 6, 2026 12:44
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 6, 2026
Merged via the queue into main with commit a12ef6c Sep 6, 2026
33 of 34 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-7524-create-plugin-in-repo-scaffold branch September 6, 2026 12:59
baozhoutao pushed a commit that referenced this pull request Sep 6, 2026
Brings in #8046, #8042, #8039. Neither of this branch's two paths is touched by
that range; plugin-view source moved, so the forced build and every gate are
re-run on the merged head.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

finding(create-plugin): the scaffolder emits a per-package vitest test block — the shape objectui#3240 just removed from this repo

2 participants