Repository navigation
test(ci): point server-scope qualification fixtures at SSH after relay deletion - #27392
Conversation
…y deletion The relay server deletion removed src/relay/ from the cross-host qualification prefixes, but the scope tests merged alongside it still used src/relay/ paths as their cross-host example. Use src/main/ssh/, which still carries that rule. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to The change is test-only, but six cases may pass through the SSH full-qualification rule without proving malformed modification evidence is rejected. Direct scope-state assertions would close this bounded coverage gap; merge is reasonable with that follow-up. Pre-merge checks |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
config/scripts/node-server-change-scope.test.mjs (1)
413-427: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the modification-evidence state directly.
The six cases only assert the final qualification. Because
changedcontainssrc/main/ssh/pinned-runtime-materializer-context.test.ts, the SSH prefix independently selects every runner whenever the selector scanschangedFiles. Add assertions that malformed evidence does not producegraphResolvedormatchedFiles; otherwise these cases can still pass without proving the status-specific evidence handling.Suggested fix
) expect(scope.shouldRun).toBe(true) + expect(scope.graphResolved).toBeUndefined() + expect(scope.matchedFiles).toBeUndefined() expect(nodeServerQualification(changed, scope)).toEqual({A generic non-cross-host path alone would not preserve the current
qualification: trueexpectation. Directly asserting the scope state tests the intended contract without relying on a cross-host fixture.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
793d5cac-b1d7-4ecd-bf6c-6ce1f097e8b3
📒 Files selected for processing (1)
config/scripts/node-server-change-scope.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
ELI5
mainis failing one CI test file. Two PRs merged within minutes of each other: one added tests that use the SSH relay server's folder as their example of "code shared across machines", and the other deleted that folder and removed it from the list of such code. Each passed on its own, but together the tests point at a rule that no longer exists. This PR points the tests at a folder the rule still covers.What Changed
main,config/scripts/node-server-change-scope.test.mjsfails 7 tests ("keeps every host when the modified relay production module is an actual consumer" and the 6 "retains complete-path qualification..." cases). Each expects the full test matrix (qualification: true, every runner) and gets Linux only.src/relay/...paths as their cross-host example. refactor(relay): delete the SSH relay server, its build assets and tests #27215 then removed'src/relay/'fromCROSS_HOST_PREFIXESinconfig/scripts/node-server-qualification.mjs(the relay server it covered is gone), so those paths no longer turn on the full matrix.src/main/ssh/...paths.src/main/ssh/is still inCROSS_HOST_PREFIXES. The fixtures are files made up inside a temporary folder, so only the path prefix matters. Test-only change; the scope logic is untouched.Why
The logic change in #27215 is correct: with the relay server deleted,
src/relay/has nothing left to cover. The tests only needed a cross-host folder as an example, andsrc/main/ssh/is the closest one that still exists. Puttingsrc/relay/back in the list would bring back a rule for a deleted folder just so the tests pass.Each case still tests the same rule. As a check, I removed
'src/main/ssh/'fromCROSS_HOST_PREFIXESand exactly the same 7 tests failed again.Linked Issue
N/A (internal fix for red
main, caused by #27380 and #27215 merging together)Visual Proof
N/A: CI test fixtures only, nothing visible changes.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Before (on
main92fb883):npx vitest run --config config/vitest.config.ts config/scripts/node-server-change-scope.test.mjsgivesTests 7 failed | 91 passed (98)After: that file plus
node-server-qualification.test.mjsandcheck-process-host-imports.test.mjsgivesTest Files 3 passed (3),Tests 184 passed (184)Check: removing
src/main/ssh/from the cross-host list makes the same 7 fail againoxlint, oxfmt --check, and the changed-code quality gate pass. Tested on macOS; the change is a path string in a test, nothing differs by platform.
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)