feat: face fix deployment + trace_* regeneration + executor stderr filter fix

- swift_face.swift: frame rounding (.rounded()), conf 0.75, min_size 64
- trace_* directories regenerated for KOBA (37 traces, start_frame 5307)
- executor.rs: stderr filter now logs all non-empty stderr (was discarding)
- VAD not skippable in ASRX (main_fixed.py Step 2 always runs)
- Step 2.5 sentence boundary refinement added
- Cluster agent async endpoints + similarity transparency
- Keyword search: relationship text extraction, priority ordering
- Face fix handoff doc for Studio team
This commit is contained in:
Accusys
2026-08-05 00:13:50 +08:00
parent 36a704e3d3
commit 3d13a06bd9
42 changed files with 3447 additions and 778 deletions
+61 -17
View File
@@ -268,10 +268,7 @@ pub async fn search_people(
})?;
let total = people.len();
Ok(Json(PeopleSearchResponse {
people,
total,
}))
Ok(Json(PeopleSearchResponse { people, total }))
}
// --- Internal search functions ---
@@ -631,19 +628,44 @@ async fn search_persons_internal(
let safe = fuuid.replace('\'', "''");
sql.push_str(&format!(" AND tp.file_uuid = '{}'", safe));
}
sql.push_str(&format!(" ORDER BY tp.frame_count DESC NULLS LAST LIMIT {}", req.page_size.unwrap_or(20)));
sql.push_str(&format!(
" ORDER BY tp.frame_count DESC NULLS LAST LIMIT {}",
req.page_size.unwrap_or(20)
));
let rows: Vec<(String, i32, Option<String>, Option<i64>, Option<i64>, Option<i32>,
Option<String>, Option<String>, Option<f64>, Option<String>)> =
sqlx::query_as(&sql).fetch_all(db.pool()).await?;
let rows: Vec<(
String,
i32,
Option<String>,
Option<i64>,
Option<i64>,
Option<i32>,
Option<String>,
Option<String>,
Option<f64>,
Option<String>,
)> = sqlx::query_as(&sql).fetch_all(db.pool()).await?;
let q_lower = req.query.to_lowercase();
let mut results: Vec<SearchResult> = Vec::new();
for (fuuid, trace_id, name, start_frame, end_frame, frame_count,
key_frame, key_face, avg_confidence, external_id) in rows
for (
fuuid,
trace_id,
name,
start_frame,
end_frame,
frame_count,
key_frame,
key_face,
avg_confidence,
external_id,
) in rows
{
let name_match = !req.query.is_empty()
&& name.as_deref().map(|n| n.to_lowercase().contains(&q_lower)).unwrap_or(false);
&& name
.as_deref()
.map(|n| n.to_lowercase().contains(&q_lower))
.unwrap_or(false);
let score = if name_match { 0.95 } else { 0.5 };
results.push(SearchResult::Person {
@@ -782,15 +804,37 @@ async fn search_people_by_query(
let safe = fuuid.replace('\'', "''");
sql.push_str(&format!(" AND tp.file_uuid = '{}'", safe));
}
sql.push_str(&format!(" ORDER BY tp.frame_count DESC NULLS LAST LIMIT {}", limit));
sql.push_str(&format!(
" ORDER BY tp.frame_count DESC NULLS LAST LIMIT {}",
limit
));
let rows: Vec<(String, i32, Option<String>, Option<i64>, Option<i64>, Option<i32>,
Option<String>, Option<String>, Option<f64>, Option<String>)> =
sqlx::query_as(&sql).fetch_all(db.pool()).await?;
let rows: Vec<(
String,
i32,
Option<String>,
Option<i64>,
Option<i64>,
Option<i32>,
Option<String>,
Option<String>,
Option<f64>,
Option<String>,
)> = sqlx::query_as(&sql).fetch_all(db.pool()).await?;
let mut results: Vec<PeopleResult> = Vec::new();
for (fuuid, trace_id, name, start_frame, end_frame, frame_count,
key_frame, key_face, avg_confidence, external_id) in rows
for (
fuuid,
trace_id,
name,
start_frame,
end_frame,
frame_count,
key_frame,
key_face,
avg_confidence,
external_id,
) in rows
{
results.push(PeopleResult {
file_uuid: fuuid,