feat: add evidence-bound failure curation - #31
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
|
Follow-up pushed in Addressed all three simplification findings:
Also addressed the completed review findings:
Net follow-up diff: 78 additions, 142 deletions (-64 lines). Local verification: Ruff clean; strict mypy clean; 200 passed, 2 skipped; 95.28% total coverage; failure curation 97%; changed functions complexity A with maximum 5; skill and plugin validation passed. GitHub Actions quality check is green. |
There was a problem hiding this comment.
1 issue found across 10 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/ofw/evaluation/failure_curation.py">
<violation number="1" location="src/ofw/evaluation/failure_curation.py:18">
P3: This hardening anchors the artifact-ID regex only in failure_curation.py; failure_workspace.py:43 keeps the identical _ARTIFACT_ID_PATTERN unanchored, used to validate artifact_id at lines 149 and 157. The two modules now enforce different rules on the same artifact IDs (the workspace accepts IDs with surrounding junk that curation rejects). Extract the pattern to one shared constant (e.g. in ofw.contracts) and use it in both modules, or apply the same anchors to both copies, so the pipeline validates consistently.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| from ofw.evaluation.outcome import TaskId | ||
| from ofw.observability.langfuse.domain import ObservationId, ScoreId, TraceId | ||
|
|
||
| _ARTIFACT_ID_PATTERN = r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" |
There was a problem hiding this comment.
P3: This hardening anchors the artifact-ID regex only in failure_curation.py; failure_workspace.py:43 keeps the identical _ARTIFACT_ID_PATTERN unanchored, used to validate artifact_id at lines 149 and 157. The two modules now enforce different rules on the same artifact IDs (the workspace accepts IDs with surrounding junk that curation rejects). Extract the pattern to one shared constant (e.g. in ofw.contracts) and use it in both modules, or apply the same anchors to both copies, so the pipeline validates consistently.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/ofw/evaluation/failure_curation.py, line 18:
<comment>This hardening anchors the artifact-ID regex only in failure_curation.py; failure_workspace.py:43 keeps the identical _ARTIFACT_ID_PATTERN unanchored, used to validate artifact_id at lines 149 and 157. The two modules now enforce different rules on the same artifact IDs (the workspace accepts IDs with surrounding junk that curation rejects). Extract the pattern to one shared constant (e.g. in ofw.contracts) and use it in both modules, or apply the same anchors to both copies, so the pipeline validates consistently.</comment>
<file context>
@@ -15,7 +15,7 @@
from ofw.observability.langfuse.domain import ObservationId, ScoreId, TraceId
-_ARTIFACT_ID_PATTERN = r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
+_ARTIFACT_ID_PATTERN = r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
_PATTERN_KEY_PATTERN = r"[a-z0-9]+(?:-[a-z0-9]+)*"
_TEXT_PATTERN = r"[^\x00]+"
</file context>
5fa1c54 to
4b49cba
Compare
Context
Rebased onto
freshafter #30. The base now provides deterministic exact pattern mining; this PR adds the separate evidence-bound curation step before harness hypotheses.Summary
.workspace/failure-curations/record_failure_curationaftermine_failure_patternsand route the ITSM program through a$failure-curatorcross-task debugger passReference behavior
Non-goals
Rebase resolution
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 46 source filesuv run pytest --cov=ofw --cov-report=term-missing --cov-fail-under=90 -q: 217 passed, 2 skipped, 95.24% total coverageAll verification above is local evidence, not CI evidence.
Risk / follow-up
Pattern semantics remain agent-authored. Deterministic checks enforce evidence lineage, complete partitioning, failure-type consistency, and distinct-task recurrence without pretending to verify semantic similarity.