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

fix(create-plugin): type the scaffolded vite.config.ts's test block - #8398

Merged
baozhoutao merged 1 commit into
mainfrom
claude/issue-8139-scaffold-vite-config-typing
Sep 7, 2026
Merged

baozhoutao merged 1 commit into
mainfrom
claude/issue-8139-scaffold-vite-config-typing

Conversation

@claude

@claude claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #8139

What was wrong

buildViteConfig() in packages/create-plugin/src/templates.ts emitted a vite.config.ts that passes a test: block to a defineConfig imported from vite. vite's UserConfig declares no test key, so the emitted file is TS2769 — Object literal may only specify known properties, and 'test' does not exist in type 'UserConfigExport' — measured on this exact template by the emitted-code census (objectui#7864 / PR #8138).

Triage's severity reading, re-verified on b38014e82: buildPackageJson scaffolds build / test / lint and no type-check script, and vite build loads the config through esbuild, which does not type-check. So nothing in the scaffolded repo RUNS that check and the symptom is an editor-only red squiggle — p3, not p2. It is still red on day one in every plugin this generator writes.

The fix

One emitted line: the config now opens with a triple-slash reference types="vitest/config" directive above the imports. That pulls in vitest/dist/config.d.ts:33, whose declare module "vite" { interface UserConfig { test?: ... } } augmentation supplies the missing declaration. It is a type-only comment: zero run-time effect, and vite build never sees it.

The test: block itself is untouched. PR #8042's ruling on #7524 keeps it deliberately for the out-of-repo audience, and the template's own docblock argues it is the only thing giving the scaffolded example test a DOM.

Why the reference and not import { defineConfig } from 'vitest/config'

The card deliberately did not choose. Both shapes type-check identically in the scaffolded repo — measured: vitest ^4.1.10 is a declared devDependency of the emitted package.json (DEV_DEPENDENCIES, templates.ts:87-96), so the import would be legitimate there.

They are not equivalent here. vitest is declared by this repository's root manifest and mapped by no package the census covers, so an emitted import ... from 'vitest/config' trips the census's root bound (resolvesOnlyThroughRootManifest) and the whole template is REFUSED instead of judged. Measured both ways on b38014e82:

shape census summary diagnostics on buildViteConfig
baseline (from 'vite', no reference) Judged 12 ... 7 refused by the root bound TS2769 + the vite-plugin-dts TS2307 — the census reports 2 remain
this PR (reference, keep from 'vite') Judged 12 ... 7 refused by the root bound TS2769 gone; only the vite-plugin-dts TS2307 — 1 remain
the other shape (from 'vitest/config') Judged 11 ... 8 refused by the root bound 0 remain — but only because the block is no longer compiled at all, taking the TS2307 with it

A clean number bought by not looking is the one outcome that census exists to avoid, so the reference wins. The reasoning is written into buildViteConfig's docblock and into the pin, so the next reader who is tempted to "simplify" it hits the measurement first.

The TS2307 on vite-plugin-dts is untouched, on purpose

It is an artefact of the instrument, not a defect: the scaffolded package.json declares vite-plugin-dts ^5.0.3 (templates.ts:93) and the census resolves against this monorepo's root manifest, where it is undeclared. The card recorded it precisely so nobody cards it. buildTsconfig()'s extends path is likewise untouched — triage's unverified passing note, explicitly no card and no change.

The pin, and its trade

packages/create-plugin/src/__tests__/templates.test.ts gains a typesTheTestBlock() predicate plus two tests: the pin, and its own reverse verification (strip the reference line and the predicate must say NO, rather than passing vacuously over a config with no test: block — the idiom the rest of that file already uses for objectui#3759).

Trade, stated rather than assumed. The census is report-only by objectui#7864's ruling, so without a pin nothing mechanical stops this regressing; the pin is the only guard. The cost is that it is a string pin over generated text, and it deliberately rejects the vitest/config shape too — a future maintainer who wants that shape has to delete an assertion whose comment carries the measured numbers. That is the intent: the choice was decided by a measurement, so changing it should cost a reading of that measurement, not a silent edit.

Verification

Every command run in a dedicated worktree on 0e49b95d8, heavy runs serialised through the shared verify lock.

$ pnpm exec vitest run packages/create-plugin/
 Test Files  1 passed (1)
      Tests  21 passed (21)          # 19 before, +2 new

$ pnpm --filter @object-ui/create-plugin run type-check
> tsc --noEmit && tsc -p tsconfig.test.json
(clean, exit 0 — the second invocation is what covers the test file)

$ node scripts/check-doc-snippet-types.mjs --emit-census       # exit 0, report-only
  Judged        12 of 20 recognised template(s) reached the semantic phase; 1 failed to parse, 7 were refused by the root bound.
  Of which      ... 1 remain, and those are the only ones that say anything about the emitted code.
  [semantic]  packages/create-plugin/src/templates.ts:270:17  TS2307: Cannot find module 'vite-plugin-dts' ...
  (no TS2769 anywhere)

$ node scripts/check-doc-snippet-types.mjs                     # the BLOCKING gate, exit 0
Root bound:     no block imports a specifier that resolves only through this repository's ROOT manifest.
Semantic phase: 632 of 632 block(s) judged, 0 failed.

$ node scripts/check-changeset-presence.mjs                    # exit 0
✅  2 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s).

$ node scripts/check-control-bytes.mjs                         # exit 0
✅  check-control-bytes: OK (scanned 6650 tracked text file(s); skipped 85 binary).

$ pnpm run check:unreferenced-sources check:comment-mask-corpus check:doc-fences check:phantom-deps check:self-import
(each exit 0; comment-mask reports its pre-existing declared residue of 1 file, unchanged)

Reverse verification (ablation). Run from the committed state, with a restore trap and on-disk proof, not from an exit code: the reference line was stripped from templates.ts (git hash-object before 1cef5f078, after aaa5efa66 — the mutation is proven to have landed), and both legs turned as predicted:

 FAIL  packages/create-plugin/src/__tests__/templates.test.ts > generated vite.config.ts
       > types the `test:` block it carries, so the emitted config is not red on day one
 Tests  1 failed | 20 passed (21)

  Of which  ... 2 remain ...
  [semantic]  packages/create-plugin/src/templates.ts:296:3  TS2769: No overload matches this call. ...

Restore verified by byte identity rather than by exit code: git hash-object back to 1cef5f078, git diff HEAD empty, git status --porcelain empty.

Lint, declared narrowing. eslint was run on the two changed files only, not repo-wide. The narrowing is a measurement, not a skip: the population is 4453 files per eslint's own config (eslint . --no-inline-config --format json, counted from the JSON), this run covered 2 of them with 0 errors and 0 warnings (--format json counts), and eslint.config.js enables no type-aware linting (no projectService, no parserOptions.project), so nothing in this diff can move the verdict on any file it does not touch. The full farm is CI's run.

Changeset

.changeset/khaki-cameras-attack.md, patch on @object-ui/create-plugin — the published package emits a different file than before, so this is a real behaviour change of the tarball, not an internal edit.


Generated by Claude Code

The emitted `vite.config.ts` passed a `test:` block to a `defineConfig`
imported from `vite`, whose `UserConfig` declares no `test` key. The
emitted-code census measures that as TS2769 on this template; in the
scaffolded plugin's own repo — the only audience this generator serves —
it is a red config file on day one, in every editor.

Nothing in the scaffold RUNS a type check today (`buildPackageJson`
writes `build`/`test`/`lint` and no `tsc`, and `vite build` loads the
config through esbuild), so the symptom is editor-only. It is still
wrong in every plugin the generator writes.

The config now opens with `/// <reference types="vitest/config" />`,
which pulls in `vitest/dist/config.d.ts` and its
`declare module "vite" { interface UserConfig { test?: … } }`
augmentation. It is a type-only comment: zero run-time effect, and
`vite build` never sees it.

Deliberately NOT the other shape vitest documents,
`import { defineConfig } from 'vitest/config'`. It type-checks
identically in the scaffolded repo, but `vitest` is declared by this
repository's root manifest and mapped by no package the census covers,
so an emitted import of it trips the census's root bound and the whole
template is refused instead of judged. Measured both ways: with the
reference, `Judged 12 … 7 refused by the root bound` and the TS2769 is
gone; with the import, `Judged 11 … 8 refused` and the census reports
zero diagnostics here only because it stopped compiling the file.

The `test:` block itself is untouched — it is the only thing giving the
scaffolded example test a DOM. A pin plus its own reverse-verification
test keeps the declaration from being dropped again.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3472.4 KB 3512.7 KB
Main entry chunk (gzip) 143.9 KB 350 KB
Entry file index-BqSg3AyZ.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) 498.55KB 114.03KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 10.12KB 3.28KB
data-objectstack (index.js) 189.15KB 52.56KB
fields (index.js) 243.15KB 61.40KB
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) 6.57KB 2.76KB
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) 49.00KB 13.91KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.49KB 46.33KB
plugin-dashboard (index.js) 131.48KB 34.45KB
plugin-designer (index.js) 213.21KB 43.63KB
plugin-detail (index.js) 248.66KB 63.92KB
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.58KB 56.63KB
plugin-kanban (index.js) 55.38KB 15.72KB
plugin-list (index.js) 113.38KB 27.73KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.33KB 3.25KB
plugin-view (index.js) 84.46KB 20.80KB
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) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
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) 13.64KB 4.59KB
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.93KB 1.49KB
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

@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

ACCEPT — domain:devx @ objectui execution seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr, R46, reviewed 2026-09-07T16:30Z against GitHub and the tree, ⛔ never against the report's narrative.

The shape choice was decided by a measurement about the INSTRUMENT, and the mechanism checks out

The card left the choice open and triage declined to make it; the dev made it and gave a reason that has nothing to do with the scaffolded repo — where both shapes work, because vitest ^4.1.10 is a declared devDependency of the emitted manifest (verified on origin/main: DEV_DEPENDENCIES at templates.ts:86-96 carries it). The brief's precondition therefore did not decide it, exactly as the dev reports.

What decided it is what each shape does to the census that found the bug. ⚠️ This seat set out to falsify that claim and could not. The first read looks damning: packages/create-plugin/package.json itself declares vitest in devDependencies, so "no package declares it" would be false. But that is not what the bound consults. resolvesOnlyThroughRootManifest (check-doc-snippet-types.mjs:1366) is:

if (specifier in paths) return false;
const bare = specifierRoot(specifier);
if (bare in paths) return false;
return rootDeclared.has(bare);

paths is the TypeScript path map of workspace packages with built entry points, not any package's dependency manifest. vitest is third-party, so it is in no paths entry; the root manifest declares it (package.json:161). ⇒ an emitted import … from 'vitest/config' is bounded and the whole template is refused. The dev's wording — "declared by the root manifest and mapped by no package the census maps" — is precise, and the distinction between declared and mapped is load-bearing. ⭐ It is also a trap for the next reader, who will see create-plugin's own vitest devDependency and conclude the bound cannot fire. Worth knowing that this is exactly the confusion #8397 was filed about.

The triple-slash escapes the bound for a different and equally mechanical reason: moduleSpecifiersOf walks import/export declarations from the AST, and a /// <reference /> is not one — so it is never collected, never bounded, and the template stays compiled. That is why the measured outcome is Judged 12 … 7 refused, 1 remain rather than the import shape's Judged 11 … 8 refused, 0 remain. ⭐ A zero bought by no longer compiling the file is the one number this census exists to prevent, and it would also have swallowed the TS2307 the card explicitly asked to keep visible. Accepting the shape that reports one remaining diagnostic over the shape that reports none is the right call and the reasoning survives independent checking.

The three standing rulings all held

Verified in the diff, which is +108/-1 across three files and touches nothing else: the test: block is unchanged and still emitted (⇒ PR #8042's ruling on #7524 is not reversed); import { defineConfig } from 'vite' is unchanged; the vite-plugin-dts TS2307 is untouched and is now documented in the docblock as the instrument artefact it is; buildTsconfig()'s extends path is not touched and no card was filed for it, as triage directed. The single emitted change is one prepended line.

The pin has the control the lane keeps asking for

typesTheTestBlock() states the invariant ("the block is typed") and accepts both shapes, so it does not smuggle the shape decision into the predicate; the shape decision is pinned separately, with the measured numbers in the comment, so reversing it costs a reading of the measurement. And the vacuity hole is closed explicitly: the predicate passes over a config with no test: block, so the second test reconstructs the pre-fix shape (block present, declaration stripped) and asserts the predicate says false. ⭐ That is the same shape as #8383's non-vacuity leg landed an hour ago — a negative-capable assertion that proves it can still say no.

The ablation is reported by state rather than by exit code (HEAD blob 1cef5f078 → mutated aaa5efa66, proven on disk before any result was read, restored and git diff HEAD empty), and both predicted legs turned red: the pin failed, and the census went back to 2 remain with the TS2769.

Two declared items, both answered

The attribution conflict. This dev resolved it the opposite way from #8141's dev — dropping the model identifier to honour the dispatch fence, where the other kept the mandated trailer. ⛔ Neither is wrong and no follow-up is owed either way: this shift has measured three landings (f20e57d62, dc75260a2, 59cca05b0) where the squash path normalises the trailer to a plain Co-authored-by: Claude with no model identifier, so nothing carrying one reaches main regardless. The amend was pre-push, so the never-amend-a-pushed-commit rule is untouched.

The self-merge clause. The dev is right that this PR is not governed surface (check-governed-queue-guard --test ⇒ NOT GOVERNED, 3 paths) and right to leave it draft anyway. ⭐ Under PM dispatch the seat's read of CI is the gate, and a dev merging its own PR would bypass the review that is the point of the loop. Flagging it rather than acting on it was correct.

Out-of-scope finding

#8397 — the census's root bound refuses 3 of create-plugin's 8 recognised templates, and misjudges a 4th, for specifiers the same generator's emitted package.json declares; the census never reads the manifest the generator writes. Correctly filed rather than fixed: it is the general form of the artefact the card told the dev to leave alone, and it is what made the vitest/config shape look falsely clean. Filed finding only, unassigned, no pm:queue, no priority — ⛔ the grade is the triage seat's.

A changeset is owed and present (@object-ui/create-plugin, patch): the diff changes published src of a released package.

Next: CI convergence → flip ready → post-flip guard → auto-merge SQUASH → queue confirmation → landing probe (the emitted template's first line is /// <reference types="vitest/config" /> and the test: block plus from 'vite' are both still there on re-fetched origin/main; control: the vite-plugin-dts import is still emitted, so the TS2307 artefact is still visible rather than silently removed) → LANDED here and on #8139, which closes via Fixes.


Generated by Claude Code

@baozhoutao
baozhoutao marked this pull request as ready for review September 7, 2026 16:37
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 7, 2026
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Armed: PR #8398 flipped ready at 2026-09-07T16:37:36Z on head 0e49b95d8 after CI converged all green (31 checks, Live E2E excluded, read 16:37:06Z); post-flip Governed Surface Queue Guard completed/success at 16:37:55Z; auto-merge SQUASH enabled; queued (added_to_merge_queue at 16:38:08Z, read 16:38:13Z).

Landing probe on merge, on re-fetched origin/main: buildViteConfig()'s emitted template opens with /// <reference types="vitest/config" />, with import { defineConfig } from 'vite'; and the test: { block both still present and unchanged. Control: the import dts from 'vite-plugin-dts' line is still emitted — the TS2307 it draws is the instrument artefact the card asked to keep visible, so if it has disappeared, something was "tidied" that the ruling protected. Then LANDED here and on #8139, which closes via Fixes. — domain:devx @ objectui seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr.


Generated by Claude Code

Merged via the queue into main with commit e7e45d8 Sep 7, 2026
34 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-8139-scaffold-vite-config-typing branch September 7, 2026 16:54
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

LANDED — merged into main at 2026-09-07T16:54:29Z as e7e45d874 (squash), read 16:54:31Z. #8139 closed completed via Fixes.

Content probe on re-fetched origin/main (tip e7e45d874, read 2026-09-07T16:56Z) — the claims from the Armed note, plus the control:

  1. The emitted template's first line. templates.ts:267 — buildViteConfig() now returns a string opening with /// <reference types="vitest/config" />, followed at :268 by the unchanged import { defineConfig } from 'vite';.
  2. The block that had to survive. test: { is still at :297. ⇒ PR docs(create-plugin): record that in-repo scaffolding is already refused by named pins #8042's ruling on finding(create-plugin): the scaffolder emits a per-package vitest test block — the shape objectui#3240 just removed from this repo #7524 is not reversed, and the "make the types clean by deleting the block" answer was not taken.
  3. Control — the one that could only fail by someone tidying up. import dts from 'vite-plugin-dts'; is still emitted at :270. The TS2307 that line draws from the census is the instrument artefact the card explicitly asked to keep visible, so its disappearance would have meant a protected fact had been silently "fixed". It is there, and :219 now carries the docblock paragraph explaining why it stays.

⭐ Why that control is the right one for this PR specifically: the shape that was rejected — importing defineConfig from vitest/config — would have made the census stop compiling this template altogether, taking the TS2307 down with it and reporting a clean 0 remain. The two possible ways to lose that diagnostic were "delete the line" and "stop looking", and the probe checks the first while the chosen shape rules out the second. Both are now closed.


Generated by Claude Code

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

Projects

None yet

2 participants