[Refactor] Extract OpenCode harness timer and watchdog modules#72
Draft
roomote-roomote[bot] wants to merge 2 commits into
Draft
[Refactor] Extract OpenCode harness timer and watchdog modules#72roomote-roomote[bot] wants to merge 2 commits into
roomote-roomote[bot] wants to merge 2 commits into
Conversation
Move subagent watchdogs, execute-tool progress heartbeats, stop-hook reminder stall, and resolved user-input tracking out of OpenCodeServerHarness while preserving teardown funnel identity and runtime semantics.
Keep module-internal types and helper functions unexported so pre-push knip does not fail on the timer extraction.
Contributor
Author
|
No code issues found. See task |
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.
What changed
Pulled the growing timer/watchdog clusters out of
OpenCodeServerHarnessinto focused helper modules:The harness still owns orchestration and the shared teardown funnel (execute progress clear → stop-hook clear → subagent clear, including
keepBackgroundWatchdogson turn finish). Runtime semantics are unchanged.Why this change was made
Recent turn/phase and cancel work kept bolting more parallel stall and watchdog timers into the same ~3900-line harness class. Moving cohesive timer ownership behind the harness makes cancel/watchdog fixes safer and less prone to ad-hoc teardown drift.
Impact
No intentional user-visible behavior change. Maintainers get smaller, focused timer modules and a harness that only wires config, callbacks, and lifecycle; expiry, sibling exclusion, progress heartbeats, and stop-hook stall paths keep their existing test coverage.