Repository navigation
Conversation
ensure() treated any registered service answering 500 as fatal, so a boot failure left by an earlier run blocked every later start until someone ran 'opencode service stop'. A failure this call started is still reported once; a failure already registered before this call starts a contender is now terminated and replaced. Applies to the Effect and Promise clients.
Contributor
|
Thanks for picking this up, and for the clear write-up and tests. I think this duplicates #55311, which fixes the same stuck state in the same Your version replaces the failed service on the next start instead. If you think that behaves better (for example, not showing the error once after an earlier run left a failed service behind), it would help to say so on #55311, or to test it there against the reproduction in #62326. |
3 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #62326
Type of change
What does this PR do?
ensure()treated a registered service that answers/api/infowith 500 as fatal. A boot that fails after registering therefore leaves a process that blocks every later start withBackground service failed to start, until someone runsopencode service stop— the state in #62326 and in the triager's reproduction.The two situations are now separate:
The registration and handoff contracts are unchanged. The Effect and Promise clients are updated together.
How did you verify your code works?
onStartreportsmissing. A service that fails during this call still rejects withBackground service failed to start.bun test test/service.test.ts test/promise-service.test.tsinpackages/client: 43 pass, 4 platform skips, 0 fail.bun run typecheck:tscinpackages/clientandpackages/cli, plus oxlint on the four changed files.Visual
Checklist