Repository navigation
Conversation
|
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. |
[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
SummaryKeeps
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)) |
There was a problem hiding this comment.
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!
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 JSONatconfig/scripts/vitest-node-runtime-ipc-codec.mjs:28, coming fromsession-scanner-service-search.test.ts:28/94. Example: #35385 job 123132703583.After:
session-scanner-service-search.test.tsruns in the default (Bun) project again and passes, 5/5, with no unhandled errors.session-search-indexer-test-fixturestay on node-runtime, as test: run session-search index tests on Node's SQLite #35389 intended.Mechanism:
getNodeRuntimeIncludeinconfig/scripts/vitest-node-runtime-files.mjsdrops a smallPROCESS_MESSAGE_TESTSset from the SQLite scan's results. That set holds only this file. The test callsprocess.emit('message', …)and replacesprocess.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 JSONunhandled errors.That file with this change: runs as
|bun|, 5/5 passed, no unhandled errors.All
session-search-indexer-test-fixtureusers plus the fullsrc/main/ai-vault-searchset: 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-cacheandvitest-sqlite-runtime-boundarypass.Checks run: oxlint, anti-slop oxlint,
pnpm run check:code-quality:changed.Review
Agent skill upstream boundary
Notes
None.
Status
Ready for review. Urgent: it unblocks every PR's shard 1.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)