Skip to content

[PR] fix(ci): build acp-kernel in the mysql-contract lane (sub-defect B of #4326) - #4330

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-22_mysql-contract-kernel-build
Closed

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-22_mysql-contract-kernel-build

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Covers sub-defect B of #4326 (referenced, not closed — sub-defect A lands via #4174, and master goes fully green only once both merge).

Problem

The mysql-contract job in .github/workflows/ci.yml runs the two storage contract suites directly from source, with NO build step. Since #4177 (1da8eca68, durability trio) added store.ts -> runtime-status.ts to the import graph, those files now reach acp-kernel transitively via backend.ts -> store.ts -> runtime-status.ts -> knobs.ts -> config.ts. kernel/dist is not committed and node_modules/acp-kernel is a file:-link into kernel/, so EVERY fresh checkout dies at import resolution with ERR_MODULE_NOT_FOUND ... acp-kernel/dist/index.js — deterministic, reproduced locally on a clean install (it is not a cache-state problem).

Other lanes are unaffected: scripts/run-ci-tests.mjs builds kernel + pi-subagents in its pretest, the e2e/registry/image lanes run npm run build or typecheck first, and ci-theorem.yml (same no-build shape) imports only kernel/src/* sources, so it resolves fine.

Fix

One step added to the job: npm --prefix kernel run build (same command as the root pretest hook). pi-subagents is NOT in these two files' import graph (verified: the suite passes with pi-subagents/dist absent), so it is deliberately not built here.

Verification

  • Fresh checkout + npm install --ignore-scripts: before the fix both files die at import with the exact CI error signature; after adding the build step, node --import tsx --test tests/storage-backend-contract.test.ts tests/storage-backend-knob.test.ts is green (sqlite lane — 12 tests, 11 pass, 1 skip = the DSN-gated mysql test). The mysql DSN assertions are untouched by this diff; CI's mysql:8.0 service container covers them.
  • YAML parses; step order is checkout -> setup-node -> install -> kernel build -> tests.

Behavior change

None outside CI: no runtime, config, wire, or persistence change. The mysql-contract lane gains ~10-20s per run.

Note: the test-shard lanes on this PR's head stay red until #4174 merges (sub-defect A, already fixed there); the mysql-contract check itself turns green with this PR.

#4326-B: since #4177 the contract suite reaches acp-kernel through
backend.ts -> store.ts -> runtime-status.ts -> knobs.ts -> config.ts,
but this job never built the file:-linked kernel, whose dist is not
committed — every fresh checkout died at import resolution. Build the
kernel like scripts/run-ci-tests.mjs does in its pretest; pi-subagents
is not in these files' import graph (verified).
@ranxianglei ranxianglei changed the title fix(ci): build acp-kernel in the mysql-contract lane (sub-defect B of #4326) [PR] fix(ci): build acp-kernel in the mysql-contract lane (sub-defect B of #4326) Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-22_mysql-contract-kernel-build (7fc1b93)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.5135-pr.4330.7394ed5

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4330.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

按取代关闭:本条的修复(mysql-contract 车道跑测试前先 npm --prefix kernel run build)已由 #4350 的 commit 1 逐字合入 master(2026-10-23 02:05Z),其后的 master run 39890366267 mysql-contract 已绿。同缺陷的 #4336、#4334 也已关闭,无遗留工作。

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