fix: face group name read consistency, sync_file_status fix, cleanup ghost records, identity_agent replaced with face_dedup

- get_face_groups_handler: COALESCE(tp.name, tn.label) for name consistency
- sync_file_status: compare JSON vs pre_chunks (not chunk table)
- face consistency: compare frames.len() not total_faces
- cleanup 2 ghost records with NULL file_name/file_path
- replace identity_agent with face_dedup in pipeline stages
- remove identity_agent_api.rs and all references
- update required_processors to match actual processors
- update AGENTS.md with team responsibilities
- add Studio pipeline changes documentation
This commit is contained in:
Accusys
2026-07-27 02:15:51 +08:00
parent fcdeab82e6
commit 39a2cbc65b
118 changed files with 19386 additions and 2964 deletions
+21 -2
View File
@@ -215,7 +215,7 @@ pub async fn health(State(state): State<AppState>) -> Json<HealthResponse> {
build_timestamp: env!("BUILD_TIMESTAMP").to_string(),
uptime_ms: get_uptime_ms(),
watcher_running: check_process_running("watcher"),
worker_running: check_process_running("worker"),
worker_running: check_worker_alive(&state).await,
auto_pipeline_enabled: config::get_auto_pipeline_enabled(),
watcher_auto_register_enabled: config::get_watcher_auto_register(),
system_timezone: config::SYSTEM_TIMEZONE.clone(),
@@ -380,7 +380,7 @@ pub async fn health_detailed(State(state): State<AppState>) -> Json<DetailedHeal
llm: check_http(config::LLM_HEALTH_URL.as_str()).await,
rsync: check_rsync().await,
watcher_running: check_process_running("watcher"),
worker_running: check_process_running("worker"),
worker_running: check_worker_alive(&state).await,
},
schema: check_schema_migrations(state.db.pool()).await,
identities: {
@@ -628,6 +628,25 @@ async fn check_rsync() -> ServiceStatus {
}
}
/// Check worker liveness via Redis health key TTL.
/// Returns true if the Worker's Redis health key exists and has remaining TTL > 0.
pub async fn check_worker_alive(state: &AppState) -> bool {
let health_key = format!("{}health", crate::core::config::REDIS_KEY_PREFIX.as_str());
let client = state.redis_cache.get_client().await;
let guard = client.write().await;
if let Ok(mut conn) = guard.get_conn().await {
let ttl: Result<i64, _> = redis::cmd("TTL")
.arg(&[health_key.as_str()])
.query_async(&mut conn)
.await;
match ttl {
Ok(ttl) if ttl > 0 => return true,
_ => return false,
}
}
false
}
fn check_process_running(name: &str) -> bool {
let patterns: &[&str] = match name {
"watcher" => &[