test(ci): run server/ + shared/ vitest suites in the merge gate#437
test(ci): run server/ + shared/ vitest suites in the merge gate#437HomenShum wants to merge 1 commit into
Conversation
server/ and shared/ live outside src/ and packages/*, so they were covered by neither the segmented runner nor the required Runtime smoke job — tests there only ever got type-checked and could rot silently (surfaced when the tri-search rerank suite failed locally despite green CI). - add `server` and `shared` segments to runSegmentedVitest.mjs in filter mode, matching `npx vitest run server/` so files under server/test/* are not dropped the way `--dir` drops them - add test:run:server / test:run:shared npm scripts - invoke the segments from the required Runtime smoke CI job (trim the now redundant individual server/* entries from the smoke list) - modernize commandBridge.test.ts to the user-scoped CommandBridge API (userId-first query/dispatch signatures, broadcast -> broadcastToUser) so the newly-enforced suite passes Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 Augment PR SummarySummary: This PR adds missing CI coverage for Vitest suites under Changes:
Technical Notes: The server/shared segments use filter mode (vs 🤖 Was this summary useful? React with 👍 or 👎 |
| # tri-search rerank suite) could rot silently. Running the segments here | ||
| # puts them in the required merge gate. | ||
| - name: Server + shared vitest segments | ||
| run: node scripts/testing/runSegmentedVitest.mjs --only server,shared |
There was a problem hiding this comment.
At .github/workflows/ci.yml:93, this invokes runSegmentedVitest.mjs, but runShell() in that script starts a timeout that isn’t cleared when the child process exits; if the server,shared suites finish in <300s, the step can remain alive until the timer fires. That would add a fixed ~5 minute delay to the required merge gate even when tests complete quickly.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Summary
server/andshared/sit outsidesrc/andpackages/*, so their*.test.tsfiles were covered by neither the segmented runner (
npm run test:run) northe required
Runtime smokeCI job — they only ever got type-checked. Tests therecould rot silently as the code they cover changed. This was the root cause behind
the tri-search rerank suite passing CI while failing locally.
This PR closes that gap and fixes the one suite the new gate immediately surfaced.
serverandsharedsegments toscripts/testing/runSegmentedVitest.mjs(filter mode, i.e.
npx vitest run server/—--dirsilently drops files underserver/test/**and 4 files undershared/, so filter mode is used to match thevalidated command exactly).
test:run:server/test:run:sharednpm scripts.--only server,shared)and trim the now-redundant individual
server/*entries from the hardcoded smoke list.server/commandBridge.test.tsto the user-scopedCommandBridgeAPI(userId-first query/dispatch signatures,
broadcast→broadcastToUser). It hadrotted against the source for the same reason — it never ran in CI.
Local verification:
node scripts/testing/runSegmentedVitest.mjs --only server,shared→ green(server 23 passed / 1 skipped, shared 15 passed).
npx tsc --noEmit --pretty false→ 0 errors.Test plan
Runtime smokejob shows a "Server + shared vitest segments" step thatruns
=== server-vitest ===and=== shared-vitest ===and passes.TypecheckandBuildstay green.🤖 Generated with Claude Code