Skip to content

ci: run the test suites on every PR - #12

Merged
CCDevelopForFun merged 1 commit into
mainfrom
ci/test-workflow
Aug 28, 2026
Merged

CCDevelopForFun merged 1 commit into
mainfrom
ci/test-workflow

Conversation

@CCDevelopForFun

Copy link
Copy Markdown
Owner

Why

The repo has no test CI. release.yml fires on tags, runtime-image.yml on image changes — nothing runs the suites on a pull request.

That's not theoretical: it's why the fake-provider E2E regression (#11) survived the pi 0.82.1 bump for weeks. The "hermetic" suite was quietly making live Anthropic calls and timing out, and no PR ever surfaced it.

Now that the suites are green and genuinely hermetic (the whole runtime suite runs in ~1.2s with no credentials), gating on them is finally practical.

What runs

Job Covers
go builds agentctl, runs go test ./... — includes the schema-sync test that catches drift between schemas/ and the embedded copy
node matrix over all four adapters; each adapter's npm test builds first, so dist/ is never stale
e2e the two credential-free tiers — codex (via the repo's fake-codex.sh shim) and claude (compile-time + adapter-startup rejection paths)

Node pinned to 22.19.0 — runtime/'s engines floor, the strictest of the four. Go pinned to 1.25, matching cli/go.mod.

The pi and opencode e2e tiers stay manual: both need a live API key, and opencode needs its CLI on PATH. Per AGENTS.md they're a no-op without AGENT_CONTROLLER_RUN_LIVE=1 anyway.

Gotcha this had to work around

e2e/run.sh calls npm run build but never npm install, so on a fresh checkout tsc is missing. The e2e job installs the adapter it builds first. Verified the hard way — deleted runtime-claude/node_modules and ran the tier from a clean npm ci; it passes.

Also confirmed npm ci succeeds for all four adapters, so no lockfile is out of sync with its package.json.

What this gates today

All green as of this branch:

  • runtime 115 · runtime-opencode 103 · runtime-codex 109 · runtime-claude 95 — 422 JS tests
  • cli go test ./...
  • e2e codex + claude, both hermetic

🤖 Generated with Claude Code

The repo had no test CI. release.yml and runtime-image.yml only fire on tags
and image changes, so nothing ever ran the suites on a pull request — which is
why the fake-provider E2E regression (#11) survived the pi 0.82.1 bump
unnoticed for weeks, quietly making live Anthropic calls until it timed out.

Three jobs, all hermetic (no API keys, no model-provider network):

  go    — builds agentctl and runs go test ./..., which includes the
          schema-sync test that catches drift between schemas/ and the
          embedded copy under cli/internal/adl/schemas/.
  node  — matrix over all four adapters. Each adapter's own `npm test` runs
          its build first, so dist/ is never stale. Node is pinned to
          22.19.0, runtime/'s engines floor and the strictest of the four.
  e2e   — the two tiers that need no credentials (codex, claude). The codex
          tier uses the repo's fake-codex.sh shim; the claude tier exercises
          the compile-time and adapter-startup rejection paths. The pi and
          opencode tiers stay manual: both need a live key, and opencode
          needs its CLI on PATH.

e2e/run.sh calls `npm run build` but never `npm install`, so the e2e job
installs the adapter it builds first — otherwise tsc is missing on a fresh
checkout. Verified by deleting runtime-claude/node_modules and running the
tier from a clean `npm ci`.

Current state gated by this: 422 JS tests across the four adapters (115 +
103 + 109 + 95), the Go suite, and both hermetic e2e tiers — all passing.
@CCDevelopForFun
CCDevelopForFun merged commit 84ee4ee into main Aug 28, 2026
7 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