Skip to content

fix(vite): resolve cached Veryl imports inside and outside the root - #1596

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/veryl-cache-and-single-bit-members/handle-cached-veryl-imports-one-bit-aggregate--7613c2a3
Oct 20, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/veryl-cache-and-single-bit-members/handle-cached-veryl-imports-one-bit-aggregate--7613c2a3

Conversation

@tignear

@tignear tignear commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Vitest's persistent cache replays imports as Vite root-relative URLs or
/@fs/ URLs for sources outside the Vite root. Resolve both forms to their
canonical source, project and watch IDs so warm runs load generated
JavaScript instead of raw Veryl. Prefer the Vite-root candidate for cached
URLs outside the project's absolute namespace even if an unrelated host
path exists. A matching project prefix only preserves an absolute identity
when that file exists; otherwise try the Vite-root candidate too. Preserve
canonical absolute project IDs and explicit /@fs/
identities, virtual-module ownership and optional watch-file behavior.

Add real-file collision, prefix-shaped URL (including projectRoot=/) and
source/query resolution regressions. Run the
injected component fixture cold and warm in both internal and external
project layouts. Normalize the fixture's absolute test include path to
forward slashes so Vitest also discovers the test on Windows. Preserve the
canonical watch identity of absent optional configuration when replaying cached
root-relative URLs, including the Windows drive letter.

Validation:

  • External /@fs/ and colliding-host regressions reproduce before their fixes. Both prefix-shaped URL regressions also fail on the previous head.
  • Vite package tests: 132 passed; cold/warm fixtures pass in both layouts (8 assertions).
  • Dependency, source/client-build, build-watch and component-watch checks pass.
  • TypeScript build, plugin/playground type checks, plugin Biome and diff checks pass.
  • NAPI rebuilt from unmodified master Rust sources independently of the struct fix.

Windows fixture follow-up validation:

  • Rebuilt NAPI and JS packages; reran the Vite package tests and fixture end-to-end checks on Linux.
  • Explicit fixture-config TypeScript check and Biome formatting/lint output check pass.
  • Reproduced the internal warm-cache failure on Windows with Node 24.12.0, pnpm 12.13.0 and the Windows NAPI artifact from CI run 39440394247.
  • Windows: CI JS test command passes (422 runtime tests, 130 Vite tests with 2 existing platform skips, cold/warm internal/external fixtures and dependency/source/build/component watch checks).
  • Added absent-config watch-identity regression: fails before the fix and passes afterward on Linux and Windows.
  • Linux: Vite package tests (132 passed), fixture checks, playground typecheck and plugin Biome pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T20:32:46.085732Z 1630232 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 134292d54d

ℹ️ 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".

Comment thread packages/vite-plugin/src/index.ts Resolved
@tignear tignear changed the title fix: handle cached Veryl imports and one-bit aggregate members fix(vite): resolve cached Veryl imports inside and outside the root Oct 20, 2026
@tignear
tignear force-pushed the stack/tignear/fix/veryl-cache-and-single-bit-members/handle-cached-veryl-imports-one-bit-aggregate--7613c2a3 branch from 134292d to f383c07 Compare October 20, 2026 10:16
@tignear

tignear commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 134292d 2026-10-20 10:15 UTC
2 content 134292d → f383c07 Split independent fixes at reviewer request: retain only Vite cache resolution in #1596, move one-bit aggregate lowering to an independent master-based PR, and address /@fs/ cached external-project i… 2026-10-20 10:15 UTC
3 content f383c07 → 3befcd9 2026-10-20 10:35 UTC
4 content 3befcd9 → 22e7add 2026-10-20 10:50 UTC
5 content 22e7add → c0273d9 Fix Windows queue failure: normalize the fixture absolute test include path before passing it to Vitest. 2026-10-20 14:26 UTC
6 content c0273d9 → 1630232 Reproduced the remaining warm-cache failure on native Windows. Preserve absent optional configuration watch identities and validate the complete Windows CI JS test command. 2026-10-20 20:30 UTC

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f383c07ccc

ℹ️ 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".

Comment thread packages/vite-plugin/src/index.ts Resolved
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@tignear
tignear force-pushed the stack/tignear/fix/veryl-cache-and-single-bit-members/handle-cached-veryl-imports-one-bit-aggregate--7613c2a3 branch from f383c07 to 3befcd9 Compare October 20, 2026 10:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3befcd9a28

ℹ️ 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".

Comment thread packages/vite-plugin/src/index.ts Resolved
@tignear
tignear force-pushed the stack/tignear/fix/veryl-cache-and-single-bit-members/handle-cached-veryl-imports-one-bit-aggregate--7613c2a3 branch from 3befcd9 to 22e7add Compare October 20, 2026 10:50
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 20, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 20, 2026
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 57 minutes 7 seconds in the queue, including 23 minutes 29 seconds running CI.

Reason

The merge conditions cannot be satisfied due to failing checks

  • JS Test (Windows)

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 47 minutes 45 seconds in the queue, including 23 minutes 49 seconds running CI.

Reason

The merge conditions cannot be satisfied due to failing checks

  • JS Test (Windows)

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 20, 2026
Vitest's persistent cache replays imports as Vite root-relative URLs or
/@fs/ URLs for sources outside the Vite root. Resolve both forms to their
canonical source, project and watch IDs so warm runs load generated
JavaScript instead of raw Veryl. Prefer the Vite-root candidate for cached
URLs outside the project's absolute namespace even if an unrelated host
path exists. A matching project prefix only preserves an absolute identity
when that file exists; otherwise try the Vite-root candidate too. Preserve
canonical absolute project IDs and explicit /@fs/
identities, virtual-module ownership and optional watch-file behavior.

Add real-file collision, prefix-shaped URL (including projectRoot=/) and
source/query resolution regressions. Run the
injected component fixture cold and warm in both internal and external
project layouts. Normalize the fixture's absolute test include path to
forward slashes so Vitest also discovers the test on Windows. Preserve the
canonical watch identity of absent optional configuration when replaying cached
root-relative URLs, including the Windows drive letter.

Validation:
- External /@fs/ and colliding-host regressions reproduce before their fixes. Both prefix-shaped URL regressions also fail on the previous head.
- Vite package tests: 132 passed; cold/warm fixtures pass in both layouts (8 assertions).
- Dependency, source/client-build, build-watch and component-watch checks pass.
- TypeScript build, plugin/playground type checks, plugin Biome and diff checks pass.
- NAPI rebuilt from unmodified master Rust sources independently of the struct fix.

Windows fixture follow-up validation:
- Rebuilt NAPI and JS packages; reran the Vite package tests and fixture end-to-end checks on Linux.
- Explicit fixture-config TypeScript check and Biome formatting/lint output check pass.
- Reproduced the internal warm-cache failure on Windows with Node 24.12.0, pnpm 12.13.0 and the Windows NAPI artifact from CI run 39440394247.
- Windows: CI JS test command passes (422 runtime tests, 130 Vite tests with 2 existing platform skips, cold/warm internal/external fixtures and dependency/source/build/component watch checks).
- Added absent-config watch-identity regression: fails before the fix and passes afterward on Linux and Windows.
- Linux: Vite package tests (132 passed), fixture checks, playground typecheck and plugin Biome pass.

Change-Id: I7613c2a332df5a43a7aac5b09e73207f05bc269d
@tignear
tignear force-pushed the stack/tignear/fix/veryl-cache-and-single-bit-members/handle-cached-veryl-imports-one-bit-aggregate--7613c2a3 branch from c0273d9 to 1630232 Compare October 20, 2026 20:32
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@mergify mergify Bot added queued Mergify queue entry and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 20, 2026
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 29 minutes 43 seconds in the queue, including 28 minutes 7 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify
mergify Bot merged commit 9259d6d into master Oct 20, 2026
31 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/veryl-cache-and-single-bit-members/handle-cached-veryl-imports-one-bit-aggregate--7613c2a3 branch October 20, 2026 21:16
@mergify mergify Bot removed the queued Mergify queue entry label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant