feat(workspace): send local renders home with their project and version

Phase 5c P3. A render made in a workspace must reach its home with the project
and version it was rendered from, and transfers with a server must respect a
metered connection, downloads into the workspace included.

- WorkspaceSendJobHandler: per unsent ledger entry, hash the file again
  (missing or changed: marked failed, file left in place), push the named
  version first when the home lacks it (failure fails the job, entry pending),
  then file it in this PC's archive (staged copy read back against its SHA-256,
  project and version checked against the sequence) or upload it to the server
  with ProjectId/ProjectVersionId; mark it sent. Idempotent by render id. A send
  to a server waits while HoldTransfers says so.
- SyncTransfers: extract FileRenderAsync, the lease-held filing of a staged
  render into a sequence's exports, shared by GetExportsAsync and the send.
- ISyncConnector.ProjectHome (default null; SyncHost already implements it) so
  the send can push a version to a server home.
- Server: RenderUploads checks the project fields at start and completion
  (422 project_mismatch) and records them; RenderDto carries them.
- UploadHold also pauses WorkspaceCopy and WorkspaceSend jobs naming a server;
  Server screen checkbox reads "Pause metered transfers".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 15:32:49 +01:00
1 parent 2e1c67f531
commit 00b8dcd249
12 files changed
+894 -53

No files matched your search

+10 -1
View File
@@ -109,6 +109,13 @@ public sealed record ManifestFrame(Guid Id, int Index, string FileName, long Siz
/// <summary>How the server's proxies are made (BRIEF §8.5): long edge in pixels (0 = full size) and JPEG quality.</summary>
public sealed record ProxySpec(int LongEdge, int Quality);
/// <summary>A render of a sequence, filed under its exports.</summary>
/// <param name="ProjectId">
/// The project whose version was rendered (owner review 2, R8): a render node's output of a job that names one, or a render a
/// workspace made on a client and sent home (phase 5c); null for a render of the sequence's own settings, and from servers
/// before phase 5c.
/// </param>
/// <param name="ProjectVersionId">The project version rendered; null when none is named (see <paramref name="ProjectId"/>).</param>
public sealed record RenderDto(
Guid Id,
string PresetName,
@@ -119,7 +126,9 @@ public sealed record RenderDto(
double DurationSeconds,
long Bytes,
DateTimeOffset Created,
string? ProducedBy);
string? ProducedBy,
Guid? ProjectId = null,
Guid? ProjectVersionId = null);
/// <summary>Aggregates for the archive dashboard and the admin panel.</summary>
/// <param name="FreeBytes">Free bytes of the space volume: the server's space path when one is set, else the archive's volume.</param>