Skip to content

fix(agent): keep self-update off heartbeat path - #156

Merged
jmagar merged 2 commits into
mainfrom
fix/async-agent-updater
Aug 2, 2026
Merged

fix(agent): keep self-update off heartbeat path#156
jmagar merged 2 commits into
mainfrom
fix/async-agent-updater

Conversation

@jmagar

@jmagar jmagar commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • run agent self-update outside the 30-second heartbeat cadence
  • enforce single-flight updates so repeated directives cannot launch overlapping downloads
  • use a dedicated updater HTTP client with 10s connect and first-byte limits, 15s chunk-idle timeout, and 60s total deadline
  • stream downloads with a 128 MiB hard cap before SHA-256 verification and atomic installation
  • preserve the existing validation, rollback marker, and re-exec behavior

Why

A stalled agent binary download previously blocked the heartbeat loop and made healthy hosts appear silent. This keeps heartbeats flowing while update work is bounded independently.

Validation

  • cargo fmt --check
  • git diff --check
  • focused self-update suite: 14 passed, 0 failed
  • repository pre-commit hooks
  • repository pre-push contract, including clippy --all-targets --all-features --locked -D warnings

@jmagar
jmagar force-pushed the fix/async-agent-updater branch 2 times, most recently from ef60777 to 234fbf2 Compare August 2, 2026 06:13
@jmagar
jmagar force-pushed the fix/async-agent-updater branch from 234fbf2 to d9a6a6d Compare August 2, 2026 18:57
@jmagar
jmagar merged commit 35ce512 into main Aug 2, 2026
18 checks passed
@jmagar
jmagar deleted the fix/async-agent-updater branch August 2, 2026 19:05
jmagar added a commit that referenced this pull request Aug 2, 2026
Release Cortex 3.11.2, including the hardened non-blocking agent self-updater from PR #156.
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