Skip to content

test(plugin): add OpenCode fixture projection contract#1459

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/opencode-plugin-adapter-fixture
Jul 7, 2026
Merged

test(plugin): add OpenCode fixture projection contract#1459
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/opencode-plugin-adapter-fixture

Conversation

@limityan

@limityan limityan commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a fixture-only bitfun-opencode-adapter crate with an empty public API and no production runtime dependencies.
  • Use real OpenCode input shapes for the fixture: opencode.json plugin package list plus .opencode/plugins/*.ts local plugin source.
  • Add boundary guards for production manifest dependencies, workspace dependency aliases, direct imports, and public re-exports before reviewed Plugin Runtime Host integration.
  • Update product/plugin architecture docs to keep OpenCode support scoped to discovery/projection until the Host + Desktop/CLI vertical slice lands.

Scope and risk

  • No production crate imports bitfun-opencode-adapter.
  • cargo tree --edges normal for the new crate has no normal dependencies.
  • No plugin JS/TS execution, no PluginRuntimeClient implementation, no executable availability, and no Product Assembly binding is introduced.
  • Performance impact is limited to boundary-check scripts and test-only fixture code; no runtime path is changed.

Review notes

  • Independent product review initially flagged a custom manifest-shaped fixture; fixed by switching to official OpenCode config/local plugin source shapes.
  • Independent architecture review flagged workspace alias and pub use guard gaps; fixed with checker and self-test coverage.
  • Follow-up adversarial architecture review flagged two additional boundary bypasses: BitFun-Installer/src-tauri was outside the OpenCode dependency/import scan roots, and package = 'bitfun-opencode-adapter' single-quoted aliases bypassed manifest matching. Both are now guarded with self-test coverage.
  • Final subagent re-review found no remaining Critical or Important issues.

Verification

  • git fetch gcwing main
  • git rev-list --left-right --count gcwing/main...HEAD -> 0 1
  • node scripts/check-core-boundaries.mjs
  • node --test scripts/check-core-boundaries.test.mjs
  • cargo check -p bitfun-opencode-adapter
  • cargo test -p bitfun-opencode-adapter opencode_fixture_contracts
  • cargo tree -p bitfun-opencode-adapter --edges normal --depth 1
  • cargo metadata --no-deps --format-version 1
  • git diff --check gcwing/main..HEAD

Add a fixture-only OpenCode source projection crate with an empty public API and no production dependencies.

Guard production imports, manifest dependencies, and public re-exports until Plugin Runtime Host integration is reviewed.
@limityan
limityan force-pushed the yanzhn/opencode-plugin-adapter-fixture branch from 33ed330 to 3a623f7 Compare July 7, 2026 11:22
@limityan
limityan merged commit 52c0c94 into GCWing:main Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant