Commit d429867
committed
ci: use packaged dist/index.js for host e2e instead of raw TS source
Smoke workflow `smoke-opencode-linux.yml` (just added) proved that
opencode-on-Linux is healthy in isolation: both curl and bun's fetch
reach /doc in seconds with either 127.0.0.1 or 0.0.0.0 binding. So
the host e2e hang is NOT a Linux opencode bug.
The remaining structural difference between smoke (~10s spawn-to-OK)
and host e2e (~5min timeout) is plugin loading. Host e2e was pointing
opencode at `packages/plugin/src/index.ts` — raw TypeScript source
spanning hundreds of submodule imports. Bun's runtime TS transpile +
dynamic resolution can be slow on cold Linux runners.
Production never loads from src/ — published users get a single
bundled `dist/index.js`. Testing src/ exposes us to a slowness path
real users never see. CI workflows already build dist before host
e2e, so the file is available; the harness just wasn't using it.
Resolution: prefer `packages/plugin/dist/index.js` when it exists,
fall back to `src/` only when running locally without a build (which
also avoids breaking local devs who haven't built).1 parent 444845b commit d429867
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
17 | 27 | | |
18 | 28 | | |
19 | 29 | | |
| |||
0 commit comments