1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Author: Julian Bolivar
// Version: 1.1.0
// Date: 2026-02-09
//! AI Code Reviewer — automated code review using Claude via Azure AI Foundry.
//!
//! This crate provides the core pipeline for AI-powered PR code review:
//! diff extraction, hunk parsing, batch grouping, prompt construction,
//! hallucination validation, and cost tracking.
//!
//! # Architecture
//!
//! The main entry point is [`Panoptico`], which orchestrates the full
//! review pipeline. Create an instance with a [`config::ReviewConfig`]
//! and call [`Panoptico::run`] with a [`Command`].
//!
//! ```no_run
//! use panoptico::{Panoptico, Command};
//! use panoptico::config::ReviewConfig;
//!
//! # async fn example() -> Result<(), panoptico::error::ReviewError> {
//! let config = ReviewConfig::default();
//! let reviewer = Panoptico::new(config);
//! reviewer.run(Command::Test).await?;
//! # Ok(())
//! # }
//! ```
// Re-export the primary public API at crate root.
pub use ;
/// Shared synchronization primitives for tests that mutate process-global state.
///
/// `std::env::set_current_dir` and `std::env::set_var` are process-global.
/// Tests that modify these must acquire the corresponding mutex to prevent
/// race conditions when `cargo test` runs tests in parallel.
///
/// # Lock ordering
///
/// `CWD_MUTEX` and `ENV_MUTEX` are currently independent — no test
/// acquires both. If a future test needs both locks, acquire
/// `CWD_MUTEX` first, then `ENV_MUTEX`, to prevent deadlocks.
pub