Description
unit (linux) intermittently fails in GitHub Actions on packages/opencode/test/memory/abort-leak.test.ts with:
memory: abort controller leak > webfetch does not leak memory over many invocations
This does not currently look like a deterministic regression from the reporting branch itself. The same PR later passed on re-run without touching the webfetch / abort / memory-test path, and another unrelated PR also failed earlier on the same test.
Observed failing run on PR #21085:
Relevant failing log excerpt:
Baseline: 88.22 MB
After 50 fetches: 142.01 MB
Growth: 53.79 MB
- Expected threshold in test:
< 5 MB
Another unrelated PR also failed on the same test:
The same PR later passed on re-run:
Additional context:
packages/opencode/src/util/abort.ts already uses controller.abort.bind(controller).
- The companion test
compare closure vs bind pattern directly was still passing in the failing runs.
- The reporting branch did not modify
packages/opencode/src/tool/webfetch.ts, packages/opencode/src/util/abort.ts, or packages/opencode/test/memory/abort-leak.test.ts.
Plugins
None
OpenCode version
opencode package version in repo: 1.3.15
Steps to reproduce
- Open a PR against
anomalyco/opencode and let the test workflow run.
- Watch the
unit (linux) job in .github/workflows/test.yml.
- On intermittent failing runs, the failure appears in
packages/opencode/test/memory/abort-leak.test.ts on memory: abort controller leak > webfetch does not leak memory over many invocations.
- Re-run the failed job or workflow. In at least one observed case, the same logical change later passed without code changes to the memory-test path.
Screenshot and/or share link
Failing run:
Passing re-run:
Operating System
GitHub Actions Linux runner: blacksmith-4vcpu-ubuntu-2404 / Ubuntu 24.04 environment
Terminal
bash in GitHub Actions runner
Description
unit (linux)intermittently fails in GitHub Actions onpackages/opencode/test/memory/abort-leak.test.tswith:memory: abort controller leak > webfetch does not leak memory over many invocationsThis does not currently look like a deterministic regression from the reporting branch itself. The same PR later passed on re-run without touching the
webfetch/abort/ memory-test path, and another unrelated PR also failed earlier on the same test.Observed failing run on PR #21085:
e8909a0fdc18078efb80f6613bef02c40ed90622unit (linux)Relevant failing log excerpt:
Baseline: 88.22 MBAfter 50 fetches: 142.01 MBGrowth: 53.79 MB< 5 MBAnother unrelated PR also failed on the same test:
unit (linux)test failed with:Baseline: 108.71 MBGrowth: 63.08 MBmemory: abort controller leak > webfetch does not leak memory over many invocationsThe same PR later passed on re-run:
02145f23f579d7523d9d1980be9e49c3de07014cunit (linux)job: https://github.com/anomalyco/opencode/actions/runs/24022923003/job/70055338429Additional context:
packages/opencode/src/util/abort.tsalready usescontroller.abort.bind(controller).compare closure vs bind pattern directlywas still passing in the failing runs.packages/opencode/src/tool/webfetch.ts,packages/opencode/src/util/abort.ts, orpackages/opencode/test/memory/abort-leak.test.ts.Plugins
None
OpenCode version
opencodepackage version in repo:1.3.15Steps to reproduce
anomalyco/opencodeand let thetestworkflow run.unit (linux)job in.github/workflows/test.yml.packages/opencode/test/memory/abort-leak.test.tsonmemory: abort controller leak > webfetch does not leak memory over many invocations.Screenshot and/or share link
Failing run:
Passing re-run:
Operating System
GitHub Actions Linux runner:
blacksmith-4vcpu-ubuntu-2404/ Ubuntu 24.04 environmentTerminal
bashin GitHub Actions runner