refactor(lab): move execution to Worker and manage replay and transfer lifecycles

This commit is contained in:
DCCONSTRUCTIONS
2026-11-10 01:09:39 +03:00
parent cd34b6ce1a
commit fe5900ff3b
101 changed files with 9305 additions and 2256 deletions
+343
View File
@@ -0,0 +1,343 @@
# LAB evidence and installation archive
Canonical cross-chat policy: [MISSIONCOR-97 — Storage rules](https://ops.nodedc.ru/nodedc/browse/MISSIONCOR-97).
The card records the current operator/Worker boundaries and separately preserves
the 3 November distributed-storage research and its unresolved acceptance gates.
Owner decision: 7 November 2026. Mission Core is the operator viewport. Worker
runtime owns heavy computation and evidence. The Git server owns historical
installation packages. This migration does not alter scans, accepted semantic
maps, installed plugins, observation recordings, or already published replay data.
## LAB ownership and portability
The evidence store is `experiments/archive-store` relative to the existing
Worker runtime volume. The installed LAB worker already mounts that volume at
`/runtime`; evidence is therefore visible as `/runtime/experiments/archive-store`
without a new container, a new service, or storage in a container writable layer.
The host drive or machine name is a deployment binding, not an artifact identity.
The runtime descriptor `state/laboratory-storage.json` records ownership,
location, catalog identity and migration state. `PIN.json` records the explicit
exclusion from job/cache cleanup; it is an ownership marker, not an OS access-control mechanism. The installed runner mounts this archive read-only. The dedicated evidence service has narrowly scoped write mounts for explicit owner-authorized LAB deletion (see below). This is preserved evidence, not a TTL cache. Migration admission
requires room for the whole planned copy and a 40 GiB free-space reserve; the
archive admission budget is 128 GiB. Reaching it requires an explicit retention
decision, never deletion of earlier evidence.
The store reuses `missioncore.artifact-manifest/v1` and the existing
`CentralArtifactStore` layout:
- `objects/sha256/<prefix>/<sha256>`: one immutable copy per distinct payload.
- `manifests/sha256/<prefix>/<manifest-id>.json`: standard artifact manifests.
- `refs/laboratory-archive/<reference>.json`: stable named references.
- `catalog.json`: source groups, registered work IDs, references and totals.
- Each manifest has an `index` member mapping original relative paths to roles,
hashes, sizes and original file modes. Groups are bounded to 1,500 paths.
Work IDs come from `config/laboratories`, including lifecycle evidence variants.
Unregistered historical groups remain explicitly historical evidence; archiving
does not promote them into accepted or runnable LAB results.
Copying is resumable. Existing byte-identical Worker files may be reused only
after hashing, using independent copies so later writes to old job files cannot
change the archive. The publisher rereads and hashes every remote payload before
publishing the catalog. Local retirement requires this receipt and a separate
review of live consumers. A transferred byte count alone is not acceptance.
Move the entire store (objects, manifests, refs, catalog and pin) when changing
Worker hosts. Rebind the runtime volume in the existing deployment; do not edit
file identities or bake host paths into an image. Verify after copying. The
portable reader is `k1link.laboratory.archive_store`:
```sh
python -m k1link.laboratory.archive_store --store /runtime/experiments/archive-store catalog
python -m k1link.laboratory.archive_store --store /runtime/experiments/archive-store verify MANIFEST_ID
python -m k1link.laboratory.archive_store --store /runtime/experiments/archive-store restore-file ORIGINAL_RELATIVE_PATH NEW_DESTINATION
```
Historical migration command (7 November): the fixed LAB agent below was retired
on 8 November. It is not a current execution target. The archive remains owned
by the managed LAB evidence deployment; use the portable reader above and the
current volume binding in `deploy/laboratory/README.md`. The original receipt
recorded this invocation:
```sh
docker exec ndc-observatory-installed-lab-worker-agent python3 /runtime/experiments/archive-store/tools/archive_store-HASH.py --store /runtime/experiments/archive-store catalog
```
Use the actual filename from the descriptor; `HASH` is not literal. The same `verify` and `restore-file` arguments apply. The store mount is read-only, so restore into an explicitly chosen writable destination such as the owning job workspace.
Restoration is explicit and limited to one file. It verifies the index and bytes,
rejects unsafe paths, refuses to overwrite an existing destination and makes a
new copy rather than a mutable hardlink into evidence. Original POSIX names are lookup identities: literal Windows paths found inside historical Mac filenames are preserved as text and never interpreted as restore destinations. The destination parent
must already exist. Original modes are recorded; permissions are not silently
elevated during restoration.
## Operator presentation is a separate retained product
Owner clarification, 8 November 2026: the viewing product is a **complete
playable visual recording**: synchronized camera frames/segmentation, 3D cuboids,
point layers, trajectories and a seekable timeline. A report, screenshot or
catalog entry is not a replacement. Existing controls and viewer composition are
unchanged. No new narrative/neural reports are introduced in the UI.
The operator composition routes the migrated legacy LAB and LiDAR APIs and
four recorded-perception endpoints to the Worker service. Those routes stream
responses with Range, ETag and their existing visualization contracts without
restoring whole compute directories. This does **not** cover every Observatory
path: the separate portable workflow still uses operator source CAS, result
staging/artifact storage and local replay packaging. The 8 November fresh audit
below records this remaining gap. Ready scenes, accepted visual recordings,
semantic maps, edits and compact recovery metadata remain legitimate products.
The Worker owns `experiments/laboratory` under the runtime volume. This is a
managed compatibility workspace for existing readers, separate from the
immutable archive. It contains materialized evidence, current source bindings,
annotations and bounded presentation caches. `state/ownership.json` identifies
its owner and archive lineage; `state/materialization.json` and camera receipts
prove migration. Container data never lives in its writable layer. See
[`deploy/laboratory/README.md`](../deploy/laboratory/README.md).
Missing/unreachable Worker returns an unavailable state (HTTP 503); it never
starts local computation or restores large inputs onto Core. Existing standalone
accepted recordings are retained, but the newly remote LAB routes require the
Worker connection. Do not imply that this migration provides universal offline
LAB playback.
Supported `LaboratoryRunner` execution requires explicit Worker authority and
confines result/receipt paths to that volume. Existing installed-package dispatch
remains the executor for new packaged jobs; the compatibility service is not a
second scheduler or a training service. Arbitrary hand-written engineering
scripts are not sandboxed by this Python composition boundary: they must also be
run on Worker under the same ownership policy.
Lifecycle rules:
- New raw inputs, intermediate arrays, model weights and training checkpoints
stay on Worker. Core may receive only declared presentation products and small
status/provenance metadata. No opportunistic fallback or unlimited result sync.
- Source objects, accepted outputs, manual annotations, active jobs and rollback
pins are protected. Scratch has a job owner and terminal cleanup; age alone
never makes evidence disposable.
- Materialization admission is capped at 128 GiB and requires 40 GiB free.
Mutating service calls and runner admission check the 40 GiB reserve. This is
admission protection, **not a hard filesystem quota** for arbitrary scripts.
- Existing publication budgets remain enforced for generated visual products:
camera frames 256 MiB, ordinary/fusion RRD caches 1 GiB each, integrated and LAB
RRD caches 4 GiB each. Budget exhaustion refuses a new publication and preserves
already accepted data. Temporary renderer files are bounded and removed in
`finally`; container `/tmp` is limited to 512 MiB. No broad automatic eviction.
- Docker logs rotate (two 10 MiB files); existing pipeline JSONL journals rotate.
Keep only the active and one verified rollback service release when retiring
this deployment's superseded intermediate images/contexts. Never global-prune
another stack or delete shared image layers manually.
- Legacy catalogs that order results by directory mtime need their metadata
preserved during migration; copying bytes alone changes their selection.
Preserve exact source/result identities; do not substitute a newer profile for
an older sealed experiment. A historical profile mismatch remains a declared
playback limitation, not evidence of successful playback.
- Local retirement requires an immutable archive receipt, Worker verification,
live playback comparison, current local SHA-256 equality, and no active owner.
Changed/unrecognized files stay. Preserve operator storage-audit metadata and
all viewer/map/capture roots. Keep a per-file retirement receipt outside UI.
## Installation packages
The private repository `dctouch/MISSION_CORE_INSTALLERS` is separate from the
application source repository. The source repository does not receive private
binary payloads. Do not maintain a divergent "new PC" source branch.
The archive uses standard Git LFS for binary segments and ordinary small Git
files for source indices, manifests and instructions. The server has release
attachments disabled; no server setting change is required. The initial archive
is a tar stream compressed with Zstandard (1 GiB window), split into 64 MiB LFS
segments. Each segment is independently downloaded and SHA-256 checked before
its pointer is published. A final manifest seals the ordered segment list and
the checksum of the full compressed stream. An absent or incomplete manifest
must never be interpreted as a complete backup.
The tar contains one SHA-256 object per distinct regular file and a path-to-object
index, including original sizes/modes. The upload never needs a full temporary
archive on the Mac. Source files are checked against the inventory before and
during reading. Directory trees, links and working build environments are not
retired merely because their regular files were archived.
This is a preservation format, not a finished offline installer or new product
download interface. Restore requires Git LFS, Zstandard with the declared window
limit and the archive reconstruction helper. The standard Git LFS client reuses already completed segments on retry; a failed segment may need retransmission. The initial tar stream is sequential, so restoring a late member requires reading earlier segments. This preservation snapshot is not yet a selective network package catalog. The helper verifies and restores selected original files.
Keep packages required by current install/update flows, active builds and pinned
local dependency chains until those consumers have explicit archive support.
## Validation and evidence
`tests/test_laboratory_archive_store.py` covers volume relocation with the source
removed, corruption, unsafe member paths and preservation of existing work.
`tests/test_artifact_gateway.py` checks the shared manifest/object transport.
Private source inventories, network receipts, catalog identities and retirement
receipts belong in the local migration report, not normal Git history.
Archive/installer migration: `outputs/operator-storage-migration-20261107/REPORT.md`.
Worker execution/presentation cutover and verified local retirement:
`outputs/lab-worker-refactor-20261108/REPORT.md`. These are technical evidence files
outside the product UI. Their totals are separate measurements; do not add logical
file sizes and observed free-space deltas as one freed-disk figure.
## Fresh audit and implementation — 8 November 2026
The [fresh audit](../outputs/storage-fresh-audit-20261108/REPORT.md) measured
approximately 90.48 GB logical checkout data and 68.62 GB free disk. The four
migrated compute roots held only 4.68 MB of audit metadata. Material remaining
channels were portable source/result copies (1.47 GB), five presentation-cache
families (5.97 GB), and two build trees (27.46 GB). These are dated measurements,
not deletion authority or current free-space telemetry.
The subsequent [history/storage implementation](../outputs/lab-history-storage-20261108/REPORT.md)
adds Settings → Storage, 1–365 day retention (default 30), local availability,
verified pinning and a separate local-copy deletion action for supported portable
and composed AI Inference playback. Pinning retains the complete merged recording,
not a thumbnail. Deleting it keeps source/result evidence and history; reopening
rebuilds playback without rerunning models. The policy protects pins, shared files,
in-flight response leases, changed files and unknown paths. It applies only to
registered reproducible playback copies, not all LAB files on the operator.
The detailed lifecycle and exclusions are in [STORAGE_RETENTION.md](STORAGE_RETENTION.md).
History exposes catalogued LAB independently of player support. That revealed
19 results in the pre-cleanup snapshot (five TREE, fourteen RAVNOVES00), including
15 formats without an admitted player. The owner subsequently authorized their
full removal, together with failed attempts. These snapshot counts are historical;
the verified current inventory belongs to
[cleanup acceptance](../outputs/lab-history-cleanup-20261108/REPORT.md).
A composition represents its exact jobs, not every attempt of the same setup.
The UI acceptance used an existing 13:28.779 composed recording: pin, Play/Pause,
expanded view/Escape, unpin, local deletion, reopening and playback after rebuild
all passed. The registered copy was 465.9 MiB. This proves that local portable
path, not a universal remote stream or compatibility of every old experiment.
Remaining architecture work: bound and retire portable source/result staging
and other intermediate families, preserving verified recovery; add other
presentation families to the replica lifecycle through explicit adapters; and
close install/build archival dependencies separately. Local playback copies and
necessary local decoding are intended operator behavior, not migration defects.
Local replay packaging currently exists; its retained inputs must have explicit
ownership and bounded lifecycle. A mandatory move of every playback-preparation
step to Worker is not established by this storage audit. Gaussian
scenes, semantic maps, manual edits and unique evidence remain protected. No
claim of complete LAB offload or a percentage of global storage completion is
made by this bounded implementation.
## Explicit LAB destruction — owner clarification, 2026-11-08
The LAB trash action means permanent deletion on **Core and Worker**, including
its pinned playback copy, private output packages, admitted job scratch and
legacy archive payloads. It is not catalog-only hiding or an implicit archive.
Source recordings, Gaussian scenes, semantic maps and files shared by another
retained LAB are separate owners and survive. Small deletion receipts remain;
they do not retain a hidden playable result.
`deletion_coordinator.py` freezes exact job/result identities, checks active
playback leases, blocks republication, requests authenticated Worker deletion,
then removes local owned bytes and only finally removes the catalog projection.
Missing Worker acknowledgement leaves an explicit failure and the history row.
A repeated request resumes the journal. The UI warns that undo is unavailable.
The separate local-copy button and TTL still preserve history and Worker data.
`deletion_inventory.py` adapts admitted producer layouts; `data_deletion.py`
accepts opaque IDs and validated relative file inventories under deployment-bound
roots. Unrecognised result ownership is refused, not treated as an empty result.
Archive path tombstones prevent restore of deleted members; content shared with
a retained source/result remains. New producers must add ownership integration.
This is a scoped LAB lifecycle, not a universal sweep of every Worker directory.
Current cleanup acceptance (8 November): 14 failed attempts and 16 unsupported/broken LAB results were permanently removed on Core and Worker. All 26 source recordings remain; three current result projections back three playable history rows. See [verified cleanup report](../outputs/lab-history-cleanup-20261108/REPORT.md).
## Full cleanup clarification — 8 November 2026
Three accepted AI Inference views are not the complete LAB subsystem. The
repository has 44 registered laboratory evidence definitions; the Worker archive
also preserves their component evidence, input captures, annotations and dated
qualification material. Keep these owners distinct from a user-deleted result.
Absence from the AI Inference history is not a deletion criterion.
The full audit found presentation copies missed by the original flat-cache
adapter: nested session/result RRD sidecars and a v12 derived recording cached
under a deleted result ID. The deletion inventory now covers these exact legacy
layouts. The latter accepts only a recognized result ID, matching session ID and
`missioncore.derived-rerun-recording-cache/v12` schema; original source recordings
and non-cache files remain excluded. Supplemental receipts correct the prior
cleanup's coverage without resetting completed deletion journals.
Audit, exact removals, protected component inventory and scope limitations:
`outputs/lab-global-cleanup-20261108/REPORT.md`. The audit is not a qualification
of every archived experiment, and no universal filesystem purge is implied.
## Local LAB playback clarification and UX — 8 November 2026
The operator downloads/restores ready visual data and plays it locally. No WebRTC
video stream from Worker is required. A registered complete recording is a valid
local product; its pin protects it from expiry. Unpin begins the configured
retention interval again. Local-copy removal/expiry preserves history and Worker
results; full LAB trash remains the explicit cross-host deletion operation.
AI Inference now provides an active download action when the local copy is absent.
It prepares the recording without opening the viewer or rerunning inference. The
eye and pin use the same bounded, cancellable preparation coordinator. History
shows date / actual registered recording bytes (decimal MB), or zero when absent;
shared source/model dependencies are not misrepresented as this recording's size.
The opaque viewer spinner is replaced with canonical progress and short stages:
availability check, recording preparation, recording opening. Unknown progress
stays indeterminate. The opening fraction, where available, comes from the player's
buffered timeline, not an invented timer or a claim about network byte transfer.
The existing server still has a synchronous packaging step; there is no measured
byte-level percentage for that step. Warm openings reuse the prepared recording.
The current portable renderer restores required saved artifacts, builds the replay
on Core when absent, and serves the completed recording to the browser. Local
`.pack-*` directories use TemporaryDirectory cleanup. This is distinct from model
execution and from historical build outputs, source/result CAS and component
benchmarks, whose lifecycles must be audited separately. Missing UI rows alone do
not establish that component evidence is junk.
Acceptance: [LAB playback UX](../outputs/lab-viewer-ux-20261108/REPORT.md).
## Remaining intermediate stores — 8 November 2026
AI Inference is closed in the accepted UI/history/playback scope. The separate
[intermediate storage review](../outputs/intermediate-storage-review-20261108/REPORT.md)
records actual Mac/Worker owners, verified duplicate bytes and remaining lifecycle
gates. Integrated/experimental models and their required environments, component
inputs and regression evidence remain protected, including files named `cache`
or `derived`. The detailed ownership/retirement policy is in
[STORAGE_RETENTION.md](STORAGE_RETENTION.md#intermediate-stores-and-protected-models--owner-clarification-2026-11-08).
That initial audit did not implement these mechanisms. The subsequent
[retirement/retention implementation](../outputs/lab-retirement-transport-20261108/REPORT.md)
added source/staging budgets, verified archive fallback and published-transfer
retirement. The 9 November follow-up replaces the fixed transport ceilings with
shared physical-disk admission and adds producer-owned source last-consumer GC;
see the current transfer lifecycle in `STORAGE_RETENTION.md`.
## Legacy review and package distinction — 8 November 2026
The monthly/default-30-day interval concerns only unpinned viewing copies on the
operator Core. Worker models, executor distributions/images, environments and
experimental configurations remain until a separate pipeline-consolidation
decision. Retiring transfer/expanded-data duplicates is a different operation;
it must not become model/runtime package garbage collection.
The [follow-up audit](../outputs/legacy-lab-and-duplicates-20261108/REPORT.md)
traced the accepted modular UI and the then-retained fixed LAB V1 API/agent.
The later owner-authorized migration removed V1 admission and its standalone
container after verifying identical shared DDRNet/EoMT weights; models remain.
Two unused UI controllers and their exclusive test were removed. Shared portable
APIs, TGS and component evidence remain dependencies. Thirty-three duplicate data
paths were retained with independent APFS copy-on-write backing; no evidence
identity or model was removed. This is not a portable runtime requirement or an
automatic retention implementation. Published result transport now supports CAS-aware closeout with immutable
receipts and corruption checks. Source copies now retire after verified last-consumer completion, never by age.
Unknown historical copies stay protected. Models, images and experimental
environments are excluded. See `outputs/lab-source-lifecycle-20261109/REPORT.md`.
+220
View File
@@ -13,6 +13,7 @@ run at publication; service journal rotation runs in the owning writer.
| Data | Retention and mechanism |
| --- | --- |
| Source, configuration, secrets, `.git`, installed dependencies and active UI | Not disposable storage. No generic age-based cleanup. |
| Rover/battery scene and environment profiles, materials/textures, camera/editor layout and battery UI | Durable configuration in `data_dir/scene-profiles/.../meta.json`, with `meta.previous.json` on replacement. No cache TTL or scratch cleanup; retain verified recovery sources. Browser records are migration inputs only. |
| Imported Gaussian worlds, recordings, evidence, missions, plans, accepted maps, session map versions | Durable application data. No TTL. Deletion belongs to the owning product workflow or an explicitly reviewed archive/removal operation. |
| Simulation qualifications, computation experiments/results, engineering materials | Preserve unique evidence and the exact input/configuration/result relationship. An old experiment is not a cache. Archive only with a verified destination and complete dependency inventory. |
| Qualified releases and rollback artifacts | Explicit pins; retain independently of the intermediate count. Retiring a release requires removing its pin by name and recording the reason. |
@@ -405,3 +406,222 @@ one-file restoration helper. That local-only audit did not delete Worker dataset
subsequent explicit closeout is indexed separately at
`outputs/storage-closeout-20261107/REPORT.md`; do not add the two cleanup totals
without checking their distinct manifests.
## LAB and installer offload — 2026-11-07
The owner-authorized operator offload uses the existing Worker runtime volume
for preserved LAB evidence and a separate private Git LFS installation archive.
See [the ownership, portability and recovery contract](LAB_AND_INSTALLER_STORAGE.md).
This does not authorize removal of local viewer dependencies, source scans,
accepted maps, installed plugins or pinned build chains. Per-file retirement
requires a verified remote copy and a dependency review; archive transfer and
space reclamation are reported separately.
## LAB playback copies — 2026-11-08
Global Settings → Storage controls the retention of registered portable AI
Inference playback copies: 1–365 days, default 30. The store is
`data_dir/lab-local-storage.json`; owned files stay in
`data_dir/observatory-portable-replay-cache`. The renderer registers only a
validated complete merged RRD and its mapping sidecar. Unknown historical files
are not adopted through directory scanning and are not automatically removed.
Opening a supported result refreshes its last-use timestamp. Reading the catalog,
polling local availability or viewing Settings does not extend retention. Unpin
starts a full grace period. The reaper runs at service startup and then hourly;
changing policy may make unpinned copies eligible at the next sweep. Pin verifies
all registered file hashes and excludes that copy from expiration. Existing
cache publication budgets and free-space refusal still apply, including pinned
bytes; this is not a new global disk quota.
Local-copy deletion checks file identities, in-flight response leases and shared
references. Pinned copies must be unpinned first. Changed files, symlinks and
unknown paths are preserved. Only the reproducible presentation is removed;
source/result evidence, catalog history, configurations, Gaussian scenes and
semantic edits are outside this store. Reopening rebuilds the presentation from
retained validated source/result data, without running inference again.
Scope: portable results and composed portable runs only. Canonical/legacy replay
families, shared video caches, source/result CAS and install/build artifacts are
not silently included in this TTL. The portable source/result transport and
replay packager still require their separate Worker-only migration. A local pin
is not a new backup of the underlying evidence, nor proof that every historical
format can play offline. Existing protected source/result dependencies must stay
until that migration has a verified restoration contract.
History now lists all catalogued LAB formats independently of player support;
job attempts are no longer collapsed by configuration. Exact job/result identity
prevents duplicate rows. The jobs API remains bounded to 500 jobs per module;
older-than-bound histories need pagination rather than unbounded loading.
See [implementation and acceptance](../outputs/lab-history-storage-20261108/REPORT.md),
[storage ownership](LAB_AND_INSTALLER_STORAGE.md) and the prior
[fresh audit](../outputs/storage-fresh-audit-20261108/REPORT.md).
## Permanent LAB trash is distinct from cache expiry — 2026-11-08
An explicit confirmed LAB trash operation deletes its admitted private payloads
from both Core and Worker and removes its history entry. A pinned local copy is
included; an active playback lease blocks deletion until closed. Source sessions,
Gaussian products, semantic edits, other LABs and their shared files survive.
No retained remote archive is required for this intentional permanent deletion.
The archive/copy-preservation prerequisites elsewhere in this document apply to
storage offload and cache retirement, not to this owner-authorized destruction.
Worker receipt precedes local/catalog finalization. A failed or unavailable
Worker must not produce success or a hidden row. Durable IDs/receipts support
retry and block accidental republication. Keep only bounded audit metadata, not
inaccessible result payloads. HTTP callers cannot supply deletion paths.
The separate “delete local copy” action and 1–365 day cache TTL keep LAB history
and remote results. Pin excludes that copy from TTL, not from full LAB trash.
See `src/k1link/laboratory/{data_deletion,deletion_inventory,deletion_coordinator}.py`
and `outputs/lab-history-cleanup-20261108/REPORT.md` for actual acceptance/limits.
## Intermediate stores and protected models — owner clarification, 2026-11-08
The AI Inference UI/history/local-playback work is closed in its accepted scope.
The remaining audit is about transport copies, historical engineering materials
and component dependencies. It does not authorize treating the experimental
system itself as disposable run output.
Integrated and experimental model weights, required runtimes/environments,
registered component code, shared inputs, benchmarks, annotations and meaningful
regression evidence are protected owners. `cache`, `derived`, an old release
directory or absence from AI Inference history is never sufficient deletion
evidence. Retire a model/version only after checking all module, experiment,
qualification and rollback consumers and making an explicit retirement decision.
The local LAB-copy retention interval applies only to unpinned local viewing
copies in Mission Core. It does not apply to Worker experiments, installed
executor packages/images, models, environments or experimental configurations.
Preserve old and new model/executor/configuration versions until the owner makes
a separate pipeline-consolidation decision. A transport package in the rules
below means job input/output transfer data, not an executor/model distribution.
Every new intermediate producer must declare the owner and artifact role before
writing: source, model/runtime, scratch, transport package, accepted result,
presentation replica or engineering evidence. Bind exact input/code/model/config
identities and use volume-relative paths. Declare the family-level byte budget,
temporary peak/reservations, free-space reserve, active leases and terminal
cleanup/recovery contract. Single-file protocol maxima are not aggregate budgets.
An acknowledged transfer is not by itself permission to remove staging. Verify
the durable target, publication/catalogue binding and every retry/outbox reader.
After their readers use the durable copy, retire only the job-owned payload and
preserve small identity/transfer/publication receipts. Failed/interrupted jobs
also need terminal closeout. Active, shared, unclassified or sole-copy data stays
protected; never infer terminal ownership from mtime or run a recursive TTL sweep.
Historical duplicate bytes may be retired only with a protected retained copy,
hash/path restore index and a passing relevant evidence/consumer verification.
A product file matching an old audit file does not automatically protect that
product from later deletion or make the old audit layout reconstructible. Keep
decision-relevant negative results, exact configurations and useful regression
evidence; deduplicate their storage rather than discarding the knowledge.
Current implementation after the 9 November follow-up: registered portable/composed
viewing copies and scoped build retention remain. Source/result transport now
uses shared physical-device reservations with a 2 GiB free-space reserve. The
8/4 GiB aggregate directory ceilings introduced on 8 November could reject valid
large/multicomponent jobs; they have been removed specifically from transport.
Other product cache quotas are unchanged. The protocol bounds (2 TiB input,
64 GiB result member / 256 GiB package) also remain unchanged.
After verified archive and catalog publication, only exact result-package payload
duplicates in staging are retired. The immutable manifest and retirement receipt
remain; retries validate archive hashes and reject altered staging. A published
historical transfer can be closed against its original catalog/archive identity
without adding its old definition back to the compute allowlist. Original
publication timestamps and profile labels do not change during a retry.
Registered source copies now have last-consumer retirement as described below.
Other overlay families, unknown historical ownership and Worker build/materialized
inputs still require their own adapters. These remaining classes are not covered
by the local viewing-copy TTL. This is not a hard filesystem quota on arbitrary
scripts, and installed executors/models are not subject to these budgets.
Measured inventory, exact duplicate hashes, protected dependencies and ordered
acceptance gates: [intermediate storage review](../outputs/intermediate-storage-review-20261108/REPORT.md).
The follow-up [legacy LAB and duplicate-storage audit](../outputs/legacy-lab-and-duplicates-20261108/REPORT.md)
removed two unused old UI controllers and their exclusive test after owner approval.
That earlier audit retained the fixed V1 executor. The later owner-authorized
retirement below removes its admission and agent; shared module/API paths remain.
Thirty-three verified duplicate files now share APFS copy-on-write blocks; paths,
hashes and independent file semantics are preserved. The volume free-space delta
was about 247 MB, not the 3.38 GB logical duplicate size. This one-off physical
deduplication does not implement future source/staging retention or retire any
model, executor, configuration or historical evidence.
## Fixed LAB retirement and transport closeout — 8 November 2026
The old combined EoMT+DDRNet setup is removed from current admission/runtime
registries. Its standalone Worker agent was removed using the guarded migration
`deploy/laboratory/retire_fixed_lab_v1.ps1`; modular AI and TGS agents remain.
Actual DDRNet/EoMT weight hashes and shared bindings match the modular assets;
no unique model needed migration. Model files, environments and images remain.
The modular release builder now consumes `modular_model_assets.py` and current
module definitions, not the retired V1 promotion CLI. Frozen V1 registry fixtures
are for compatibility tests only. Old-named shared helpers remain where current
modules depend on them; filename age does not establish dead code.
Three published transport packages have been closed with archive verification
and repeat checks. Their catalog entries, payload archives, viewing copies and
pins remain. Logical duplicate payload volume is recorded separately from actual
physical free space because earlier APFS clones share blocks.
Evidence: [retirement and retention report](../outputs/lab-retirement-transport-20261108/REPORT.md).
## Source transfer lifecycle and capacity — 9 November 2026
`observatory/transfer_space.py` owns a small Core ledger shared by portable source
and result writers. Admission sums outstanding reservations on the target device
and checks actual filesystem free space, keeping 2 GiB free. Bytes already written
release the corresponding reservation to avoid double-counting disk usage. Locks
are held only for brief metadata updates, never across an async upload. Kernel
locks identify live reservations; after a process dies its private UUID reservation
metadata can be removed, including torn metadata, without deleting any partial
payload. Unknown filenames, symlinks and shared filesystem owners are preserved.
This is cooperative admission for these writers, not an OS quota against unrelated
programs or a prediction of a complete GPU run's output size.
A result manifest preflights all missing payload bytes; each actual member reserves
space again before writing. Source members/archives reserve their declared size
before construction. Already complete exact copies are reusable even if no room
remains for new copies. Storage shortage returns HTTP 503 and Retry-After, which
the existing Worker transport treats as transient. No change to model selection,
executor identities, compute allowlists or model retention is involved.
`observatory/source_transport_lifecycle.py` registers only producer-owned source
copies and their original paths/digests/lengths/session owners. The full durable
queue protects accepted/queued/claimed/running/paused/preemption/reconciliation
states, including hidden records. Pending or failed result publication also blocks
source retirement. A terminal failed compute job may release its duplicate only
when its exact source is still recoverable. A new run regenerates the same copy.
All associated session owners must finish; absence from a truncated UI list is
never used to infer liveness.
The existing 15-second publication-maintenance loop runs a separate bounded source
collection pass (up to 8 ledger rows). Cross-process shared reader locks protect
materialization and the complete HTTP response, including Range, errors and
cancellation. A collector needs an exclusive lock and skips while any reader is
active. It verifies every original and the copy, rejects symlinks/hardlinks/changed
identities, records `retiring`, unlinks only the registered duplicate and records
`retired`. Interrupted retirement is repeatable. Camera archive bindings remain;
a missing retired payload regenerates deterministically from admitted originals,
while a present corrupted payload still fails integrity validation.
The source ledger is a compact per-content receipt, not a second payload archive.
Unknown historical source files are not automatically adopted. A one-time audit
must prove ownership/restoration; `collect(only_paths=...)` fences deletion to the
reviewed paths and preserves even other registered copies outside the list.
Original recordings, models/executors, three accepted LABs, Gaussians and semantic
maps are outside this lifecycle. Worker source cache/build/expanded directories
and unowned interrupted payloads remain separate ownership work; no global
recursive cleanup or new age-based purge has been introduced.
Evidence and exact measured cleanup: [9 November closeout](../outputs/lab-source-lifecycle-20261109/REPORT.md).