Commit 94ff3f0
committed
fix - skip arborist plugin deps install in tests; bump snapshot revert timeout
Root cause of all 7 test timeouts:
config.ts fires a background @npmcli/arborist.reify() for @opencode-ai/plugin
in every .opencode/ directory it discovers. plugin/index.ts and tool/registry.ts
then call waitForDependencies() which joins that fiber before loading plugins
or custom tools. On Blacksmith ARM64, a cold arborist fetch takes 10-30 s per
test. Running in parallel across a 4-vCPU runner saturates CPU/IO and starves
even unrelated tests (session.processor, snapshot.revert) past their 30 s limit.
Fixes:
- flag.ts: add OPENCODE_DISABLE_PLUGIN_DEPS_INSTALL flag
- config.ts: guard the npmSvc.install() + deps.push() block with the new flag
- preload.ts: set OPENCODE_DISABLE_PLUGIN_DEPS_INSTALL=true for all tests
(safe: bun resolves @opencode-ai/plugin from the workspace node_modules;
tests do not author plugins that import the SDK at runtime)
- snapshot.test.ts: raise timeout on the 280-file revert test to 60 s
(git operations across 280 files can push past 30 s on ARM64)1 parent b9810c4 commit 94ff3f0
4 files changed
Lines changed: 37 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
567 | 569 | | |
568 | 570 | | |
569 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | | - | |
| 1531 | + | |
0 commit comments