Skip to content

feat: add optional Harness silence alerts to Thread watches - #783

Draft
ump45nose wants to merge 2 commits into
BytePioneer-AI:mainfrom
ump45nose:codex/upstream-thread-watch-stall
Draft

ump45nose wants to merge 2 commits into
BytePioneer-AI:mainfrom
ump45nose:codex/upstream-thread-watch-stall

Conversation

@ump45nose

@ump45nose ump45nose commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Add optional --stall-after-ms / MCP stallAfterMs to Thread watches. A running Thread that produces no observed Harness activity emits one advisory alert per silence episode while its watch remains active; new activity, including known descendants, resets the clock.

Activity and pending stall alerts stay in memory. Restarting restores the watch and its threshold, then starts a fresh silence interval. Closed native ancestors are retained only while open descendants still report through them. Persisted watch adoption reuses the Host filesystem lock per record so concurrent Hosts cannot both adopt it.

Validation: typecheck, lint, 173 focused tests across 10 watch/CLI/MCP/event/persistence/activity suites, and 32 adoption/restart tests passed.

CI passed Linux x64, Linux ARM64 and Windows. macOS failed the unchanged Web relay HTTP/2 test serves authenticated h2 RPC, compressed assets, uploads and live events on one relay connection with ERR_HTTP2_INVALID_SESSION. This PR changes neither Web Server nor Remote Relay. Retrying the failed job through the GitHub integration returned HTTP 403 (Resource not accessible by integration), so this PR remains a draft pending CI confirmation.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Co-authored-by: Cursor <cursoragent@cursor.com>
@ump45nose
ump45nose force-pushed the codex/upstream-thread-watch-stall branch from d1a230d to 179570b Compare November 10, 2026 06:37
Resolve the app-server-host registration conflict by wrapping the local
delegation API with sharedDelegationRegistration from main and keeping
this branch's subscribeActivity hook.
@ump45nose

Copy link
Copy Markdown
Contributor Author

Merged current main (1a239fdc, including #776 / #788) into this branch to clear the conflict. Head is now cc0080f5 (cc0080f5d29fd9f9e3fa0ebb277b88453a6699a9).

The only conflict was in packages/host-runtime/src/app-server-host.ts. The merge uses main's sharedDelegationRegistration wrapper and keeps this branch's subscribeActivity hook on the local registration (sharedDelegationRegistration already spreads the local object, so the hook is preserved).

Locally on this head: vitest run packages/host-runtime/test/app-server-host.watch.test.ts packages/host-runtime/test/delegation-control-registry.test.ts is 29 passed; 0 failed.

(AI-assisted reply.)

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