From 1b692b8cde4a888c8a35af69231f181b57bf5619 Mon Sep 17 00:00:00 2001 From: soryu Date: Fri, 6 Feb 2026 20:06:30 +0000 Subject: Fix: Cleanup old chain code --- makima/src/orchestration/verifier.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'makima/src/orchestration/verifier.rs') diff --git a/makima/src/orchestration/verifier.rs b/makima/src/orchestration/verifier.rs index e98da50..bc29e47 100644 --- a/makima/src/orchestration/verifier.rs +++ b/makima/src/orchestration/verifier.rs @@ -290,6 +290,18 @@ pub enum VerifierError { Io(#[from] std::io::Error), } +/// Information about a verifier for serialization and database storage. +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct VerifierInfo { + pub name: String, + pub verifier_type: String, + pub command: String, + pub working_directory: Option, + pub detect_files: Vec, + pub weight: f64, + pub required: bool, +} + /// Verifier trait for pluggable verification implementations. #[async_trait] pub trait Verifier: Send + Sync { @@ -299,6 +311,9 @@ pub trait Verifier: Send + Sync { /// Get the type of this verifier. fn verifier_type(&self) -> VerifierType; + /// Get serializable info about this verifier. + fn info(&self) -> VerifierInfo; + /// Check if this verifier is applicable to the given repository. async fn is_applicable(&self, repo_path: &Path) -> bool; @@ -393,6 +408,18 @@ impl Verifier for CommandVerifier { self.verifier_type.clone() } + fn info(&self) -> VerifierInfo { + VerifierInfo { + name: self.name.clone(), + verifier_type: self.verifier_type.as_str().to_string(), + command: self.command.clone(), + working_directory: self.working_dir.clone(), + detect_files: self.applicable_patterns.clone(), + weight: 1.0, + required: self.required, + } + } + async fn is_applicable(&self, repo_path: &Path) -> bool { if self.applicable_patterns.is_empty() { return true; -- cgit v1.2.3