← Back to Pull requests

[vite-plugin v1 backport] Update November 27 runtime and asset compatibility #17171

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Nov 25, 2026 13:12 UTC
Author

Consume the published November 27 runtime fixes in Vite plugin v1, including safe asset-directory traversal in preview, EmailMessage byte streams, RealtimeKit bindings, OIDC configuration, and FedRAMP High aliases. This backport consumes the published graph from #17232; no additional upgrade PR is needed.

Exact pins: Miniflare 5.20261127.1-beta, Wrangler 4.169.1 (peer minimum ^4.169.1), workers-utils 0.59.0, workers-auth 0.19.1, deploy-helpers 0.32.0, cli-shared-helpers 0.4.0, containers-shared 0.28.1, and Workers types 5.20261127.1. The plugin and current-release retained consumers advance together. The regenerated pnpm lockfile contains actual published resolutions, and frozen installation passes. Retained private packages keep their workspace:* references and existing implementations.

Original intent and useful v1 changes:

  • #17140, #17160, #17220, and release #17152: the latest runtime supplies the intervening upgrades together. Copy the retained email proxy patch and four regressions directly; actual Vite requests exercise string/stream Unicode email. The zero-config compatibility date expects November 27.

  • #17161 and #17168: exact public pins supply the RealtimeKit adapter and native discriminator fix. V1 has no cloudflare.config.ts converter to patch. Keep the original missing-session regression through Vite; retained-proxy integration also checks successful createMeeting/addParticipant capabilities through the real released Miniflare RPC encoder without Cloudflare credentials.

  • #17075: consume Worker D1 upload database_id metadata through deploy-helpers, including retained remote-bindings preview uploads, preserving the original Pages compatibility.

  • #17088: consume OIDC audience validation and build-output preservation through public pins. Vite build regressions check audiences, optional RS256, and whitespace rejection. Signing remains unsupported locally upstream.

  • #17182: consume stable Artifacts Git-port reservation through Miniflare. Existing Vite Artifacts integration tests cover its consumer.

  • #17203: consume both FedRAMP High spellings and corrected OAuth guidance. The coupled containers-shared upgrade removes its old nested utils parser, which rejected managed images before credential setup. Adapt its helper API by removing unused configFileName and renaming disableContainersHint to dockerUnavailableHint, preserving the exact Vite guidance and registry command. Actual plugin regressions exercise managed-image lookup and credentials with both spellings.

  • #17164: consume the original Miniflare walker through the published pin. Copy the retained workers-shared createAssetsCopyFilter source and private tests directly, preserving v1's readAssetsIgnoreFile export. Actual Vite preview tests check directory aliases, URL exclusions, ignored-directory traversal, and ancestor cycles. The unreadable ignored-directory case verifies startup without traversing the excluded directory; it requires EACCES before preview starts, restores permissions in try/finally before fixture cleanup, and skips Windows/root runs. V1 dev serves assets through Vite, so the runtime regression uses preview after a real build. Public sibling source, scaffolding, helpers, fixtures, and unit tests are not restored.

  • #17234: copy fallback-pattern support into existing retained workers-shared. Adapt absent/empty/explicit .assetsignore coverage to that private helper. No absent public writeAssets/onSkip API is recreated. Private-only changes need no separate plugin changeset; preview's user-facing improvement has its own patch changeset.
  • This is the only open maintenance backport and directly targets vite-plugin-v1. Superseded #17170 remains deliberately closed after upstream #17223 reverted lazy login (#17045/#17176). Those commits are excluded.

    Independent maintainer guidance remains pending for #17142's absent publishing implementation and #17205's .env restart fix, which would require a different source-aware loader in v1. Those changes are not implemented or claimed here. V1 retains Wrangler profile/configured-account precedence.

    Validation on November 29 with Node 22.22.1 and pnpm 10.33.0, using the published graph (November 30 repair validation below):

  • Real installation, regenerated lockfile, and subsequent frozen installation pass.

  • Build passes all 3 tasks; built-entry-point checks pass. Full pnpm check passes all 58 tasks, including types, lint, formatting, changesets, and package validation.

  • Full pnpm test:ci passes all 8 tasks, including all 287 plugin tests and retained email/RealtimeKit wire coverage.

  • Retained fixtures pass all 6 tasks: 30 dev-registry cases, 5 test-harness cases, and 2 Playwright cases.

  • Rebuild/install the prior published graph (Miniflare 5.20261127.0-beta / Wrangler 4.169.0): the alias/URL-exclusion control passes, ignored-directory traversal fails with EACCES, and the ancestor-cycle regression fails with ELOOP. Restore/install/rebuild the final published graph: all three real Vite preview cases pass.

  • An initial package run hit a Container module-runner restart failure while workspace checks were building; an initial fixture run overlapped dependency comparisons and timed out starting a queue fixture. Both complete suites pass when rerun with the final graph held stable. No product workaround was introduced.

  • Credentialed E2E tests and the full Vite 6/7/8 playground matrix were not run locally; GitHub CI supplies the wider matrix. Human approval on this backport remains required.
  • Earlier direct regressions remain recorded: private asset-copy tests fail twice before #17164 and pass afterward; fallback behavior fails before #17234 and all 17 helper tests pass afterward; managed-image fedramp-high rejects before the coupled parser upgrade and passes afterward. Real-wire email integration also passes on the old proxy, so it is an integration control; the directly copied four-case unit regression establishes the reconstruction fix.

    November 30 CI repair:

  • Remove the unpublished November 29 upgrade: its manifests could not be installed or matched to a real lockfile, so every CI job failed during frozen installation. The final diff uses published Miniflare 5.20261127.1-beta / Wrangler 4.169.1 and matching actual lockfile resolutions.

  • Preserve the review fixes: permission-test cleanup and privilege guard, corrected November 27 release notes, and the standalone E2E fixture pin aligned with the plugin.

  • #17284 is pending publication of #17276 and is excluded from this PR. It is not claimed as covered; resume it after the required public packages are actually on npm.

  • Frozen installation, build (3 tasks), full workspace checks (58 tasks), and all 8 package/support test tasks pass on the restored published graph. Retained fixtures also pass all 6 tasks (30 dev-registry cases, 5 harness cases and 2 Playwright cases). The GitHub matrix verifies all supported platforms.
  • ---

  • Tests

  • - [x] Tests included/updated
    - [ ] Automated tests not possible - manual testing has been completed as follows:
    - [ ] Additional testing not necessary because:
  • Public documentation

  • - [ ] Cloudflare docs PR(s):
    - [x] Documentation not necessary because: This consumes upstream runtime features and fixes; plugin changesets document user-facing behavior.

    [!NOTE]

    This is a contribution from an AI agent: OpenAI Codex.

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: NuroDev Review duration: 8337m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #17171"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 27.7% · Safe to merge
    27.7%