fix(test): resolve CI test regressions β Windows short paths, synology zod mock, feishu registration#47850
Conversation
e02d5b5 to
cac5bce
Compare
Greptile SummaryThis PR fixes a Windows CI failure in
Confidence Score: 4/5
Last reviewed commit: cac5bce |
150299c to
cf7e1b7
Compare
cf7e1b7 to
0d4e7d2
Compare
2f9afbe to
85c1e7e
Compare
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 333a028eec
βΉοΈ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const api = { | ||
| runtime: { log: vi.fn() }, | ||
| registerChannel, | ||
| registrationMode: "full", |
There was a problem hiding this comment.
Remove duplicate registrationMode key in API stub
Adding registrationMode a second time creates a duplicate object key, which triggers TypeScript error TS1117 for this test file and can fail pnpm tsgo/typecheck jobs before tests run. Since this change introduced the duplicate key, the fix is to keep only one registrationMode property in the stub.
Useful? React with πΒ / π.
- Resolve Windows 8.3 short paths in makeTrackedTempDir, bundle-mcp and plugin-hooks temp dir helpers via realpath - Remove broken shallow zod mock in synology-chat test - Add registrationMode: "full" to feishu plugin test stub
b2c021c to
0243ae2
Compare
|
Closing β main CI is moving too fast for this to stay in sync. The individual fixes (synology mock, feishu registration, Windows short paths) can be resubmitted if needed. |
Summary
Three CI test regressions on main:
Windows 8.3 short paths β
os.tmpdir()returns short-name paths (e.g.RUNNER~1) on Windows CI, causing plugin discovery test assertions to fail against long-form paths. Applyfs.realpathSync.nativeinmakeTrackedTempDir.Synology-Chat zod mock β The shallow
vi.mock("zod")only providedz.object, breaking transitivez.string()calls from config schema imports. Remove the unnecessary mock entirely.Feishu registration mode β The test api stub lacked
registrationMode: "full", soregister()returned early before calling tool/hook registration functions. Add the missing field.Test plan
pnpm test -- extensions/synology-chat/src/channel.test.tsβ 24/24 passpnpm test -- extensions/feishu/index.test.tsβ 1/1 passpnpm test -- src/plugins/discovery.test.tsβ 23/23 passpnpm checkβ passpnpm formatβ pass