Retain imported originals on Worker before retiring Core staging

This commit is contained in:
DCCONSTRUCTIONS
2026-11-07 16:45:17 +03:00
parent b0332fa377
commit 09c13a5c68
10 changed files with 710 additions and 78 deletions
+35
View File
@@ -267,3 +267,38 @@ scripts have no universal disk quota: they must implement the declared capture
bound and perform closeout. Existing cache quotas and service-log rotation keep
their separate writer-owned enforcement. This amendment does not claim that a
filesystem-wide automatic limit or remote Worker cleanup has been installed.
## Imported scan originals — owner amendment, 2026-11-07
For manual Gaussian LCC/LCC2 folder and ZIP/RAR/7z imports, Mission Core owns
**temporary transfer staging**, not permanent original storage. An available
Gaussian provider advertising `durable-source/v1` is required before allocating
an upload project. An outage mid-transfer preserves unfinished staging for retry.
On complete transfer the provider verifies every admitted original by size and
SHA-256, flushes the bytes and publishes an independent retention receipt.
Core persists that receipt, freshly verifies remote hashes and its local hashes,
journals `verified → retiring → remote`, and removes only the declared local
source files. Interrupted retirement resumes using that persisted receipt.
There is no low-disk exception that deletes an unverified archive.
Conversion then runs from Worker storage. Its failure, job cancellation or job
removal does not remove retained originals. Retry uses the receipt; no full local
fallback copy is created. Core keeps optimized SOG/LOD/collision artifacts,
source identity/receipt, small optional trajectory metadata, and application edits.
The user's original file outside the imported project's source directory is not
part of staging and is never deleted by this workflow.
Older ready projects can be migrated with
`POST /api/v1/simulation-worlds/projects/{id}/source/retain`. The endpoint verifies
that the existing provider job includes **every** imported file, retains it,
then retires staging without changing the world manifest, source bundle identity,
viewer settings, artifacts or semantic map. Legacy archives are resolved through the matching Worker ingest record and their
original upload descriptor; missing or mismatched ownership is refused. An old job ID alone never authorizes deletion.
Provider receipts and pins live in the existing persistent Gaussian data volume,
independent of containers/jobs. Migration needs the entire volume, configuration,
secrets and compatible executor, not just a Docker image. Provider address is a
hint; receipt identity and hashes permit relocation to a different host. See the
provider repository `docs/SOURCE_RETENTION.md` for its API and portability boundary.
This supersedes local-original retention for this narrowly defined import flow;
other recordings, unique evidence and application data remain protected above.