Skip to content

fix(test): resolve CI test regressions β€” Windows short paths, synology zod mock, feishu registration#47850

Closed
jackjin1997 wants to merge 1 commit intoopenclaw:mainfrom
jackjin1997:fix/test-windows-short-path
Closed

fix(test): resolve CI test regressions β€” Windows short paths, synology zod mock, feishu registration#47850
jackjin1997 wants to merge 1 commit intoopenclaw:mainfrom
jackjin1997:fix/test-windows-short-path

Conversation

@jackjin1997
Copy link
Copy Markdown
Contributor

@jackjin1997 jackjin1997 commented Mar 16, 2026

Summary

Three CI test regressions on main:

  1. 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. Apply fs.realpathSync.native in makeTrackedTempDir.

  2. Synology-Chat zod mock β€” The shallow vi.mock("zod") only provided z.object, breaking transitive z.string() calls from config schema imports. Remove the unnecessary mock entirely.

  3. Feishu registration mode β€” The test api stub lacked registrationMode: "full", so register() 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 pass
  • pnpm test -- extensions/feishu/index.test.ts β€” 1/1 pass
  • pnpm test -- src/plugins/discovery.test.ts β€” 23/23 pass
  • pnpm check β€” pass
  • pnpm format β€” pass

@jackjin1997 jackjin1997 force-pushed the fix/test-windows-short-path branch from e02d5b5 to cac5bce Compare March 16, 2026 03:37
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 16, 2026

Greptile Summary

This PR fixes a Windows CI failure in discovery.test.ts by applying fs.realpathSync.native to the temp directory path returned by makeTrackedTempDir, ensuring Windows 8.3 short-name paths (e.g. RUNNER~1) are expanded to their long-form equivalents before any path comparison.

  • src/plugins/test-helpers/fs-fixtures.ts: One-line fix wrapping fs.mkdtempSync(...) with fs.realpathSync.native(...). The change is correct and minimal β€” since all test paths derive from the returned stateDir, normalizing at this single root keeps every downstream path.join(stateDir, ...) assertion consistent on all platforms.
  • pnpm-lock.yaml: Contains ~20 new empty extension importer entries (extensions/anthropic, extensions/openai, extensions/xai, etc.) that are completely unrelated to the stated fix. These appear to be from new extension directories added to the monorepo, but they significantly expand the diff scope beyond what the PR description covers. Consider splitting this into a separate PR or at minimum documenting these additions in the PR description.

Confidence Score: 4/5

  • The test helper fix is correct and safe to merge; the unrelated lockfile changes warrant a second look but are low-risk.
  • The actual code change (one line in fs-fixtures.ts) is straightforward, correct, and has no negative side-effects on any platform. The only concern is the large unrelated pnpm-lock.yaml diff that bundles ~20 new empty extension registrations into this fix PR, making scope harder to audit.
  • pnpm-lock.yaml β€” unrelated extension entries should be verified as intentional and ideally separated into their own PR.

Last reviewed commit: cac5bce

@jackjin1997 jackjin1997 force-pushed the fix/test-windows-short-path branch 6 times, most recently from 150299c to cf7e1b7 Compare March 16, 2026 05:21
@openclaw-barnacle openclaw-barnacle bot added the channel: feishu Channel integration: feishu label Mar 16, 2026
@jackjin1997 jackjin1997 changed the title fix(test): resolve Windows 8.3 short paths in plugin test temp dirs fix(test): resolve Windows short paths, synology zod mock, and feishu registration mode Mar 16, 2026
@jackjin1997 jackjin1997 force-pushed the fix/test-windows-short-path branch from cf7e1b7 to 0d4e7d2 Compare March 16, 2026 05:24
@jackjin1997
Copy link
Copy Markdown
Contributor Author

@ngutman all checks pass except startup-memory which is a pre-existing main issue (940MB RSS vs 900MB limit β€” #47923 and other PRs hit the same thing). The three test fixes here are independent of the memory regression.

@jackjin1997 jackjin1997 force-pushed the fix/test-windows-short-path branch from 2f9afbe to 85c1e7e Compare March 16, 2026 06:05
@jackjin1997 jackjin1997 changed the title fix(test): resolve Windows short paths, synology zod mock, and feishu registration mode fix(test): resolve CI test regressions β€” Windows short paths, synology zod mock, feishu registration Mar 16, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

πŸ’‘ 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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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
@jackjin1997
Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant