[Refactor] Extract OpenCode stall and steer-pickup watchdogs from harness#240
Merged
mrubens merged 2 commits intoJul 12, 2026
Merged
Conversation
Contributor
Author
mrubens
approved these changes
Jul 12, 2026
8 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.
Related issue
Follow-up maintainability cleanup from the stalled-model-stream fix in #166. No separate GitHub issue.
Why this PR exists
What changed
Moved the OpenCode turn-stall and mid-turn steer-pickup timer subsystem out of the already-large
OpenCodeServerHarnessinto a focused companion module. The harness keeps recovery actions (enqueue/prioritize/abort, transcript notices, and dispose/teardown hooks) and only arms/clears/notes activity through the coordinator. Defaults, timeouts, and silence/progress semantics are unchanged.How it was tested
pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/worker exec vitest run src/sandbox-server/lib/harnesses/__tests__/opencode-server-stall-watchdogs.test.ts(10/10)pnpm lint:fast,pnpm check-types:fast,pnpm knipChecklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset