Skip to content

fix(kanban): fingerprint crash errors to prevent fleet-wide retry exhaustion - #24023

Closed
bradhallett wants to merge 1 commit into
NousResearch:mainfrom
bradhallett:fix/kanban-crash-fingerprint-grouping
Closed

fix(kanban): fingerprint crash errors to prevent fleet-wide retry exhaustion#24023
bradhallett wants to merge 1 commit into
NousResearch:mainfrom
bradhallett:fix/kanban-crash-fingerprint-grouping

Conversation

@bradhallett

Copy link
Copy Markdown
Contributor

What does this PR do?

When a systemic failure (provider outage, auth expiry, OOM) crashes multiple workers simultaneously, detect_crashed_workers increments each task's failure counter independently. The circuit breaker only trips after N × failure_limit retries across the entire fleet. This is fleet-wide retry exhaustion.

Related Issue

No existing issue — discovered during operational review.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✅ Tests (adding test coverage)

Changes Made

  • hermes_cli/kanban_db.py — Added _error_fingerprint() helper that normalizes crash errors (strips PIDs, timestamps). When 3+ tasks crash with the same fingerprint in a single detection cycle, the circuit breaker trips immediately (failure_limit=1) instead of waiting for repeated failures.
  • tests/hermes_cli/test_kanban_db.py — Added two regression tests:
    • test_detect_crashed_workers_systemic_failure_fast_block — 4 tasks with same error → all auto-blocked
    • test_detect_crashed_workers_isolated_failure_normal_retry — 2 tasks (below threshold) → normal retry budget

How to Test

python -m pytest tests/hermes_cli/test_kanban_db.py -q -k "crash or systemic or isolated"
2 passed, 82 deselected in 0.47s

Checklist

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs — no duplicates found
  • My PR contains only changes related to this fix
  • I've run tests and they pass
  • I've added tests for my changes
  • Tested on macOS 15

…austion

When a systemic failure (provider outage, auth expiry, OOM) crashes
multiple workers simultaneously, detect_crashed_workers increments
each task failure counter independently. The circuit breaker only
trips after N × failure_limit retries across the fleet.

Fingerprint crash errors by normalizing host-specific details (PIDs,
timestamps). When 3+ tasks crash with the same fingerprint in a
single detection cycle, immediately trip the circuit breaker
(failure_limit=1) instead of waiting for repeated failures.

Isolated crashes (unique fingerprints) retain their normal retry
budget. Protocol violations continue to trip immediately.

Includes regression tests for systemic and isolated crash paths.
@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have labels May 11, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #28380 (cherry-picked onto current main with your authorship preserved via rebase-merge — commit de9bcfc). Thanks for the contribution!

@teknium1 teknium1 closed this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants