feat: add failure_emitter — close the learning-loop failure-signal gap#8
Open
jessekemp1 wants to merge 1 commit into
Open
feat: add failure_emitter — close the learning-loop failure-signal gap#8jessekemp1 wants to merge 1 commit into
jessekemp1 wants to merge 1 commit into
Conversation
…ilure-signal gap The outcome stream records success/partial but nothing emits 'failed' entries from operational failures, so calibration and routing learn only from wins. Adds intelligence/failure_emitter.py: scans pytest lastfailed + alert/restart/scheduler artifacts under ~/.cortex and emits idempotent 'failed' outcomes via FeedbackLogger.log_outcome (its signature already supports outcome='failed'). Runs standalone or on a 5-min cron; degrades gracefully when sources are absent. Includes 11 tests.
Owner
Author
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.
Adds
intelligence/failure_emitter.py(+11 tests). Upstream's outcome stream supportsoutcome="failed"but nothing emits it from real operational failures (pytest lastfailed, alert/restart/scheduler artifacts), so calibration and routing learn only from wins. This idempotent emitter closes that gap — run standalone or on a 5-min cron; degrades gracefully when sources are absent. Verified: binds upstreamFeedbackLogger.log_outcome(9/9 kwargs match), tests 11/11 green againstmain. No config or API changes.