Skip to content

[Refactor] Extract OpenCode harness timer and watchdog modules#72

Draft
roomote-roomote[bot] wants to merge 2 commits into
developfrom
refactor/opencode-harness-timers-2ycqu30xsveij
Draft

[Refactor] Extract OpenCode harness timer and watchdog modules#72
roomote-roomote[bot] wants to merge 2 commits into
developfrom
refactor/opencode-harness-timers-2ycqu30xsveij

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

Created by Roomote. Follow up by mentioning @roomote or in the web UI.

What changed

Pulled the growing timer/watchdog clusters out of OpenCodeServerHarness into focused helper modules:

  • subagent absolute + inactivity watchdogs
  • execute-tool progress heartbeats
  • stop-hook reminder stall fail-safe
  • resolved user-input request tracker

The harness still owns orchestration and the shared teardown funnel (execute progress clear → stop-hook clear → subagent clear, including keepBackgroundWatchdogs on 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.

roomote added 2 commits July 10, 2026 06:50
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.
@roomote-roomote

roomote-roomote Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant