Expand description
DECY-193: Decision tracing / flight recorder for transpilation.
Provides a JSON audit trail of all decisions made during transpilation, including ownership inference, type mapping, and code generation choices.
§Examples
use decy_core::trace::{TraceCollector, TraceEntry, DecisionType, PipelineStage};
let mut collector = TraceCollector::new();
collector.record(TraceEntry {
stage: PipelineStage::OwnershipInference,
source_location: Some("line 10".to_string()),
decision_type: DecisionType::PointerClassification,
chosen: "Box<i32>".to_string(),
alternatives: vec!["&i32".to_string(), "&mut i32".to_string()],
confidence: 0.95,
reason: "malloc/free pattern detected".to_string(),
});
assert_eq!(collector.entries().len(), 1);Structs§
- Trace
Collector - Collects trace entries during transpilation.
- Trace
Entry - A single decision recorded during transpilation.
- Trace
Summary - Summary statistics for a trace.
Enums§
- Decision
Type - Type of decision being recorded.
- Pipeline
Stage - Stage of the transpilation pipeline where a decision was made.