You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(test): stop faked parent messages from failing Node-runtime test shards - #35427
One of our unit tests pretends to be a parent process by sending fake messages to itself. Since #35389 moved it onto the Node test runner, the runner's own message reader tries to decode those fake messages, fails, and marks the whole test shard red. Every pull request that lands that test in its shard currently fails.
What Changed
Before: src/main/ai-vault/session-scanner-service-search.test.ts fails on main (locally and in CI) with 44 "[object Object] is not valid JSON" unhandled rejections from config/scripts/vitest-node-runtime-ipc-codec.mjs.
After: the Node test-runner codec only decodes string messages (the only kind the runner itself sends) and hands anything else through unchanged, so the runner's RPC layer ignores the test's fake messages, as it does under Bun.
Why
The test has to fake its parent on the real process, because the service entry it covers listens there. Moving the test back off the Node runner would bring back the macOS SQLite WAL problem #35389 fixed. Rewriting the service to accept an injected transport is a bigger change than an unblock needs.
Linked Issue
Fixes #
N/A: internal CI unblock for a regression introduced by #35389.
Visual Proof
N/A: test infrastructure only, no UI or behavior change.
Testing
I manually tested these changes locally: pnpm test src/main/ai-vault/session-scanner-service-search.test.ts fails on main and passes with this change (macOS).
Automated tests added/updated, or explained why not below: the failing test is the regression test.
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Test runner only. No effect on the app, SSH, mobile or wire compatibility.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
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: 3310ae39-0531-49ec-b80c-f58f36d501ae
Commits
Reviewing files that changed from the base of the PR and between 8761934 and bb45f20.
Files selected for processing: 1
config/scripts/vitest-node-runtime-ipc-codec.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Walkthrough
decodeNodeRuntimeMessage now returns non-string inputs unchanged. It continues to parse string inputs with the existing revivers.
Priority: Low
Merge Risk: Minimal · up to bb45f
No actionable merge-blocking risk remains in this change.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: preventing fake parent messages from failing Node-runtime test shards.
Description check
The description explains the problem, change, rationale, testing, scope, and compatibility considerations. The linked issue field is empty, and the full validation command checklist is not marked comp…
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description explains the problem, change, rationale, testing, scope, and compatibility considerations. The linked issue field is empty, and the full validation command checklist is not marked complete, but the description is otherwise sufficiently complete and focused.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. 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 1 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
One of our unit tests pretends to be a parent process by sending fake messages to itself. Since #35389 moved it onto the Node test runner, the runner's own message reader tries to decode those fake messages, fails, and marks the whole test shard red. Every pull request that lands that test in its shard currently fails.
What Changed
Before:
src/main/ai-vault/session-scanner-service-search.test.tsfails onmain(locally and in CI) with 44 "[object Object]is not valid JSON" unhandled rejections fromconfig/scripts/vitest-node-runtime-ipc-codec.mjs.After: the Node test-runner codec only decodes string messages (the only kind the runner itself sends) and hands anything else through unchanged, so the runner's RPC layer ignores the test's fake messages, as it does under Bun.
Why
The test has to fake its parent on the real
process, because the service entry it covers listens there. Moving the test back off the Node runner would bring back the macOS SQLite WAL problem #35389 fixed. Rewriting the service to accept an injected transport is a bigger change than an unblock needs.Linked Issue
Fixes #
N/A: internal CI unblock for a regression introduced by #35389.
Visual Proof
N/A: test infrastructure only, no UI or behavior change.
Testing
pnpm test src/main/ai-vault/session-scanner-service-search.test.tsfails onmainand passes with this change (macOS).AI Disclosure
Review
Agent skill upstream boundary
Notes
Test runner only. No effect on the app, SSH, mobile or wire compatibility.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)