Skip to content

fix(agent): detect half-open agent event streams - #1405

Closed
scttbnsn wants to merge 2 commits into
dev/v1.8from
fix/v1.8-agent-sse-watchdog
Closed

scttbnsn wants to merge 2 commits into
dev/v1.8from
fix/v1.8-agent-sse-watchdog

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

Fixes DR-86. A controller-to-agent event stream that dies silently (half-open) left the agent marked connected until something else failed.

The agent now writes an SSE comment heartbeat (: heartbeat) every 15s. The controller arms a watchdog on the first heartbeat it sees on a stream. After that, 45s without any bytes destroys the stream, logs a warning and goes through the normal disconnect and reconnect path. Agents that never send a heartbeat (older than 1.8.1) never arm it, and older controllers ignore the comment line.

Held for 1.8.1. Do not merge before the v1.8 GA.

Portwing edge agents use a different transport and are out of scope. They may have the same gap; not checked here.

The agent now writes an SSE comment heartbeat every 15s. Once a stream has delivered one, the controller destroys it and reconnects after 45s of silence. Agents that never send a heartbeat are never torn down.
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
drydock-website Ready Ready Preview Oct 19, 2026 4:43pm UTC
drydockdemo-website Ready Ready Preview Oct 19, 2026 4:43pm UTC

@coderabbitai

coderabbitai Bot commented Oct 19, 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

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

scttbnsn added a commit that referenced this pull request Oct 20, 2026
* fix(agent): detect half-open agent event streams (#1405)

* fix(compose): fill the operation record like the Docker action (#1406)

* fix(watcher): don't hold update results for release notes (#1409)

* perf(store): use the stats projection for counts (#1411)

* fix(store): keep a retained policy with the replacement on local renames (#1412)

* fix(api): build the dependency graph from the listed containers (#1419)

* fix(agent): tell Portwing timeouts apart from unreachable agents (#1422)

* feat(api): include versions in update-operation-changed events (#1427)

* feat(notifications): show why a notification was skipped (#1429)

* docs(changelog): sort the batch B entries into their sections
@scttbnsn

Copy link
Copy Markdown
Contributor Author

Landed in #1433 as part of folding the reviewed 1.8 work into 1.8.0.

@scttbnsn scttbnsn closed this Oct 20, 2026
@scttbnsn
scttbnsn deleted the fix/v1.8-agent-sse-watchdog branch October 20, 2026 13:28

This branch was successfully deployed

2 active deployments
Preview – drydock-website — caa580a2 Deployed Oct 19, 2026 by vercel[bot]
Preview – drydockdemo-website — caa580a2 Deployed Oct 19, 2026 by vercel[bot]
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