Package com.tnsai.evaluation.autoharness
Class DefaultFailureMiner
java.lang.Object
com.tnsai.evaluation.autoharness.DefaultFailureMiner
- All Implemented Interfaces:
FailureMiner
Thread-safe
FailureMiner that collects failures reported via
record(FailureRecord).
Designed to be wired as a listener on EvalHook onError events.
Callers push failures in; mine() returns the accumulated buffer.
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the internal failure buffer.mine()Mines failures accumulated since the last call (or since construction).voidrecord(FailureRecord failure) Records a failure into the mining buffer.voidRecords a failure from raw error information with context.voidRecords a failure from raw error information.intsize()Returns the current buffer size without copying.
-
Constructor Details
-
DefaultFailureMiner
public DefaultFailureMiner()
-
-
Method Details
-
record
Records a failure into the mining buffer. -
record
Records a failure from raw error information. -
record
public void record(String agentId, String phase, String errorType, String message, Map<String, String> context) Records a failure from raw error information with context. -
mine
Description copied from interface:FailureMinerMines failures accumulated since the last call (or since construction).- Specified by:
minein interfaceFailureMiner- Returns:
- unmodifiable list of mined failure records
-
clear
public void clear()Description copied from interface:FailureMinerClears the internal failure buffer. Called after successful processing.- Specified by:
clearin interfaceFailureMiner
-
size
public int size()Returns the current buffer size without copying.
-