Skip to content

chore(deps): upgrade Vite+ toolchain to 0.2.9 - #52

Merged
zeldrisho merged 5 commits into
mainfrom
chore/vite-plus-toolchain-upgrade
Aug 12, 2026
Merged

chore(deps): upgrade Vite+ toolchain to 0.2.9#52
zeldrisho merged 5 commits into
mainfrom
chore/vite-plus-toolchain-upgrade

Conversation

@zeldrisho

@zeldrisho zeldrisho commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Three commits:

  1. fix(web-fetch) — fall back across validated addresses before timing out. DNS with verbatim: true often lists AAAA records first, so web_fetch pinned requests to unreachable IPv6 addresses and hung until the 20s timeout even when IPv4 worked. validateRemoteUrl now returns validated addresses IPv4-first, and requestPinned tries each in order with a 4s per-address connect deadline while preserving DNS-to-address pinning.
  2. chore(pi) — remove the local .pi/settings.json package override.
  3. chore(deps) — upgrade the Vite+ toolchain from 0.2.5 to 0.2.9 via vp migrate, aligning the local vite-plus with the vp CLI. Pulls in Vite 8.2.1, rolldown 1.2.3 (bundled), oxlint 1.77.0, oxfmt 0.62.0, oxlint-tsgolint 7.0.2001, and lightningcss 1.33.0. Adds vite/vitest devDependencies to the root and each package so the bundled tools resolve through the workspace catalog.

Files changed

  • .pi/settings.json (removed)
  • package.json, packages/*/package.json (vite/vitest devDeps)
  • pnpm-lock.yaml, pnpm-workspace.yaml (catalog + minimumReleaseAgeExclude bumps)
  • packages/pi-web-fetch/src/network-policy.ts, src/network-transport.ts, tests/*

Verification

  • vp check — format + lint + type-check pass
  • vp run validate — full suite passes (coverage tests, repository contract tests, tarball dry-runs, packaged-extension smoke tests for all 7 packages)
  • vp dev boots; hooks dispatcher active (vp staged pre-commit)

Summary by CodeRabbit

  • Bug Fixes

    • Improved web requests by trying multiple resolved addresses in order, prioritizing IPv4 where available.
    • Added per-attempt connection timeouts so failed or unresponsive addresses can fall back to the next available address.
    • Improved cancellation handling for interrupted requests.
  • Tests

    • Added coverage for address ordering, connection fallback, timeouts, and cancellation.
  • Chores

    • Updated development tooling and workspace configuration.

DNS with verbatim: true often lists AAAA records first, so web_fetch pinned
the request to an unreachable IPv6 address (for example a CloudFront or
Global Accelerator edge behind a broken IPv6 route) and hung until the
20-second request timeout, even though the same host's IPv4 address
responds in about a second.

- validateRemoteUrl now returns every validated address ordered IPv4-first
  while preserving the resolver's within-family order, matching the default
  Happy Eyeballs preference used by curl and Node.
- requestPinned now tries each validated address in order with a per-address
  connect deadline (4s), moving to the next address when a connection is
  refused or hangs, while still aborting immediately on caller cancellation
  or the overall request timeout. DNS-to-address pinning is preserved: only
  addresses resolved and validated by the network policy are contacted.
Align the local vite-plus version with the vp CLI (v0.2.9) via
vp migrate. This pulls in Vite 8.2.1, rolldown 1.2.3 (bundled),
oxlint 1.77.0, oxfmt 0.62.0, and oxlint-tsgolint 7.0.2001, and
adds vite/vitest devDependencies to the root and each package so
the bundled tools resolve through the workspace catalog.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f9fb7c8-7dc1-4d82-b7f4-cbe12905900d

📥 Commits

Reviewing files that changed from the base of the PR and between 9921cf3 and 2f62c95.

📒 Files selected for processing (3)
  • packages/pi-web-fetch/src/network-policy.ts
  • packages/pi-web-fetch/src/network-transport.ts
  • packages/pi-web-fetch/tests/transport.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/pi-web-fetch/src/network-policy.ts
  • packages/pi-web-fetch/src/network-transport.ts

📝 Walkthrough

Walkthrough

The change removes .pi/settings.json, adds Vite and Vitest workspace configuration, and updates pi-web-fetch to order resolved addresses, enforce per-address timeouts, and retry connection failures sequentially.

Changes

Web fetch and workspace tooling

Layer / File(s) Summary
Workspace tooling configuration
package.json, pnpm-workspace.yaml, packages/pi-*/package.json
Adds Vite development dependencies and updates Vite Plus catalog entries and release-age exclusions.
Ordered validated addresses
packages/pi-web-fetch/src/network-policy.ts, packages/pi-web-fetch/tests/network-policy.test.ts, packages/pi-web-fetch/tests/harness.ts
ValidatedTarget now includes ordered resolved addresses. preferIpv4First places IPv4 addresses first while preserving family order. Tests cover the new result and ordering.
Per-address transport fallback
packages/pi-web-fetch/src/network-transport.ts, packages/pi-web-fetch/tests/transport.test.ts
Pinned requests now apply per-address timeouts, force lookup to each validated address, clean up abort state, and retry refused or hanging addresses. Tests cover both fallback paths and caller cancellation.

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

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant validateRemoteUrl
  participant requestPinned
  participant RemoteEndpoint

  Client->>validateRemoteUrl: validate remote URL
  validateRemoteUrl-->>Client: ordered ValidatedTarget
  Client->>requestPinned: request with validated addresses
  requestPinned->>RemoteEndpoint: attempt first address
  RemoteEndpoint-->>requestPinned: refusal or timeout
  requestPinned->>RemoteEndpoint: attempt next address
  RemoteEndpoint-->>requestPinned: response
  requestPinned-->>Client: return response
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: upgrading the Vite+ toolchain from version 0.2.5 to 0.2.9.
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.
✨ 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/vite-plus-toolchain-upgrade

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/pi-web-fetch/src/network-transport.ts`:
- Around line 46-49: Update the abort setup around the signal listener and
request flow to check signal.aborted immediately after registering forwardAbort;
abort the internal controller before request() when the caller signal is already
aborted, while preserving the existing listener behavior for future aborts.

In `@packages/pi-web-fetch/tests/transport.test.ts`:
- Around line 47-61: Update the test around requestPinned to replace the
unreliable 192.0.2.1 first address with a deterministic local hanging endpoint:
start a server that accepts the connection without sending response headers, use
its address as the first candidate, and retain 127.0.0.1 as the fallback. Keep
the attemptTimeoutMs and elapsed-time assertion, and ensure the test closes the
hanging server during cleanup.
🪄 Autofix

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 48e9aad4-a4c3-4cf7-ae05-a689027abdff

📥 Commits

Reviewing files that changed from the base of the PR and between a136e40 and 9921cf3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .pi/settings.json
  • package.json
  • packages/pi-cloudflare/package.json
  • packages/pi-file-remove/package.json
  • packages/pi-file-search/package.json
  • packages/pi-nested-agent-md/package.json
  • packages/pi-vite-plus/package.json
  • packages/pi-web-fetch/package.json
  • packages/pi-web-fetch/src/network-policy.ts
  • packages/pi-web-fetch/src/network-transport.ts
  • packages/pi-web-fetch/tests/harness.ts
  • packages/pi-web-fetch/tests/network-policy.test.ts
  • packages/pi-web-fetch/tests/transport.test.ts
  • packages/pi-web-search/package.json
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (1)
  • .pi/settings.json

Comment thread packages/pi-web-fetch/src/network-transport.ts Outdated
Comment thread packages/pi-web-fetch/tests/transport.test.ts Outdated
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

Docstrings generation - SUCCESS
Generated docstrings and committed to branch chore/vite-plus-toolchain-upgrade (commit: 469175b273e1744e704c0fbcde695f49ffeed8fa)

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

⚠️ Branch updated during autofix.

The branch was updated while autofix was in progress. Please try again.

coderabbitai Bot and others added 2 commits August 12, 2026 07:13
Docstrings generation was requested by @zeldrisho.

The following files were modified:

* `packages/pi-web-fetch/src/network-policy.ts`
* `packages/pi-web-fetch/src/network-transport.ts`

These files were kept as they were:
* `packages/pi-web-fetch/tests/harness.ts`

These files were ignored:
* `packages/pi-web-fetch/tests/network-policy.test.ts`
* `packages/pi-web-fetch/tests/transport.test.ts`

These file types are not supported:
* `package.json`
* `packages/pi-cloudflare/package.json`
* `packages/pi-file-remove/package.json`
* `packages/pi-file-search/package.json`
* `packages/pi-nested-agent-md/package.json`
* `packages/pi-vite-plus/package.json`
* `packages/pi-web-fetch/package.json`
* `packages/pi-web-search/package.json`
* `pnpm-workspace.yaml`
…rted

requestOnce only forwarded future aborts, so a pre-aborted signal left the
internal controller active and the request could still connect. Abort the
internal controller immediately when signal.aborted is set.

Tests now use a deterministic local hanging endpoint instead of TEST-NET-1,
which could fail fast on some networks, and cover the pre-aborted signal.
@zeldrisho
zeldrisho merged commit 0ef3f59 into main Aug 12, 2026
5 checks passed
@zeldrisho
zeldrisho deleted the chore/vite-plus-toolchain-upgrade branch August 12, 2026 08:18
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