Skip to content

CI never runs the Pi plugin test suite, so plugin/pi changes merge unverified #842

Description

@Alan-TheGentleman

📝 Bug Description

CI never runs the Pi plugin's test suite. .github/workflows/ci.yml has exactly two jobs, Unit Tests (go test ./...) and E2E Tests (go test -tags e2e ./internal/server/...). Neither touches plugin/pi, which has its own suite (npm testnode --test test/*.test.mjs, currently 81 tests).

The practical effect: every change to plugin/pi/ can go green through the full PR gate without a single one of its tests being executed. Three PRs touching that directory landed recently (#734, #817, #827) and all reported passing CI without their own suite ever running.

That gap is not theoretical. While fixing #827, the plugin suite caught three genuine startup-lifecycle regressions and a destructive test-isolation problem, none of which any Go job could ever have surfaced.

Additional Context

plugin/pi has no lint or typecheck script — test is the only entry in scripts. The suite needs no npm install to run: it supplies its own dependency stubs through test/plugin-sandbox.mjs, which copies the plugin into a temp directory with its own node_modules, so a bare node --test works from a clean checkout. Worth confirming as part of the fix rather than assuming.

Node version: publish-pi.yml already pins node-version: "24", and the suite relies on native TypeScript type stripping to import index.ts directly, so the CI job should match that version rather than pick a default.

Two details worth handling deliberately while adding the job:

  • One fixture (registered Pi-native mem_search reports native provider transport failure) deliberately exercises a full 10 s startup deadline and dominates the suite's wall time (~10.6 s of ~10.9 s). That is by design, not a hang, but it means the job needs a sane timeout rather than an aggressive one.
  • Scope the job to changes under plugin/pi/ if the repo prefers not to pay Node setup on every Go-only PR — though running it unconditionally is simpler and safer, since a required check that sometimes does not run is its own trap.

✅ Expected Behavior

A change to plugin/pi/ cannot merge without its own test suite passing, the same way Go changes cannot merge without go test.

❌ Actual Behavior

plugin/pi changes merge on the strength of Go tests alone. Its suite runs only if someone happens to run it locally.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions