Repository navigation
fix(v2): stop lease checks and failed setups from destabilizing the host - #83
Merged
Merged
Conversation
Skip the kill(pid, 0) liveness probe for the host's own pid, dispose everything a partially failed OpenCode 2 setup started, and unify Windows path separators when keying same-location instances. Refs #81 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #81
The reporter's OpenCode service died silently on Windows with 0.11.0 installed. There's no deterministic repro, so these are defensive fixes for the likeliest causes found in review. They are not a confirmed root-cause fix.
Changes
src/persistence-lease.js). The lease check probes owners withprocess.kill(pid, 0). If Bun on Windows maps signal 0 to a real termination, a check against the service's own claim kills it with no log, which matches the report. Behavior on POSIX is unchanged (the own PID already counted as alive).src/v2-bridge.js). A setup that threw partway used to leak its event subscription, timers, hook registrations and the core's persistence lease on each location boot. Teardown now lives indisposeInstanceand also runs on failure. The next boot of the same location still starts cleanly./and\, so a reload with a differently spelled path retires the previous instance instead of running next to it.Verification
mainand passes here.npm run release:check: exit 0 (493 tests, mutation 90/90, type/packed contracts, smoke, audit 0 vulns).smoke:v2-hostagainst OpenCode 2.0.16: passes, same asmain.Not verified
process.kill(pid, 0)on it, and see whether it survives.main(completion audit). That's fixed separately in thewr/v2-2.0.26-audit-verdictPR.🤖 Generated with Claude Code