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

fix: recheck stills-review ownership after the repair write (#12065)

[._.]/ Adam Eivy84973ea57401
diff --git a/server/services/musicVideo/autonomousService.js b/server/services/musicVideo/autonomousService.js
index 35acefdbed..01864e27bd 100644
--- a/server/services/musicVideo/autonomousService.js
+++ b/server/services/musicVideo/autonomousService.js
@@ -1349,7 +1349,8 @@ async function ownsStillsReview(projectId, productionRunId) {
async function reviewOrPark(projectId, run, productionRunId) {
if (isOrchestratedRun(run)) {
const regenerate = await reviewStills(projectId, run, productionRunId);
- if (!regenerate) return;
+ // A stop or cancel can also land while the repair and its review entry are written.
+ if (!regenerate || !await ownsStillsReview(projectId, productionRunId)) return;
if (regenerate.length) {
await deps.resumeProduction(projectId, productionRunId, { acceptBasis: true, stopBefore: 'clips' });
return;