Skip to content

chore(build): silence rolldown vite:dts plugin-timings warning#125

Merged
Luis85 merged 1 commit into
developfrom
chore/vite-dts-build-timing
Apr 26, 2026
Merged

chore(build): silence rolldown vite:dts plugin-timings warning#125
Luis85 merged 1 commit into
developfrom
chore/vite-dts-build-timing

Conversation

@Luis85
Copy link
Copy Markdown
Owner

@Luis85 Luis85 commented Apr 26, 2026

Summary

Every npm run build (locally during npm run verify and on every
CI run) prints:

[PLUGIN_TIMINGS] Warning: Your build spent significant time in
plugin `vite:dts`. See https://rolldown.rs/options/checks#plugintimings

This is rolldown's heuristic flagging plugins that dominate build
wall time. It is informational, not actionable — vite-plugin-dts
takes ~3.0s of a ~3.7s build (~80%) because it invokes the
TypeScript compiler to emit declarations, which is intrinsically the
slow part of the build.

Investigation

Checked every lever before resorting to suppression:

  • Pinned to vite-plugin-dts@4.5.4 (latest as of 2026-04-26)
  • tsconfig.build.json already excludes tests/, examples/,
    *.test.ts, *.spec.ts
  • skipLibCheck: true is already inherited from the base
    tsconfig.json
  • rollupTypes: false already keeps us off the slow bundle-types
    path
  • entryRoot: 'src' already matches the actual source root
  • staticImport: true already on

No remaining setting reduces vite-plugin-dts runtime. The warning
is rolldown describing reality.

Fix

Suppress the rolldown check via
build.rollupOptions.checks.pluginTimings: false. Inline comment in
vite.config.ts records the investigation so the rationale is
visible in-place — no future contributor will spend time chasing a
fix that doesn't exist.

Test plan

  • npm run verify — all green; build output now ends cleanly at
    ✓ built in 3.49s with no [PLUGIN_TIMINGS] warning
  • Build wall-time unchanged (warning suppression has zero
    perf cost — it just gates a stdout write)
  • No library behavior change; tooling-only diff. No changeset

@codex review

Every `npm run build` (including local pre-PR `npm run verify` and
every CI run) printed:

> [PLUGIN_TIMINGS] Warning: Your build spent significant time in
> plugin `vite:dts`. See https://rolldown.rs/options/checks#plugintimings

This is rolldown's heuristic flagging plugins that dominate build
wall time. It is informational only — `vite-plugin-dts` ran in
~3.0s of a ~3.7s build (~80% of total) because it invokes the
TypeScript compiler to emit declarations, which is intrinsically
slow.

Investigated whether the timing was actually reducible:

- Already pinned to `vite-plugin-dts@4.5.4` (latest as of
  2026-04-26).
- `tsconfig.build.json` already excludes tests / specs / examples.
- `skipLibCheck: true` is already inherited from the base
  `tsconfig.json`.
- `rollupTypes: false` already keeps us off the slow bundle-types
  path.
- `entryRoot: 'src'` already matches the actual source root.
- `staticImport: true` is already on.

There is no remaining lever. The plugin is genuinely the slowest
phase by design, and the warning is just rolldown describing that
fact. Suppress the check via `build.rollupOptions.checks.pluginTimings: false`
so the warning stops cluttering build output and misleading future
contributors into chasing a fix that doesn't exist. Inline comment
in `vite.config.ts` records the investigation so the rationale is
visible in-place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

@github-actions
Copy link
Copy Markdown

Coverage report

Metric This PR vs base Floor Status
statements 76.63% ➖ 0.00pp 74%
branches 66.96% ➖ 0.00pp 64%
functions 85.45% ➖ 0.00pp 83%
lines 78.24% ➖ 0.00pp 75%

Floors live in scripts/coverageThresholds.mjs (drift envelope 5pp). Re-baseline by editing that file when ⚠️ appears above; cite the new measured value + commit SHA.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions
Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/index.js (gzip) 37.87 KB (0%)
dist/integrations/excalibur/index.js (gzip) 1.4 KB (0%)
dist/cognition/adapters/mistreevous/index.js (gzip) 1.14 KB (0%)
dist/cognition/adapters/js-son/index.js (gzip) 1.36 KB (0%)
dist/cognition/adapters/tfjs/index.js (gzip) 8.74 KB (0%)

@Luis85 Luis85 merged commit cd06227 into develop Apr 26, 2026
23 checks passed
@Luis85 Luis85 deleted the chore/vite-dts-build-timing branch April 26, 2026 10:16
Luis85 added a commit that referenced this pull request Apr 26, 2026
## Summary

Doc-audit pass over `docs/plans` + `docs/specs`. Three things land
together:

- **`docs/archive/{plans,specs}/`** — new home for plans whose roadmap
  rows have all shipped (or whose goals were folded into a successor)
  and specs whose design is now reflected in code. Includes a
  `README.md` explaining the policy; `CLAUDE.md` documents the
  convention.
- **`git mv` 23 plans + 3 specs into the archive.** The active live
  set is now the comprehensive polish-and-harden plan plus three
  specs (post-tfjs improvements, mvp-demo, vision), each with a
  refreshed status banner.
- **Refresh the live comprehensive plan** against current `develop`:
  - PR column updated for rows 16/19/20/3/4/22 (now shipped via
    PRs #91 / #98 / #104 / #110 / #113 / #111).
  - New "Post-roadmap follow-ups" section covers PRs #92#125
    (review-bot infra, tracker findings, demo + tfjs hotfixes,
    tooling).
  - Stale prose-baked counts dropped (size budgets now reference
    `package.json#size-limit` only).
  - Coverage-thresholds section gains a pointer to the sticky PR
    comment shipped in PR #124.

## Other doc fixes

- `README.md`: drop the unverifiable "Phase A milestones (M0–M15) are
  all green" claim — the milestones don't exist as documented IDs
  anywhere; replace with a pointer to the live polish plan.
- `vision.md`: refresh cadence note (was pinned to 2026-04-19 + "next
  review at 1.0").
- `2026-04-24-post-tfjs-improvements.md`: mark recommended-order items
  that have shipped (PRs #61, #76, #77, #83, #84, #91, #94, #96,
  #104, #113), link the active roadmap as the heir.
- `mvp-demo.md`: status banner explaining where active polish work is
  now tracked.

## Mechanical

- Update inline cross-refs in `CLAUDE.md`, `eslint.config.js`,
  `src/agent/{Agent,AgentModule}.ts`, `tests/unit/exports.test.ts`,
  and `docs/daily-reviews/2026-04-25.md` to point at the new
  `docs/archive/` paths so links keep resolving.

No code change beyond comment-path updates.

## Test plan

- [x] `npm run verify` green (`format:check` + `lint` + `typecheck` +
  `test` + `build` + `docs`). 523 tests pass; the 2 lint warnings
  are pre-existing (`CognitionPipeline.invokeSkillAction` complexity
  + `scoreFailure` param count) and on the ratchet menu.
- [x] `git ls-files docs/archive/` shows the moved files; renames are
  preserved (`git log --follow` works for any moved file).
- [ ] Codex review: clean, no blockers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Luis Mendez <hallo@luis-mendez.de>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants