Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: name the jobs a stopped-run auto-review test saw, so a flake is diagnosable (#10467)

[._.]/ Adam Eivy484a81579a6c
diff --git a/server/routes/musicVideoAutoReview.test.js b/server/routes/musicVideoAutoReview.test.js
index 485810fa82..b662ea551c 100644
--- a/server/routes/musicVideoAutoReview.test.js
+++ b/server/routes/musicVideoAutoReview.test.js
@@ -277,7 +277,9 @@ describe('opt-in automatic review/retries (#8988)', () => {
const runId = run(current).id;
const reviewed = run(current).attempts[0].review;
// The server submits the flagged section before the director pauses.
- await vi.waitFor(() => expect(h.jobs).toHaveLength(1), { timeout: 5000, interval: 20 });
+ // Compare the jobs' identity (not just the count) so a flake that enqueues a
+ // second job prints which section it was for, instead of a collapsed array (#10467).
+ await vi.waitFor(() => expect(h.jobs.map((j) => ({ id: j.id, kind: j.kind, sceneId: j.params.musicVideo.sceneId }))).toEqual([{ id: 'job-1', kind: 'video', sceneId: 's2' }]), { timeout: 5000, interval: 20 });
expect((await request(app).post(`${base(p.id)}/auto-reviews/${runId}/stop`)).body.run.status).toBe('stopped');
// The take the board already paid for still lands — but a stopped run