Skip to content

Conversation

@grypez
Copy link
Contributor

@grypez grypez commented Jan 8, 2026

Create a new @ocap/kernel-test-local package to contain E2E tests that run on dev workstations but not in CI. The primary motivation for this setup is to test agentic integrations using local language models. Adds a new yarn test:e2e:local command to the monorepo root. Note that yarn test:e2e will not run the local tests.

Additional Changes:

  • Remove test:e2e script from kernel-agents
  • Move E2E tests from kernel-agents/test/e2e/ to new package
  • Add capability exports to kernel-agents package:
    • Export ./capabilities/examples (getMoonPhase, search)
    • Export ./capabilities/math (count, add, multiply)
    • Export Agent and MakeAgentArgs types from main index

Closes #723


Note

Introduces a local-only E2E test package and exposes agent capabilities for reuse.

  • Adds @ocap/kernel-test-local with Vitest configs, README, setup/troubleshooting docs, and E2E tests using Ollama (DEFAULT_MODEL, connectivity checks)
  • Adds monorepo script test:e2e:local to run local tests across workspaces
  • Exposes ./capabilities/examples and ./capabilities/math plus Agent and MakeAgentArgs types from @ocap/kernel-agents; updates E2E tests to import from these exports
  • Removes test:e2e script from kernel-agents and relocates its E2E tests to the new package
  • Implements logger tag filtering via IGNORE_TAGS and related unit tests

Written by Cursor Bugbot for commit 843d141. This will update automatically on new commits. Configure here.

@grypez grypez force-pushed the grypez/add-kernel-test-local branch 3 times, most recently from f6a8f02 to c0c7104 Compare January 8, 2026 23:17
@grypez grypez changed the title feat: Add kernel-test-local package for local-only E2E tests refactor: Add kernel-test-local package for local-only E2E tests Jan 8, 2026
grypez added 3 commits January 9, 2026 10:48
Create a new `@ocap/kernel-test-local` package to contain E2E tests that
require external dependencies (Ollama). These tests are not run in CI due
to their inherent flakiness from language model non-determinism.

Changes:
- Create `packages/kernel-test-local/` with structure analogous to `kernel-test`
- Move E2E tests from `kernel-agents/test/e2e/` to new package:
  - agents.test.ts: Agent functionality tests (JSON and REPL strategies)
  - suite.test.ts: Ollama connectivity verification
  - constants.ts: Test configuration
  - utils.ts: Helper functions
- Add capability exports to kernel-agents package:
  - Export `./capabilities/examples` (getMoonPhase, search)
  - Export `./capabilities/math` (count, add, multiply)
  - Export Agent and MakeAgentArgs types from main index
- Add `test:local` script to root package.json
- Create comprehensive README with Ollama setup instructions
- Remove `test:e2e` script and files from kernel-agents

The new package:
- Requires Ollama running on localhost:11434 with llama3.1:latest model
- Uses same vitest configuration pattern as other test packages
- Is explicitly excluded from CI (no test:e2e:ci script)
- Can be run with: `yarn test:local`

Closes #723
@grypez grypez force-pushed the grypez/add-kernel-test-local branch from c0c7104 to 3dd66c7 Compare January 9, 2026 15:48
@grypez grypez marked this pull request as ready for review January 9, 2026 17:25
@grypez grypez requested a review from a team as a code owner January 9, 2026 17:25
@sirtimid
Copy link
Contributor

sirtimid commented Jan 9, 2026

@grypez Can't we have a separate local folder in kernel-tests package which is excluded from the vitest config (it has a separate), so we don't have to create yet another package for tests?

@grypez
Copy link
Contributor Author

grypez commented Jan 9, 2026

This refactor is a step toward integration testing makeDiscoverableExo with makeJsonAgent inside different vats operated by the ocap kernel. This and a subsequent refactor are intended to enable bundling makeJsonAgent into a vat.

The test organization across the monorepo is already a little clunky. This PR exacerbates, but also obviates, the clunkiness.

  • there are two special 'test-only' packages
  • unit tests live in */src/; integration and e2e tests live variously in */test/(integration|e2e)/, kernel-test/src/ or kernel-test-local/test/e2e/
  • tests are run variously by yarn test, yarn test:e2e, yarn test:e2e:ci, yarn test:e2e:local
  • some tests have associated scripts to setup and teardown required test infrastructure
  • tests are configured under various vitest.config[.e2e].ts files

@grypez grypez merged commit 6f56ad6 into main Jan 9, 2026
27 checks passed
@grypez grypez deleted the grypez/add-kernel-test-local branch January 9, 2026 18:39
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.

refactor: Add local e2e test package

3 participants