[codex] add exact failure pattern mining - #30
Merged
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 17 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
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.
Context
Builds on #27 and #28, which introduced the authoritative
FailureDiagnosiscontract and one immutable local diagnosis artifact per failed outcome.Summary
mine_failure_patternsmodule and read-only MCP tool over one to fifty explicit diagnosis artifact IDs$failure-pattern-miner, route ITSM runs through it after individual diagnoses, and bump the plugin/package to 0.6.0Architecture
MCP input -> FailurePatternMiningService -> FailureArtifactReader -> FileFailureWorkspace -> typed pattern observationThe service depends on a narrow reader interface. The file adapter performs bounded no-follow reads and immediately reconstructs
FailureDiagnosisobjects, so malformed or semantically inconsistent artifacts fail closed before reduction.Non-goals
Local verification
uv run ruff check src tests plugins/openflywheel/scripts/mcp_server.py: cleanuv run mypy src tests plugins/openflywheel/scripts/mcp_server.py: clean across 44 source filesuv run pytest --cov=ofw --cov-report=term-missing --cov-fail-under=90 -q: 188 passed, 2 skipped, 95.24% coverageAll verification above is local evidence, not CI evidence.
Known limitation
This intentionally performs deterministic exact bucketing after normalization. Paraphrased causes may remain separate, and a shared fingerprint does not prove that one repair applies to every occurrence. The skill requires rereading supporting diagnoses before forming a shared hypothesis.
Summary by cubic
OpenFlyWheel previously recorded individual failure diagnoses; it now mines bounded exact patterns from selected diagnosis artifacts, making recurring causes easier to prioritize without scanning workspaces or copying trace data. Reads fail closed for invalid IDs, malformed or oversized artifacts, and non-regular files.
mine_failure_patternsaccepts 1–50 unique artifact IDs from an explicit scope.$failure-pattern-miner, routes ITSM templates through it after diagnosis recording, and bumps the package and plugin to 0.6.0 with a pinned portable runtime.Written for commit f3f3cfe. Summary will update on new commits.