Skip to content

fix(skill-health): detect critical-incident recovery without waiting on lifetime success_rate - #1018

Merged
aaronjmars merged 2 commits into
aeonfun:mainfrom
Svector-anu:fix/skill-health-recovery-2026-09-03
Sep 3, 2026
Merged

aaronjmars merged 2 commits into
aeonfun:mainfrom
Svector-anu:fix/skill-health-recovery-2026-09-03

Conversation

@Svector-anu

Copy link
Copy Markdown
Collaborator

what

a critical skill-health issue only auto-resolves once the skill's classification clears CRITICAL/DEGRADED/WARNING — which is gated on lifetime success_rate. so a skill that recovers cleanly (several straight successful runs) can still sit "unhealthy" and its issue can stay open for a long stretch of history to age out of the average, even though the specific incident is long over.

fix

scripts/skill_health_recovery.py: a small, independently-tested, fail-closed check. a run newer than the issue's detected_at, with last_status=success and consecutive_failures=0, proves that specific incident recovered — regardless of what the lifetime average still says.

wired into skill-health's issue-resolution step, deliberately scoped narrow:

invalid or missing state/timestamps fail closed (active, never a false recovery).

tests

scripts/tests/test_skill_health_recovery.py — 5 cases: recovery ignores lifetime success_rate, a success before the incident's detected_at doesn't resolve it, an in-flight dispatched status waits for the actual outcome, invalid/missing timestamps fail closed, and the CLI's stdin→stdout contract. wired into ci-tests.yml alongside the other health-suite steps.

https://claude.ai/code/session_01SbipDt7VmuDvosRPS8AfEx

Svector-anu and others added 2 commits September 3, 2026 04:47
…on lifetime success_rate

a critical issue's HEALTHY-driven auto-resolve only fires once the
skill's classification clears CRITICAL/DEGRADED/WARNING, which is
gated on lifetime success_rate — so a skill that recovers with several
straight clean runs can sit "still unhealthy" and its issue stays
open for a long stretch of history to age out of the average, even
though the specific incident is long over.

add skill_health_recovery.py: a small, fail-closed, independently
tested check — a run newer than the issue's detected_at with
last_status=success and consecutive_failures=0 proves that incident
recovered, regardless of what the lifetime average says. wired into
skill-health's issue-resolution step, scoped narrowly: only status:
open critical issues (flapping/high still need real flap-free time to
prove recovery, and fix-pending issues already have their own
reconcile step above this one).

Claude-Session: https://claude.ai/code/session_01SbipDt7VmuDvosRPS8AfEx
skill_health_recovery.py fails closed (prints active) on a naive
detected_at, silently reverting to the slow lifetime success_rate path.
The issue template gave no timezone hint, so an agent-written naive stamp
would no-op the recovery shortcut. Pin the template to UTC Z.

Co-Authored-By: Svector-anu <svector.anu@users.noreply.github.com>
@aaronjmars
aaronjmars merged commit f3b3b29 into aeonfun:main Sep 3, 2026
5 checks passed
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.

2 participants