Repository navigation
ci: [debug, do not merge] find why webfetch and workspace-sync tests hang on CI - #1871
RaghwendraSingh wants to merge 3 commits into
Conversation
…s hang on CI Debug only, not for merge. Runs the two hanging test groups alone and inside their shards, and prints the test process's sockets, open files and syscalls whenever test output stops for 45 seconds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Run 1 showed the stuck test process holding dozens of connections to the npm registry and writing `~/.npm/_cacache` while no test made progress. This run lists the packages fetched, and runs shard 3 with and without `test/tool/registry.test.ts` to confirm where the installs start. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…n installs Run 2 confirmed the cause: tests that write a tool or plugin file into a config dir make the app start an `npm install` of `@opencode-ai/plugin` there, in the test process and not awaited. Shard 3 passes with `test/tool/registry.test.ts` left out and fetches nothing from npm. Candidate fix under test here: - `ConfigPlugin.shouldInstallDependencies` returns false when `ALTIMATE_DISABLE_DEPENDENCY_INSTALL=1`; `test/preload.ts` sets it. - The config and TUI tests that check when an install is requested clear it; they use a recording installer and never reach the network. The debug workflow now runs all four shards with the npm-request report. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Closing: the cause was found here and fixed in #1872, which is merged. The tests started real in-process npm installs of the plugin package that outlived the test and starved the test process. This branch only held the debug workflow and script. |
Do not merge: temporary CI debugging
Purpose. Find why CI has been red on
mainand every PR since about 06:44 UTC on 2026-12-01. This PR will be closed and its branch deleted once the cause is known. It changes no product code.The problem. On the CI runners, the first two tests of
test/tool/webfetch.test.tsand several workspace-sync tests (test/altimate/workspace/sync-state.test.ts,test/control-plane/workspace.test.ts) hang for minutes, far past the 90-second test timeout. The shard then fails, or the runner is shut down mid-job (exit 137/143). The code, runner image and Bun version are the same as in the passing runs of the day before, and the same files pass locally on macOS.What this PR adds.
.github/workflows/debug-test-hang.yml: a workflow that runs only for this branch. It runs the two test groups alone and inside their shards (2 and 3), with the same setup as theTypeScriptjob.script/github/debug-test-hang.sh: whenever test output stops for 45 seconds, it prints the process tree, the test process's sockets and open files, and its system calls.Review. No review needed. Review bots can ignore this PR.
🤖 Generated with Claude Code
Summary by cubic
Temporary, do-not-merge CI debugging PR: run stalled on
mainand every PR since 2026-12-01 whentest/tool/webfetch.test.tsand several workspace-sync tests hang past the 90-second timeout, then fail the shard or get killed (exit 137/143). The diagnosis is confirmed: tests that write a tool or plugin file into a config dir make the app start a realnpm installof@opencode-ai/plugininside the test process, and that install is never awaited, so it outlives the test and starves the event loop.ConfigPlugin.shouldInstallDependenciesreturns false whenALTIMATE_DISABLE_DEPENDENCY_INSTALL=1, whichtest/preload.tssets; the config and TUI tests that check when an install is requested clear it and use a recording installer that never reaches the network.Written for commit 83895fc. Summary will update on new commits.