[bug] registry-skills: add-opencode reapply pass hangs in bun test until the 6-hour cancel
Affected NanoClaw version or commit
Core 19e2ed30 (#3817 head) with the providers registry branch at the SHA registry-skills.yml pinned for that run. The reapply pass that hung is unchanged on current main.
Host platform
Linux (GitHub ubuntu-latest runner, Bun 1.4.0, Node 22)
What happened?
In registry-skills.yml, the test (add-opencode, true, true) matrix job hung and was cancelled by GitHub at the 6-hour default. provider-promotion and registry gate then failed closed for the whole run.
scripts/test-registry-skills.ts runs the provider round trip: apply → remove → verify contracts → apply again. The add-opencode SKILL.md test step is:
cd container/agent-runner && bun test --isolate src/providers/opencode*.test.ts src/providers/mcp-to-opencode.test.tsThe first apply pass ran that command and finished in 13 s. The second apply pass (the reapply, scripts/test-registry-skills.ts:368) ran the same command in the same checkout and never returned. No test output after the hang survives; the job log was lost with the cancellation.
What did you expect?
The reapply pass finishes in about the same time as the first pass, and the job completes in around 3 minutes like every other run of it.
How can we reproduce it?
Not reproduced on demand. Evidence so far:
- #3818, which carries 3817's commit, ran the same job twice and passed both times at about 3 min.
- Three local passes of
pnpm exec tsx scripts/test-registry-skills.ts add-opencodeare green. - #3836 puts a 20-minute
timeout-minuteson the job so a recurrence fails fast instead of taking 6 h. That bounds the symptom; this issue tracks the cause.
The shape (first pass fine, second run of the same bun test --isolate set in the same tree blocks exit) points at a handle, listener, or child process left open by one of the ten opencode test files on the providers branch:
container/agent-runner/src/providers/mcp-to-opencode.test.ts
container/agent-runner/src/providers/opencode-registration.test.ts
container/agent-runner/src/providers/opencode.attachments.test.ts
container/agent-runner/src/providers/opencode.compaction.test.ts
container/agent-runner/src/providers/opencode.config.test.ts
container/agent-runner/src/providers/opencode.empty-resume.test.ts
container/agent-runner/src/providers/opencode.factory.test.ts
container/agent-runner/src/providers/opencode.memory.test.ts
container/agent-runner/src/providers/opencode.question.test.tsSuggested first steps:
- Loop the reapply pass on a runner-sized Linux box with
bun test --isolate --timeout 30000to turn a hang into a named failing test. - Check each file for a spawned
opencodeprocess, HTTP server, or timer that is not closed inafterAll. - Once the culprit is known, add a per-test timeout to the SKILL.md test step so a future leak fails the job with a test name instead of a silent stall.
OS version and CPU architecture
GitHub-hosted ubuntu-latest, x86_64.
Install or update path
CI only: scripts/test-registry-skills.ts in a temporary shared clone. No install involved.
Docker version
Not applicable; the job does not start containers.
Channel or interface
None.
Agent provider
OpenCode (test suite only, no live provider).
Agent model
Not applicable.
Relevant redacted logs
The hung job's log did not survive the 6-hour cancellation. The one retained fact is the first-pass duration of 13 s for the same command.
Last version that worked
Unknown. The same job at the same commit passed on #3818, so this is intermittent rather than a regression at a known commit.
Source: nanocoai/nanoclaw