pub mod bedrock;
pub mod exact;
pub mod fuzzy;
pub mod issue_type_tier;
pub mod jira_project_tier;
pub mod jev;
pub(crate) mod jev_budget;
pub(crate) mod jev_error;
pub(crate) mod jev_glue;
pub(crate) mod jev_matcher;
pub(crate) mod jev_names;
pub(crate) mod jev_obfuscate;
pub(crate) mod jev_patterns;
pub(crate) mod jev_response;
pub(crate) mod jev_tickets;
pub(crate) mod jev_trailers;
pub(crate) mod jev_vocab;
pub mod llm;
pub(crate) mod llm_context;
pub mod llm_prompt;
pub mod override_tier;
pub mod regex_tier;
pub mod weighted_sum;
use serde::{Deserialize, Serialize};
use crate::classify::taxonomy::TopLevelCategory;
use crate::core::models::ClassificationMethod;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ClassificationResult {
pub category: String,
pub subcategory: Option<String>,
#[serde(default)]
pub top_level: Option<TopLevelCategory>,
pub confidence: f64,
pub method: ClassificationMethod,
pub ticket_id: Option<String>,
#[serde(default)]
pub complexity: Option<u8>,
}
impl ClassificationResult {
pub fn unclassified() -> Self {
Self {
category: "uncategorized".to_string(),
subcategory: None,
top_level: Some(TopLevelCategory::Unknown),
confidence: 0.0,
method: ClassificationMethod::FuzzyMatch,
ticket_id: None,
complexity: None,
}
}
}
#[cfg(test)]
mod jev_context_tests;
#[cfg(test)]
mod jev_obfuscate_tests;
#[cfg(test)]
mod jev_redaction_tests;
#[cfg(test)]
mod jev_review_tests;
#[cfg(test)]
mod jev_gateb_tests;
#[cfg(test)]
mod jev_gateb2_tests;
#[cfg(test)]
mod jev_round3_tests;
#[cfg(test)]
mod jev_round4_tests;
#[cfg(test)]
mod jev_round5_tests;
#[cfg(test)]
mod jev_tests;
#[cfg(test)]
mod jev_text_mode_tests;
#[cfg(test)]
mod llm_tests;
#[cfg(test)]
mod llm_prompt_tests;
#[cfg(test)]
mod weighted_sum_tests;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn unclassified_defaults_complexity_to_none() {
let r = ClassificationResult::unclassified();
assert_eq!(r.complexity, None);
}
}