Skip to content

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

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

ump45nose wants to merge 8 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

@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.)

ump45nose and others added 6 commits November 20, 2026 22:12
Keep the current readable Model ID help and retain the stall watch option.
Keeps the Thread watch silence alerts mergeable with current main; the Host
Runtime, delegation CLI and external client files merged without conflicts.

tsc -b, eslint and the external client event/MCP tests pass on the merged tree.
@iruriQ

iruriQ commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

感谢前期的草稿探索!由于该可选静默告警草稿改动面偏重(31 个文件、1,200+ 行)且近期未继续推进,目前暂不计划纳入该能力,先协助致谢关闭。后续如有更轻量的需求随时欢迎新开讨论!

@iruriQ iruriQ closed this Nov 23, 2026
ump45nose added a commit to ump45nose/codex-host that referenced this pull request Nov 27, 2026
Eleven manifest lines still carried fork copies of changes that upstream has
already released. Each one names a merged PR whose head commit is an ancestor
of v0.28.2, so the line only re-applies the pre-review copy of code that the
release tag already contains, and that duplication is what turns the manifest
replay into conflicts.

Removed lines and their merged PRs:

- thin/cursor-fast-selection (BytePioneer-AI#782)
- thin/delegation-inspect-fast-models (BytePioneer-AI#986)
- thin/delegation-catalog-parent (BytePioneer-AI#970)
- thin/settings-hide-desktop-envs (BytePioneer-AI#972)
- thin/settle-turns-after-session-fault (BytePioneer-AI#969)
- thin/external-thread-turn-recency (BytePioneer-AI#973)
- thin/claude-code-todo-tools (BytePioneer-AI#976)
- thin/reasoning-summary-parts (BytePioneer-AI#967)
- thin/shared-archived-thread-revival (BytePioneer-AI#988)
- fix/desktop-mcp-session-reap-v0.22 (BytePioneer-AI#981)
- fix/macos-descriptor-mode (BytePioneer-AI#1004)

For the two lines whose comments noted that the fork copy predated the PR's
review changes (BytePioneer-AI#969, BytePioneer-AI#976), the reviewed upstream version replaces it.

Checked with `scripts/vincent-release.sh audit` (ancestor and patch-cherry
checks) and by replaying the manifest onto v0.28.2 in a scratch worktree: these
eleven lines no longer merge, and the fifteen remaining lines are fork-only
changes that need re-cutting from the new tag.

Lines for fork-only additions are untouched: the extras documented for BytePioneer-AI#470,
BytePioneer-AI#987 and BytePioneer-AI#989 stay, and the lines for the closed PRs BytePioneer-AI#576, BytePioneer-AI#783, BytePioneer-AI#784, BytePioneer-AI#785 and
BytePioneer-AI#396 stay.
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.

2 participants