Skip to content

fix(ci): keep the process-message scanner test off the node-runtime project - #35428

Closed
nwparker wants to merge 1 commit into
mainfrom
nwparker/fix-ci-scanner-search-runtime
Closed

nwparker wants to merge 1 commit into
mainfrom
nwparker/fix-ci-scanner-search-runtime

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{+}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6

ELI5

#35389 moved some SQLite tests onto the Node-based test runner. One of them, session-scanner-service-search.test.ts, talks to the code under test through process messages. On that runner, process messages carry Vitest's own traffic, so the test's messages crashed Vitest's decoder, and unit shard 1 failed on every PR. This sends that one test back to where it ran before #35389 and keeps the other 13 on Node.

What Changed

Before (main since c1110e1, from #35389): shard 1/5 fails on every PR with 44 unhandled SyntaxError: "[object Object]" is not valid JSON at config/scripts/vitest-node-runtime-ipc-codec.mjs:28, coming from session-scanner-service-search.test.ts:28/94. Example: #35385 job 123132703583.

After:

Mechanism: getNodeRuntimeInclude in config/scripts/vitest-node-runtime-files.mjs drops a small PROCESS_MESSAGE_TESTS set from the SQLite scan's results. That set holds only this file. The test calls process.emit('message', …) and replaces process.send, which is the same channel the node-runtime pool uses for Vitest's IPC.

Why

Narrow forward fix rather than a revert: #35389's fix for the macOS SQLite read-only failure still holds for the 13 index tests. Only this one file can't run on node-runtime, for a reason unrelated to SQLite.

Its own SQLite reads don't hit the macOS read-only case, which is why it passed under Bun before #35389.

Flag-off: test routing only.

User-risk: none.

Linked Issue

Fixes main's unit shard 1/5, broken by #35389.

Visual Proof

N/A. Test routing.

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • That file on node-runtime (the exclusion temporarily emptied): reproduces the CI failure, SyntaxError: "[object Object]" is not valid JSON unhandled errors.

  • That file with this change: runs as |bun|, 5/5 passed, no unhandled errors.

  • All session-search-indexer-test-fixture users plus the full src/main/ai-vault-search set: 60 files, 656 tests passed, no unhandled errors. The 13 other fixture users still run as |node-runtime|.

  • Routing and scan tests: ci-shard-assignment, node-server-change-scope, vitest-sqlite-runtime-cache and vitest-sqlite-runtime-boundary pass.

Checks run: oxlint, anti-slop oxlint, pnpm run check:code-quality:changed.

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

None.

Status

Ready for review. Urgent: it unblocks every PR's shard 1.

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)

@nwparker

Copy link
Copy Markdown
Contributor Author

Superseded by #35427, which fixes the node-runtime IPC codec itself (devalue.parse only for strings), so session-scanner-service-search.test.ts can stay on node-runtime with the rest of the session-search tests. Closing without merging.

@nwparker nwparker closed this Oct 28, 2026
@nwparker
nwparker deleted the nwparker/fix-ci-scanner-search-runtime branch October 28, 2026 22:45
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change affects routing for one CI test.

The change appears safe to merge, with a non-blocking request for a focused routing test.

Findings

  1. P2 Routing exception lacks test coverage ▶

Summary

Keeps session-scanner-service-search.test.ts in Bun by excluding it from the SQLite-driven Node list.

  • The scanner search test runs outside the Node-runtime project.

Reviews (1) · Last reviewed commit: "fix(ci): keep the process-message scanne..." · Reviewed by Greptile

return [...NODE_RUNTIME_INCLUDE, ...findSqliteRuntimeTests({ filters })]
return [
...NODE_RUNTIME_INCLUDE,
...findSqliteRuntimeTests({ filters }).filter((file) => !PROCESS_MESSAGE_TESTS.has(file))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Routing exception lacks test coverage

The current routing checks compare the config with getNodeRuntimeInclude() itself, so removing this filter would still pass those checks. Add a focused assertion that session-scanner-service-search.test.ts stays out of the Node list while another session-search-indexer-test-fixture user stays in it. This would protect the exception that fixes the CI failure.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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