Package com.tnsai.evaluation.autoharness
Record Class FailureRecord
java.lang.Object
java.lang.Record
com.tnsai.evaluation.autoharness.FailureRecord
- Record Components:
agentId- identifier of the agent that failedphase- lifecycle phase where the failure occurrederrorType- fully-qualified class name of the error (e.g. "java.lang.NullPointerException")message- human-readable error descriptiontimestamp- when the failure was observedcontext- additional key-value context (input, trace id, etc.)
public record FailureRecord(String agentId, String phase, String errorType, String message, Instant timestamp, Map<String,String> context)
extends Record
Captures a single agent failure from an execution trace.
Immutable record used as input to the failure mining and clustering pipeline.
The phase field indicates where in the agent lifecycle the failure occurred
(e.g. "planning", "tool_execution", "response_generation").
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorTyperecord component.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.static FailureRecordConvenience factory with explicit error info.static FailureRecordConvenience factory for the common case.phase()Returns the value of thephaserecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FailureRecord
public FailureRecord(String agentId, String phase, String errorType, String message, Instant timestamp, Map<String, String> context) Creates an instance of aFailureRecordrecord class.- Parameters:
agentId- the value for theagentIdrecord componentphase- the value for thephaserecord componenterrorType- the value for theerrorTyperecord componentmessage- the value for themessagerecord componenttimestamp- the value for thetimestamprecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
of
Convenience factory for the common case. -
of
Convenience factory with explicit error info. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
phase
Returns the value of thephaserecord component.- Returns:
- the value of the
phaserecord component
-
errorType
Returns the value of theerrorTyperecord component.- Returns:
- the value of the
errorTyperecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-