pub struct ReviewContextRecord {Show 17 fields
pub trace_id: String,
pub operation: String,
pub pr: String,
pub model: String,
pub github_actor: Option<String>,
pub files_total: usize,
pub files_with_patch: usize,
pub files_truncated: usize,
pub truncated_chars_dropped: usize,
pub ast_context_chars: usize,
pub call_graph_chars: usize,
pub dep_enrichments_count: usize,
pub dep_enrichments_chars: usize,
pub budget_drops: Vec<String>,
pub cwd_inferred: bool,
pub prompt_chars_final: usize,
pub finish_reasons: Vec<String>,
}Expand description
Record of PR review context decisions for explainability.
Captures all context assembly decisions (files, enrichments, budget drops, prompt size)
for a single PR review operation. Written to JSONL when APTU_CONTEXT_FILE is set.
Fields§
§trace_id: StringUnique trace ID for correlating with AI stats.
operation: StringOperation type (e.g., pr_review).
pr: StringPR identifier (owner/repo#number).
model: StringModel used for analysis.
github_actor: Option<String>GitHub actor (if available from environment).
files_total: usizeTotal number of files in the PR.
files_with_patch: usizeNumber of files with a patch (non-empty diff).
files_truncated: usizeNumber of files whose full content was truncated.
truncated_chars_dropped: usizeTotal characters dropped from truncated files.
ast_context_chars: usizeCharacters in AST context.
call_graph_chars: usizeCharacters in call graph context.
dep_enrichments_count: usizeNumber of dependency enrichments applied.
dep_enrichments_chars: usizeTotal characters in dependency enrichments.
budget_drops: Vec<String>Names of context items dropped due to budget (e.g., call_graph, full_content).
cwd_inferred: boolWhether the repository path was inferred from CWD.
prompt_chars_final: usizeFinal assembled prompt character count.
finish_reasons: Vec<String>Finish reasons from the AI response.
Trait Implementations§
Source§impl Clone for ReviewContextRecord
impl Clone for ReviewContextRecord
Source§fn clone(&self) -> ReviewContextRecord
fn clone(&self) -> ReviewContextRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more