chore(deps): upgrade Vite+ toolchain to 0.2.9 - #52
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe change removes ChangesWeb fetch and workspace tooling
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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (15)
.pi/settings.jsonpackage.jsonpackages/pi-cloudflare/package.jsonpackages/pi-file-remove/package.jsonpackages/pi-file-search/package.jsonpackages/pi-nested-agent-md/package.jsonpackages/pi-vite-plus/package.jsonpackages/pi-web-fetch/package.jsonpackages/pi-web-fetch/src/network-policy.tspackages/pi-web-fetch/src/network-transport.tspackages/pi-web-fetch/tests/harness.tspackages/pi-web-fetch/tests/network-policy.test.tspackages/pi-web-fetch/tests/transport.test.tspackages/pi-web-search/package.jsonpnpm-workspace.yaml
💤 Files with no reviewable changes (1)
- .pi/settings.json
|
Note Docstrings generation - SUCCESS |
|
The branch was updated while autofix was in progress. Please try again. |
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.
Summary
Three commits:
fix(web-fetch)— fall back across validated addresses before timing out. DNS withverbatim: trueoften lists AAAA records first, soweb_fetchpinned requests to unreachable IPv6 addresses and hung until the 20s timeout even when IPv4 worked.validateRemoteUrlnow returns validated addresses IPv4-first, andrequestPinnedtries each in order with a 4s per-address connect deadline while preserving DNS-to-address pinning.chore(pi)— remove the local.pi/settings.jsonpackage override.chore(deps)— upgrade the Vite+ toolchain from 0.2.5 to 0.2.9 viavp migrate, aligning the localvite-pluswith thevpCLI. 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. Addsvite/vitestdevDependencies 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 passvp run validate— full suite passes (coverage tests, repository contract tests, tarball dry-runs, packaged-extension smoke tests for all 7 packages)vp devboots; hooks dispatcher active (vp stagedpre-commit)Summary by CodeRabbit
Bug Fixes
Tests
Chores