fix(P0): per-library output dir for worker ingestion/verification (face_cluster guard, verifier, TKG, qdrant_face, ASR/ASRX); fix face_cluster serde default for empty output; fix face_cluster dependencies in pipeline_flows.json
Core Test / lint-and-test (push) Has been cancelled
Cross-Project Integration / integration (push) Has been cancelled

This commit is contained in:
Accusys
2026-11-17 02:46:57 +08:00
parent db790e2c89
commit d01e456ae5
5 changed files with 152 additions and 88 deletions
+30 -1
View File
@@ -563,9 +563,38 @@ pub fn verify_file(file_uuid: &str) -> FileVerificationReport {
/// Legacy verification function (backward compatible)
pub fn verify_output(processor: &ProcessorType, file_uuid: &str) -> VerificationResult {
let output_dir = OUTPUT_DIR.as_str();
verify_output_in_dir(processor, file_uuid, output_dir)
}
/// Verification with explicit output directory (per-library aware).
/// Falls back to the global OUTPUT_DIR and the demo subdirectory if the
/// primary path does not exist, so per-library outputs verify correctly.
pub fn verify_output_in_dir(
processor: &ProcessorType,
file_uuid: &str,
output_dir: &str,
) -> VerificationResult {
let proc_name = processor.as_str();
let filename = format!("{}.{}.json", file_uuid, proc_name);
let output_path = PathBuf::from(OUTPUT_DIR.as_str()).join(&filename);
// Candidate locations: explicit dir → global OUTPUT_DIR → OUTPUT_DIR/demo
let base = output_dir.trim_end_matches('/');
let global = OUTPUT_DIR.as_str().trim_end_matches('/');
let candidates = if base == global {
vec![
PathBuf::from(base),
PathBuf::from(format!("{}/demo", global)),
]
} else {
vec![PathBuf::from(base), PathBuf::from(global)]
};
let output_path = candidates
.iter()
.map(|d| d.join(&filename))
.find(|p| p.exists())
.unwrap_or_else(|| PathBuf::from(base).join(&filename));
if !output_path.exists() {
return VerificationResult::fail(proc_name, file_uuid, "output file not found");