pub struct ParsingTraceLog {
pub attempt_number: usize,
pub agent: String,
pub strategy: String,
pub raw_output: Option<String>,
pub steps: Vec<ParsingTraceStep>,
pub final_message: Option<String>,
pub timestamp: DateTime<Local>,
}Expand description
Detailed parsing trace log for commit message extraction.
This log captures each step of the extraction process, showing:
- What extraction method was tried (XML, JSON, pattern-based)
- The exact content being processed at each step
- Validation results and why they passed/failed
- The final extracted message
This is separate from the attempt log and written to parsing_trace.log.
Fields§
§attempt_number: usizeAttempt number this trace belongs to
agent: StringAgent that generated the output
strategy: StringStrategy used
raw_output: Option<String>Raw output from the agent
steps: Vec<ParsingTraceStep>Individual parsing steps
final_message: Option<String>Final extracted message (if any)
timestamp: DateTime<Local>Timestamp when trace started
Implementations§
Source§impl ParsingTraceLog
impl ParsingTraceLog
Sourcepub fn new(attempt_number: usize, agent: &str, strategy: &str) -> Self
pub fn new(attempt_number: usize, agent: &str, strategy: &str) -> Self
Create a new parsing trace log.
Sourcepub fn with_raw_output(self, output: &str) -> Self
pub fn with_raw_output(self, output: &str) -> Self
Set the raw output from the agent (consuming builder).
Sourcepub fn add_step(self, step: ParsingTraceStep) -> Self
pub fn add_step(self, step: ParsingTraceStep) -> Self
Add a parsing step to the trace.
Sourcepub fn with_final_message(self, message: &str) -> Self
pub fn with_final_message(self, message: &str) -> Self
Set the final extracted message (consuming builder).
Sourcepub fn write_to_workspace(
&self,
log_dir: &Path,
workspace: &dyn Workspace,
) -> Result<PathBuf>
pub fn write_to_workspace( &self, log_dir: &Path, workspace: &dyn Workspace, ) -> Result<PathBuf>
Write this trace to a file using workspace abstraction.
This is the architecture-conformant version that uses the workspace trait instead of direct filesystem access.
§Arguments
log_dir- Directory to write the trace file to (relative to workspace)workspace- The workspace to use for filesystem operations
§Returns
Path to the written trace file on success.
§Errors
Returns error if the operation fails.
Trait Implementations§
Source§impl Clone for ParsingTraceLog
impl Clone for ParsingTraceLog
Source§fn clone(&self) -> ParsingTraceLog
fn clone(&self) -> ParsingTraceLog
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ParsingTraceLog
impl RefUnwindSafe for ParsingTraceLog
impl Send for ParsingTraceLog
impl Sync for ParsingTraceLog
impl Unpin for ParsingTraceLog
impl UnsafeUnpin for ParsingTraceLog
impl UnwindSafe for ParsingTraceLog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more