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

Keep stitch fallback independent of its publication latch

[._.]/ Adam Eivy5bbc64ec0860
diff --git a/server/services/federatedMedia/remoteExecutor.js b/server/services/federatedMedia/remoteExecutor.js
index 984b9119db..034c944721 100644
--- a/server/services/federatedMedia/remoteExecutor.js
+++ b/server/services/federatedMedia/remoteExecutor.js
@@ -437,9 +437,8 @@ export function createRemoteMediaExecutor({
code: 'MEDIA_PROVIDER_RESULT_INTEGRITY_FAILED',
});
}
- // POSIX rename replaces an existing file atomically. Do not unlink the
- // destination first: consumers should never observe a missing final path
- // between integrity verification and promotion.
+ // Promotion waits for the adapter's publication boundary. The verified
+ // staging file is never named by a history record.
verified = true;
return { filename, dir, path: finalPath, stagedPath: partialPath };
} finally {
@@ -486,20 +485,21 @@ export function createRemoteMediaExecutor({
let local;
try {
local = await publishResult(async () => {
+ // Atomic installation preserves an existing path until its replacement lands.
if (downloaded.stagedPath) await rename(downloaded.stagedPath, downloaded.path);
return finalize({
- jobId: state.jobId,
- peerId: state.peerId,
- request,
- remoteJob: completed,
- // Wall-clock render timing (#5878). Measured from THIS install's
- // ingestion of the job — submission, the peer's own queue wait and
- // render, download, verification — because that whole span is what the
- // user waited through here. The peer's internal render time is not on
- // the wire, and asking for it would be a status payload crossing the
- // federation boundary.
- renderStartedAtMs: state.renderStartedAtMs,
- ...downloaded,
+ jobId: state.jobId,
+ peerId: state.peerId,
+ request,
+ remoteJob: completed,
+ // Wall-clock render timing (#5878). Measured from THIS install's
+ // ingestion of the job — submission, the peer's own queue wait and
+ // render, download, verification — because that whole span is what the
+ // user waited through here. The peer's internal render time is not on
+ // the wire, and asking for it would be a status payload crossing the
+ // federation boundary.
+ renderStartedAtMs: state.renderStartedAtMs,
+ ...downloaded,
});
}, { ...downloaded, jobId: state.jobId });
} finally {
diff --git a/server/services/videoGen/stitchVideos.js b/server/services/videoGen/stitchVideos.js
index a2bd139cb1..0e4bf5a89a 100644
--- a/server/services/videoGen/stitchVideos.js
+++ b/server/services/videoGen/stitchVideos.js
@@ -188,8 +188,7 @@ export async function stitchVideos(videoIds, opts = {}) {
// inputs were never re-encoded, so they're still in codec lockstep and
// the stream-copy concat below can salvage the clip. The cost is the
// echoed context replaying at each trimmed seam.
- committed = true;
- console.log(`⚠️ Trimmed concat failed (${failure.message}) — falling back to a stream copy; ${cutCount} seam(s) will repeat their context`);
+ console.log(`⚠️ Trimmed concat failed (${failure.message}) — falling back to a stream copy; ${cutCount} seam(s) will repeat their context`);
trimsApplied = false;
}
}