Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
0f41162 to
14d27d8
Compare
opencode update skipped an available update on Windows when a package manager was slow to answer. Each probe had a fixed 10 second budget and a probe that timed out was folded into the same empty result as a probe that found nothing, so the failure left no trace. Probes now get 30 seconds on Windows, and every probe outcome (matched, exit code, or the failure detail) is logged when no method is detected. evaluateProbes holds the selection and the report so both are unit tested.
14d27d8 to
077fa1e
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Fixes #51604
Type of change
What does this PR do?
opencode updateskipped an available update with "installation method not found" on a Windows npm install. Detection runs five package-manager probes concurrently and every probe had a fixed 10 second budget; a probe that timed out was folded into the same empty result as a probe that found nothing:So a slow probe was indistinguishable from "not installed", detection returned no method, and the only trace was
update skipped: installation method not found. The timings in the report line up with this: five probes start together, the run gives up about eleven seconds later, and an immediate retry completes the same five probes in about two seconds.Two changes:
evaluateProbesholds the selection and the report, so both are unit tested.I cannot prove the timeout is the whole story: I could not reproduce the slow probe, and
npm list -g --depth=0 @opencode/clianswers in about 1.5 seconds on my machine. The logging is what will confirm it — the next occurrence will say which probe missed and whether it timed out. That is the part of the report I could act on with evidence; the longer budget is the part the report explicitly suggested.How did you verify your code works?
bun test src/services/updater.test.tsfrompackages/cli— 16 pass, including four newevaluateProbestests (first match wins, a probe that never produced output is not selected, Vite+ requires an exact name instead of a substring, and the report lists exit codes when nothing matches).Export named 'evaluateProbes' not found).bun typecheckfrompackages/cli— clean.bun run checkfrom the repository root fails at@opencode/app#typecheckwithsrc/custom-elements.d.ts(1,1): error TS1128, which is pre-existing on this Windows checkout and untouched here.packages/cliitself passes.Two pre-existing failures I want to be explicit about, both confirmed on a clean tree with this change stashed:
packages/cli/test/upgrade.test.tsand theacp * subprocesstests time out at their 5 second budget on this machine, because booting the CLI as a subprocess is slower than that here. They are not related to this change.Screenshots / recordings
Not a UI change.
Checklist