Repository navigation
fix(fleet): slm-agent 404 heartbeat backoff + vnc target_path detection + optional-role health classification (#9965) - #10463
Merged
Merged
Conversation
…ath detection + optional-role health classification (#9965) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
10 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_pathsorole_detector.pyskipped it.What Changed
Facet 1 — agent resilience (
slm/agent/agent.py+ Ansible payload copy +autobot-slm-agent/agent.py):_send_heartbeat_requestnow 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 intry/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— gavevnca realtarget_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_definitionsguard now also keeps roles with asystemd_service(not justtarget_path), aligning with the canonical agent copy.api/setup_wizard.py validate_fleet— onlyrequired=Trueroles count towardhealth=degraded;required=Falseinactive roles report in a new informationalinactive_optional_rolesfield. Fail-safe defaults to required when the DB row is absent.Verification
tests/services/test_role_registry.py→ 14/14 (3 new: vnc target_path, vnc in defs, optional-not-required).slm/agent/tests → 26/28 (2 pre-existing failures unrelated: notification_service path conflict).py_compileclean on all 8 changed files.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
WatchdogSecwas the killer, unit-file tuning would be a separate follow-up.Model Used
Claude Opus 4.8 (senior-backend-engineer subagent).