Commit 141eabd
Your Name
fix: circuit breaker recovery, recordSuccess race, vibe queue self-heal
Fix 1 — Circuit breaker deadlock (audioAnalysisCleanup.ts):
shouldAttemptReset() was measuring time since last failure, which resets
every cleanup cycle. Added circuitOpenedAt fixed at the moment the breaker
first opens. shouldAttemptReset() now measures from that fixed point so the
5-minute window actually expires regardless of ongoing failure activity.
Fix 2 — recordSuccess() race condition (unifiedEnrichment.ts):
recordSuccess() compared audioCompletedBefore/After bracketing only
cleanupStaleProcessing() — a millisecond window that never captured Python
completions (~14s batch cadence → effectively 0% hit rate). Replaced with
audioLastCycleCompletedCount tracked across cycles. executeAudioPhase() now
fires recordSuccess() whenever completed count grew since the previous cycle
(~1 min window), reliably detecting analyzer progress.
Fix 3 — CLAP vibe embeddings queue self-healing (unifiedEnrichment.ts):
queueVibeEmbeddings() filtered vibeAnalysisStatus = 'pending', silently
skipping 7286 tracks left as 'completed' after reduce_embedding_dimension
migration dropped their embeddings. Changed filter to <> 'processing' so
te.track_id IS NULL (actual embedding existence) is the source of truth.
Queue now self-heals if embeddings are ever wiped again.1 parent 3dcfe09 commit 141eabd
File tree
2 files changed
+20
-12
lines changed- backend/src
- services
- workers
2 files changed
+20
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| 61 | + | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| |||
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
987 | 988 | | |
988 | 989 | | |
989 | 990 | | |
990 | | - | |
| 991 | + | |
991 | 992 | | |
992 | 993 | | |
993 | 994 | | |
| |||
1072 | 1073 | | |
1073 | 1074 | | |
1074 | 1075 | | |
1075 | | - | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1076 | 1079 | | |
1077 | 1080 | | |
1078 | 1081 | | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1079 | 1087 | | |
1080 | 1088 | | |
1081 | 1089 | | |
| |||
1084 | 1092 | | |
1085 | 1093 | | |
1086 | 1094 | | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | 1095 | | |
1095 | 1096 | | |
1096 | 1097 | | |
| |||
0 commit comments