Skip to content

test(opencode): make plugin path assertions portable - #5562

Merged
ZaynJarvis merged 1 commit into
volcengine:mainfrom
ktz03:fix/opencode-windows-test-paths
Oct 12, 2026
Merged

ZaynJarvis merged 1 commit into
volcengine:mainfrom
ktz03:fix/opencode-windows-test-paths

Conversation

@ktz03

@ktz03 ktz03 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Running the OpenCode plugin tests on Windows fails five assertions because they expect POSIX absolute paths or / separators. The runtime correctly resolves native paths. Build the expected MCP/skills paths with node:path.resolve and allow either separator in the proxy-entrypoint suffix checks, preserving the existing configuration and hook assertions.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

AI-assisted implementation, automated local validation and an independent AI-agent diff review. No independent human code review is claimed.

Related Issue

Found while validating the OpenCode plugin on Windows. This is a standalone correction to tests already failing on current main; it is independent of the cleanup implementation in #5497.

Type of Change

  • Test update

Changes Made

  • Use native absolute expected paths for MCP configuration and skills registration.
  • Accept Windows and POSIX separators while retaining the exact servers/mcp-proxy.mjs suffix requirement.
  • Preserve all assertions and production behavior; no skipped tests or workflow changes.

Testing

Windows, Node.js 24.21.0, starting from official main df32bf6e50a40843438f9491a26069ca4bd08f1f:

  • Before: full OpenCode suite, 50 tests; 45 passed, the five path assertions failed.

  • After: the same suite, 50 passed, zero failures or skips.

  • node examples/memory-plugin-shared/sync.mjs

  • node --test examples/opencode-plugin/tests/*.test.mjs

  • git diff --check

  • Existing unit tests pass locally with my changes

  • Tested on Windows

  • Tested on Linux

  • Tested on macOS

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Production source, plugin versions and generated runtime are unchanged. The POSIX expected paths retain their previous values by inspection; Linux and macOS were not run locally.

@ZaynJarvis
ZaynJarvis merged commit b35c3f2 into volcengine:main Oct 12, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-plugins Agent harness and plugin integrations

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants