feat: add TraceArtifacts phase + VLM waits for all key_frame.jpg

- Add TraceArtifacts phase to TkgPhase enum (phase 18)
- Report progress as key_frame.jpg/key_face.jpg are created
- VLM trigger now polls until ALL key_frame.jpg files exist
  (was: started after TKG build, before artifacts were ready)
- Add iron rule to AGENTS.md: ask before removing data

Tested: Gamma 8 (27 traces) → 27/27 VLM summaries completed
This commit is contained in:
Accusys
2026-08-24 19:13:11 +08:00
parent d29b4804af
commit 9f12e835b8
43 changed files with 3993 additions and 491 deletions
+6 -5
View File
@@ -1062,10 +1062,7 @@ async fn search_file_faces(
let where_sql = where_clauses.join(" AND ");
// Count total
let count_sql = format!(
"SELECT COUNT(*) FROM {} tp WHERE {}",
tp_table, where_sql
);
let count_sql = format!("SELECT COUNT(*) FROM {} tp WHERE {}", tp_table, where_sql);
let mut count_query = sqlx::query_scalar::<_, i64>(&count_sql).bind(&file_uuid);
if let Some(ref q) = params.q {
@@ -1110,7 +1107,11 @@ async fn search_file_faces(
WHERE {} \
ORDER BY tp.start_frame ASC \
LIMIT ${} OFFSET ${}",
tp_table, video_table, where_sql, param_idx, param_idx + 1
tp_table,
video_table,
where_sql,
param_idx,
param_idx + 1
);
let mut data_query = sqlx::query(&data_sql).bind(&file_uuid);