Skip to content

chore(deps): land the Dependabot backlog and migrate to Vitest 5 - #446

Merged
mohanagy merged 2 commits into
developmentfrom
chore/dependabot-batch
Sep 11, 2026
Merged

mohanagy merged 2 commits into
developmentfrom
chore/dependabot-batch

Conversation

@mohanagy

@mohanagy mohanagy commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Supersedes #445, #438, #437, #436, #435. None of them could go green on their own.

Why each was stuck

PR Cause
#438, #436 Dependabot split the vitest pair across two PRs, so each broke the other's peer requirement: peer vitest@"3.2.7" from @vitest/coverage-v8@3.2.7 vs Found: vitest@5.0.0. Neither can ever pass alone.
#445, #435 Both bump packages pinned by the security-override contract tests (@hono/node-server 2.0.10, esbuild 0.28.1). Dependabot changes the dependency but cannot update the assertions, so any pinned package yields a permanently-red PR.
#437 Real source breakage from @types/node 26, not a version nudge.

What landed

  • Vitest 3.2.7 → 5.0.0 with @vitest/coverage-v8, plus vite as an explicit devDependency — Vitest 5 declares vite as a non-optional peer (^6.4.0 || ^7.0.0 || ^8.0.0) and fails at startup without it (Cannot find package 'vite').
  • @types/node 22 → 26, @hono/node-server 2.0.10 → 2.1.1, esbuild 0.28.1 → 0.28.2, eslint 10.8.0 → 10.10.0, typescript-eslint 8.65.0 → 8.70.0.
  • Security-pin contract assertions updated to match, with the deliberately-stale fixtures (0.27.0, 1.19.9) left intact.

Both the production-only and full npm audits now report zero. The Vitest 5 upgrade clears the last two known advisories (vitest, @vitest/mocker), which were fixed in ≥ 4.1.11 — the gap called out in the v1.1.4 release.

The @types/node fix

@types/node 26 added a throwIfNoEntry overload to stat(), making the last overload Promise<Stats | BigIntStats | undefined>. ReturnType resolves to the last overload, and keyof (X | undefined) is never, so every Pick<Awaited<ReturnType<typeof stat>>, …> failed with does not satisfy the constraint 'never'.

Replaced that idiom with the concrete Stats type in the three files using it (26 occurrences). No call site passes bigint: true — the files that do already import BigIntStats explicitly — so the narrowing is exact, and the result no longer depends on upstream overload ordering.

Dead overrides removed

Vitest 5 dropped the test-exclude/glob chain entirely (0 lock entries), and vite is now direct rather than nested under vitest, so both nested override paths matched nothing. Removing them keeps the audit at zero; postcss resolves to 8.5.28, above the 8.5.23 the dead override targeted.

test.poolOptions was removed in Vitest 4 and its contents promoted to top-level options. isolate: true expresses exactly what the former singleFork: false, isolate: true did — a fresh worker per test file.

Held back deliberately: zod

#445 also bumps zod 4.2.0 → 4.6.2. Not taken, because the evidence-pinned bundled test fixture embeds zod: bumping it makes check:test-fixture demand a rebuild, which changes the sha256 that tests/named-host-evidence.test.ts pins as reviewed compatibility evidence for the published package. Updating that hash would assert the new fixture was used in a recorded run that never happened.

zod carries no advisory, so holding it costs nothing. The declared ^4.2.0 range is unchanged — only the lockfile is held — so library consumers are unaffected. Unblocking it requires re-collecting the named-host evidence against real hosts.

esbuild was initially suspected of the same conflict and reverted; isolating the variable showed 0.28.2 produces byte-identical fixture output, so it is included.

Verification

npm run typecheck, npm run lint, npm run build, npm run check:test-fixture, and npm run check:pack ("Package contract verified (58 files)") are all clean. Full suite: 1998+/2033 passing, 162/162 files.

Residual single-test failures across runs are pre-existing local flakes, not regressions: a different test fails each run, two isolated runs of identical code disagreed, and each failure is a timeout at the local 5s testTimeout (CI allows 10s). The only source files touched outside tests take type-only edits, which are erased at compile time.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Maintenance

    • Updated development and runtime packages, including patched versions for improved compatibility and security.
    • Added Vite as a direct development tool and simplified related package configuration.
  • Testing

    • Updated release and migration checks to match current package versions and configuration.
    • Improved test isolation so each test file runs in a fresh worker, helping reduce cross-test interference.
  • Code Quality

    • Clarified filesystem metadata typing without changing application behavior.

Supersedes the five open Dependabot PRs, which could not go green on their
own. #438 and #436 were split across two PRs, so each broke the other's peer
requirement (coverage-v8@3.2.7 requires vitest@3.2.7); moving them together
resolves it. #445 and #435 bumped packages pinned by the security-override
contract tests, which Dependabot cannot update. #437 needed real source work.

Vitest 3.2.7 -> 5.0.0 with @vitest/coverage-v8, adding vite as an explicit
devDependency: Vitest 5 declares vite as a non-optional peer. This also clears
the last two known advisories, so both the production-only and full npm audits
now report zero. Two override blocks became dead and were removed: Vitest 5
dropped the test-exclude/glob chain, and vite is now direct rather than nested
under vitest. `test.poolOptions` was removed in Vitest 4 and its contents
promoted to top-level options; `isolate: true` expresses what the former
`singleFork: false` did.

@types/node 22 -> 26 added a throwIfNoEntry overload to stat(), so
`Awaited<ReturnType<typeof stat>>` now resolves to `Stats | BigIntStats |
undefined` and `keyof` of that union is `never`, breaking every `Pick<...>`
over it. Replaced that idiom with the concrete `Stats` type in the three files
that used it; no call site passes `bigint: true`, so the narrowing is exact.

Held back deliberately:

- zod 4.2.0 -> 4.6.2 (from #445). The evidence-pinned bundled test fixture
  embeds zod, so bumping it makes `check:test-fixture` demand a rebuild, which
  changes the sha256 that the named-host evidence ledger pins as reviewed
  compatibility evidence. zod carries no advisory, so holding it costs nothing.
  The declared `^4.2.0` range is unchanged; only the lock is held, so library
  consumers are unaffected. Unblocking this requires re-collecting the
  named-host evidence.

Refs #435, #436, #437, #438, #445

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Warning

Review limit reached

  • Run on-demand review

On-demand reviews are free for the next 29 days. After that, they cost $0.25 per reviewed file.

Or wait 37 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 108 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 72882529-2920-41b0-9b4e-512c0cb08691

📥 Commits

Reviewing files that changed from the base of the PR and between cc2ec33 and f0ad00e.

📒 Files selected for processing (1)
  • vitest.config.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: f34e655c-f7ef-4f74-9ee1-f63c4ef11c9e

📥 Commits

Reviewing files that changed from the base of the PR and between 5bd7510 and cc2ec33.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • package.json
  • src/cli/doctor-report.ts
  • src/isolation/profile-runtime-isolation.ts
  • src/oauth/profile-rename-transaction.ts
  • tests/mcp-v2-migration-contract.test.ts
  • tests/package-contract.test.ts
  • tests/release-config.test.ts
  • vitest.config.ts

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The pull request updates dependency versions and package contract tests, migrates Vitest isolation settings, and replaces inferred filesystem metadata types with explicit Stats annotations.

Changes

Dependency and Type Updates

Layer / File(s) Summary
Dependency manifest and package contracts
package.json, tests/mcp-v2-migration-contract.test.ts, tests/package-contract.test.ts
Patched esbuild and @hono/node-server versions. Added Vite and updated package override and lock-entry assertions.
Vitest isolation configuration
vitest.config.ts, tests/release-config.test.ts
Moved Vitest isolation to the top-level isolate option. Updated release configuration assertions for dependency overrides and lockfile contents.
Filesystem metadata type annotations
src/cli/doctor-report.ts, src/isolation/profile-runtime-isolation.ts, src/oauth/profile-rename-transaction.ts
Replaced inferred filesystem metadata types with explicit Stats annotations. Runtime behavior remains unchanged.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to cc2ec

The dependency and configuration updates are consistent with their updated contracts, and the filesystem changes are type-only.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Docstring Coverage ❌ Error Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 7 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the dependency consolidation and Vitest 5 migration, which are the main changes in the pull request.
Description check ✅ Passed The description provides a detailed summary, explains dependency and source changes, documents intentional exclusions, and lists validation results. It does not use the template headings or explicitly…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 7 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/dependabot-batch

A rabbit checks the package tree
Fresh Vite leaves hop happily
Vitest workers stand apart
Stats types guard each filesystem part
Patched contracts finish the chart

Comment @coderabbitai help to get the list of available commands.

Vitest 5 applies AST-aware remapping unconditionally, attributing functions
and branches differently from Vitest 3. With identical tests and unchanged
source, the measured figures moved in both directions — upstream-process-manager
functions 100 -> 89.84 and redact branches 94.69 -> 87.17, but
secret-provider-availability branches 81.57 -> 84.21 and secret-resolver
functions 86.66 -> 89.47 — so this is a measurement change, not a coverage
regression. Confirmed by running coverage on development (Vitest 3), where the
same tests meet every threshold.

Vitest 5 removed the experimental opt-out, so the previous measurement cannot
be restored. Recalibrated the seven breached function and branch thresholds to
measured actuals with a small margin, preserving the ratchet going forward.
Line thresholds were unaffected and are unchanged.

Refs #435, #436, #437, #438, #445

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mohanagy

Copy link
Copy Markdown
Owner Author

Coverage thresholds recalibrated (f0ad00e)

Linux quality failed on coverage thresholds, not on tests — all 162 test files passed. Verified this is a measurement change, not a coverage regression:

I ran vitest run --coverage on development (Vitest 3) and on this branch (Vitest 5) with identical tests and unchanged source. The figures moved in both directions:

file fn v3 fn v5 br v3 br v5
upstream/upstream-process-manager.ts 100 89.84 91.22 86.53
secrets/secret-process-runner.ts 95.45 84.21 85.10 76.84
secrets/redact.ts 100 100 94.69 87.17
mcp/server/tool-registry.ts 100 100 94.54 89.61
secrets/secret-resolver.ts 86.66 89.47 91.13 81.13
secrets/secret-provider-availability.ts 100 100 81.57 84.21
mcp/server/resource-prompt-registry.ts 98.30 98.73 91.20 87.50

Vitest 5 applies AST-aware remapping unconditionally, attributing functions and branches differently. Numbers rising in some files confirms re-attribution rather than lost coverage. On development the same tests meet every threshold.

Vitest 5 removed the experimental opt-out, so the previous measurement cannot be restored. I recalibrated the seven breached function/branch thresholds to measured actuals with ~1 point of margin, preserving the ratchet. Line thresholds were unaffected and are unchanged.

Worth a reviewer's eye: this does lower some enforced figures (upstream-process-manager functions 95 → 89, src/secrets/** branches 90 → 86). The underlying tests did not change, but if you want the old numbers back under the new measurement, that needs new tests rather than a threshold edit.

@mohanagy
mohanagy merged commit 752379d into development Sep 11, 2026
12 checks passed
@mohanagy
mohanagy deleted the chore/dependabot-batch branch September 11, 2026 04:31
mohanagy added a commit that referenced this pull request Sep 11, 2026
Finalize the compatible v1.1.5 patch release. The only change that reaches installers is the @hono/node-server runtime dependency, refreshed from 2.0.10 to 2.1.1. Neither version carries a security advisory, so this is a dependency refresh rather than a security release; no runtime behavior or public API changed.

Also records the [Unreleased] changelog entry for #446, which merged without one. That work is development tooling and is not published, though it does clear the two development-only advisories v1.1.4 explicitly did not claim.

Refs #447

Co-Authored-By: Claude Opus 5 (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.

1 participant