Skip to content

fix(test): stop faked parent messages from failing Node-runtime test shards - #35427

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-main-node-runtime-ipc-messages
Oct 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-main-node-runtime-ipc-messages

Conversation

@nwparker

@nwparker nwparker commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

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.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)

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This change appears safe to merge; no actionable issues were found.

Summary

Updates decodeNodeRuntimeMessage to parse strings and return other values unchanged.

  • The Node test worker passes fake parent messages through unchanged.

Reviews (1) · Last reviewed commit: "fix(test): let Node-runtime test workers..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preventing fake parent messages from failing Node-runtime test shards.
Description check Passed 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 Passed 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 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 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit b378dd1 into main Oct 28, 2026
34 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