feat: fabric stability engine + LLM-as-Judge playbook scoring (v0.4.0)#13
Merged
Merged
Conversation
Builds the real version of the 'Phase 12' feature set (previously described only in an unexported chat session), natively on main and verified: - stability.py: per-device flap detection (interface/BGP/OSPF/LAG/VPN down-up oscillation), event-rate burst detection against each device's own baseline, rising/stable/falling trend, deterministic 24h risk band. Wired into analyze()'s single streaming pass (O(devices x entities) memory, minute-prefix bucketing tolerant of unreliable timestamps), exposed as 'stability' in /api/analyze + MCP, rendered as a Fabric Stability panel in the UI with recommendations. - judge.py + 'ai-log-analyzer eval': scores playbooks 0-10 on actionability/safety/grounding/completeness. Heuristic core (empty playbooks can't ace safety by absence; disruptive commands without context penalized; placeholder hostnames hurt grounding); optional --use-llm blend with silent fallback; --min-score CI gate; KB self-test by default (scores all 41 actionable rule playbooks). Suite 325 -> 338 tests. Version 0.3.1 -> 0.4.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XM7j9iDXYwSvjnxZYjzaq
gesh75
marked this pull request as ready for review
July 13, 2026 15:46
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.
Why
Builds the real, verified version of the "Phase 12" feature set that previously existed only as text in an unexported chat session — implemented natively on current
mainso it composes with the streaming pipeline, sanitize gate, and template miner already there.📶 Fabric stability engine (
stability.py)Classified events tell you what broke; this tells you what keeps breaking:
analyze()'s single streaming pass: O(devices × entity classes) memory, minute-prefix bucketing with arrival-order fallback (network syslog timestamps are unreliable and sometimes absent).stabilityin/api/analyze+ MCPanalyze_logs, and as a Fabric Stability UI panel (worst devices first, plain-language recommendations).⚖️ LLM-as-Judge playbook scoring (
judge.py+ai-log-analyzer eval)The product's core output is LLM/KB-generated remediation playbooks — nothing measured their quality until now:
--use-llmblends a real LLM judge through the configured provider chain with silent fallback.ai-log-analyzer evalself-tests all 41 actionable KB playbooks by default (currently 9.8/10 overall — the quality floor with the LLM off), scores a saved/api/analyzeresult with--file, and--min-score Nturns it into a CI quality gate.Version
0.3.1 → 0.4.0 (this plus the merged PR #12 feature set makes an honest minor release; the CHANGELOG
Unreleasedsection is now the 0.4.0 entry).Tests
325 → 338 passed (2 skipped), ruff clean. New coverage: flap/burst/trend/risk scoring, bounded-memory guarantee, analyze integration, judge scoring semantics (good vs empty, disruptive-command penalty, placeholder penalty), LLM-blend fallback + merge, and both
evalCLI paths including the CI gate.🤖 Generated with Claude Code
https://claude.ai/code/session_015XM7j9iDXYwSvjnxZYjzaq
Generated by Claude Code