Skip to content

fix(fleet): slm-agent 404 heartbeat backoff + vnc target_path detection + optional-role health classification (#9965) - #10463

Merged
mrveiss merged 2 commits into
Dev_new_guifrom
issue-9965
Jun 22, 2026
Merged

mrveiss merged 2 commits into
Dev_new_guifrom
issue-9965

Conversation

@mrveiss

@mrveiss mrveiss commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Thinking Path

Fresh 2-node install showed degraded fleet health from two independent facets: (1) the VM slm-agent died after early-404 heartbeats (posted before its node row existed), and (2) the wizard flagged optional roles (vnc/docker/browser-service/tts-worker) as "missing" even though vnc was actually running — its registry entry had no target_path so role_detector.py skipped it.

What Changed

Facet 1 — agent resilience (slm/agent/agent.py + Ansible payload copy + autobot-slm-agent/agent.py):

  • _send_heartbeat_request now treats 404 as "registration pending" with bounded exponential backoff (5s→…→300s cap) instead of fatal; clears backoff + logs INFO on first 200.
  • run() loop body wrapped in try/except Exception (log + continue) so a transient error can't kill the daemon; sleep honours the backoff.

Facet 2 — role detection + health classification:

  • services/role_registry.py — gave vnc a real target_path (/usr/bin/Xtigervnc) so detection activates it (mirrors the feat(slm/roles): add canonical postgres + scheduler roles to role registry #9853 postgres fix).
  • autobot-slm-agent/role_detector.py — load_definitions guard now also keeps roles with a systemd_service (not just target_path), aligning with the canonical agent copy.
  • api/setup_wizard.py validate_fleet — only required=True roles count toward health=degraded; required=False inactive roles report in a new informational inactive_optional_roles field. Fail-safe defaults to required when the DB row is absent.

Verification

Caveat

Facet-1 exact crash path couldn't be confirmed without VM logs; the two most-likely causes (unhandled loop exception, no 404 handling) are addressed. If systemd WatchdogSec was the killer, unit-file tuning would be a separate follow-up.

Model Used

Claude Opus 4.8 (senior-backend-engineer subagent).

…ath detection + optional-role health classification (#9965)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

Applied Black, isort, and autoflake to match code-quality checks.
Triggered by workflow auto-fix-formatting.yml.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@mrveiss
mrveiss merged commit 5a5958e into Dev_new_gui Jun 22, 2026
1 check passed
@mrveiss
mrveiss deleted the issue-9965 branch June 22, 2026 15:25
mrveiss added a commit that referenced this pull request Jun 22, 2026
mrveiss added a commit that referenced this pull request Jun 22, 2026
…ns + graceful-degrade optional probes (#10466, #10460) (#10477)

* fix(health): repair model-optimizer/project-state/enterprise singletons + graceful-degrade llm_awareness/redis_service probes (#10466, #10460)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Auto-fix: code formatting

Applied Black, isort, and autoflake to match code-quality checks.
Triggered by workflow auto-fix-formatting.yml.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* fix(agent): remove stray unused _REG_BACKOFF_CAP local in __init__ (F841, regression from #9965/#10463)

* fix(agent): sync canonical agent.py to Ansible copy — resolve #1629 drift from the F841 fix

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
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