Skip to content

Make Harness run lifecycle resilient - #240

Merged
actus7 merged 1 commit into
mainfrom
agent/resilient-harness-run-lifecycle
Aug 20, 2026
Merged

Make Harness run lifecycle resilient#240
actus7 merged 1 commit into
mainfrom
agent/resilient-harness-run-lifecycle

Conversation

@actus7

@actus7 actus7 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • reconcile orphaned root runs after an expired worker lease before accepting a new turn
  • heartbeat active workers, reconnect interrupted streams, replay durable output, and cancel runs server-side
  • prevent stale UI generations from racing with newer sends and show actionable structured conflicts
  • contain Mermaid parse failures inside the Canvas error panel instead of leaking raw SVG errors into the page

Root cause

The chat treated a prematurely closed Harness stream with status running as a successful completion. The database run remained active, so the next turn received Conversation already has active run. Stop/navigation only aborted the browser request and could leave the server worker orphaned.

Validation

  • pnpm exec vitest run — 477 passed, 1 skipped
  • pnpm typecheck
  • pnpm lint — 0 errors (one pre-existing warning under .remember/tmp)
  • pnpm build
  • local browser test against the affected conversation: new run completed, immediate stop produced database status cancelled with no remaining lease, no console errors
  • invalid Mermaid Canvas: scoped fallback remained visible and no body-level parser output leaked into the layout

Copilot AI lite review requested due to automatic review settings August 20, 2026 14:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modelhub Ready Ready Preview Aug 20, 2026 2:59pm

@github-actions github-actions Bot added frontend Frontend changes backend Backend changes tests Test changes labels Aug 20, 2026
@actus7
actus7 merged commit 63c86f9 into main Aug 20, 2026
12 checks passed
@actus7
actus7 deleted the agent/resilient-harness-run-lifecycle branch August 20, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend changes frontend Frontend changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants