Skip to content

test: run persisted profile WAL fixture on Node - #40715

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/fix-profile-fixture-node-runtime
Nov 10, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/fix-profile-fixture-node-runtime

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Run the persisted-profile database fixture with Node so the unit gate can read a closed SQLite WAL database on macOS.

Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

What Changed

Add tests/e2e/helpers/persisted-profile-state.unit.test.ts to the existing Node runtime admission list beside the other read-only WAL reopen fixtures. The suite directly imports profile-state-database, which the direct SQLite import scan does not currently classify.

Why

On main 92a08cdd1d3, the normal test command runs this suite in bun-shared and fails two assertions with ERR_SQLITE_ERROR: unable to open database file. The same three tests pass under Node, and a standalone create-WAL / close / read-only-reopen script reproduces the runtime difference with Bun 1.4.4 and Node 26.8.1 on macOS arm64. After this change the normal test command selects node-runtime and all three tests pass.

Linked Issue

Found while investigating the unit gate failures affecting #40456. This follows #40665's admission of the hook session-binding WAL fixture. The separate shared-worker setup URL invalidation fix already merged in #40688; this change addresses the independently reproduced database failures only.

Visual Proof

N/A — test runtime selection only.

Testing

  • Before: focused normal command — two database failures, one pass.
  • Node control: ORCA_BACKGROUND_LAUNCH=1 pnpm test:node tests/e2e/helpers/persisted-profile-state.unit.test.ts --maxWorkers=1 — 3 passed.
  • After: ORCA_BACKGROUND_LAUNCH=1 pnpm test tests/e2e/helpers/persisted-profile-state.unit.test.ts src/main/agent-hooks/server/testing/identity/server-hook-session-binding.test.ts config/scripts/test-runtime/environment/vitest-shared-worker-file-reset.test.mjs --maxWorkers=2 — 18 passed across 3 files.
  • Verbose normal fixture rerun confirms node-runtime, 3 passed.
  • pnpm check:changed — all 11 applicable checks passed; rerun immediately before push reused the unchanged passing result.
  • No new tests: existing WAL reopen assertions fail without this admission and pass with it.
  • macOS arm64 tested; Linux, Windows, and full hosted CI remain for review.

Risk

Level: Low. One existing test file runs on Node through the repository's established pool. No product runtime, saved data, remote host, mobile, or folder workspace behavior changes. Revert the admission entry to undo it.

Review

Draft for independent review. Exact-head required checks, CodeRabbit, and branch protections must pass before any merge.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied.

Checklist

  • Small focused change with reproduced before/after behavior.
  • Existing tests retained without changing assertions.
  • Self-reviewed; independent review and hosted checks pending.
  • Cross-platform runtime boundary considered.

@AmethystLiang
AmethystLiang marked this pull request as ready for review November 10, 2026 09:06
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Node runtime test include list now includes tests/e2e/helpers/persisted-profile-state.unit.test.ts.

Merge Risk: Minimal · up to b41a6

The affected test will run under Node. No merge-blocking risk is identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: running the persisted-profile WAL fixture on Node.
Description check Passed The description explains the change and reason, links the related issue, marks visual proof as not applicable, reports testing and risk, and includes the relevant checklist details. It is mostly compl…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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: Description check

Explanation

The description explains the change and reason, links the related issue, marks visual proof as not applicable, reports testing and risk, and includes the relevant checklist details. It is mostly complete against the template.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e72a05f2-642a-43a1-a322-ba5deccfb32d
Commits

Reviewing files that changed from the base of the PR and between 92a08cd and b41a63b.

Files selected for processing: 1

  • config/scripts/test-runtime/sqlite-admission/vitest-node-runtime-files.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@AmethystLiang
AmethystLiang merged commit 8a10dd3 into main Nov 10, 2026
68 checks passed
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