You are reading documentation for 0.2.0. The latest release in the 0.2 line is 0.2.2.
The latest stable release is 0.8.4.
Delta Exchange Protocol
Workers exchange assumed changed files and path-only usage. The active implementation is
src/delta/cutoff-service.ts, cutoff-apply.ts and discovery.ts.
Completion and selection
Every writable worker uploads a completion envelope, even with no observations. Names bind
producer/run/attempt, family and manifest digest. Envelopes request seven-day retention by default,
configurable with worker-artifact-retention-days, and remain
after successful/failed aggregation, subject to expiry, external removal or workflow-run deletion.
The aggregate selects one envelope per requested producer, preferring the latest eligible attempt
no newer than its own. Missing required producers and ambiguous/incompatible producers fail prepare.
An optional partition writer may be absent; only its snapshot partitions are imported unless it is
also declared in dependent-jobs. Read-only jobs skip
artifact lookup, download, application and upload.
Retention changes only the requested artifact residence, subject to backend and organization limits. It is not a family/layout dimension or an envelope compatibility requirement. Shorter residence narrows the retry window and may require rerunning expired workers. Base cache expiry and timestamp GC are independent.
Package 6 and manifest 5
The flat package contains delta-package.json, delta-manifest.json and numbered payload/*.bin.
Metadata binds producer repository/workflow/job/run/attempt/source, ref, diagnostic runner platform, family/lineage/restored
key, partition fingerprint and manifest SHA-256. No pre-build digest or old-target precondition exists.
Each partition has sorted unique disjoint lists. Ordinary partitions use cutoff observations:
upserts: normalized relative path, payload locator, SHA-256, size, mode and mtime.usedPaths: normalized relative paths with no payload, checksum, timestamp or mode.
A single-writer contribution adds snapshot: true; its upserts are complete membership, including
an intentional empty list, and usedPaths must be empty. Only the configured producer may declare
this marker. Other jobs leave the partition empty without the marker. A complete snapshot replaces
old managed members; it is never combined with another writer’s binary indexes. User overrides
define the eligible set. Missing snapshots preserve the inherited selection.
Paths must belong to the declared managed partition and avoid reserved metadata. Old schemas and unknown fields are rejected. Sources are copied once and hashed in that pass, with no-symlink and native stability checks before/open/after. Manifest/package identity is sealed before upload; retry must regenerate the same identity, name and payload bytes.
Validation and application
Listing/discovery and selected compressed size are bounded (2 GiB per envelope). Expanded packages are limited to 4 GiB and 200,000 observations. JSON, structure, provenance, unexpected files, ownership, payload checksums/size and aggregate local-state bounds are checked before mutation. ZIP need not preserve source mode/mtime: application restores these fields explicitly.
All target ownership is validated before writes. A payload is copied to excluded scratch on the target filesystem, receives mode/mtime, then replaces its target after native recheck. Old targets are not hashed. Used paths do not recreate missing files or select content. Missing-at-apply usage is forwarded until final presence filtering, including through worker chains.
Same SHA-256, size and mode merge despite differing mtimes, choosing maximum mtime. Different material fails by default. Explicit duplicate-path permission chooses strictly newer mtime; different material at a tied canonical mtime fails. These rules govern aggregate partitions. Single-writer snapshots propagate removals through complete membership, without individual tombstones. Checksums establish package integrity, not producer trust or authorization.
See Base cache design for bounded local recovery, GC and publication. Fresh aggregator replay can conservatively classify identical upserts as changed. Only affected partitions are uploaded; unrelated base objects remain referenced. Read-only finalize skips publication observations and envelope upload.
Complete Groovy workspace transport
A Groovy partition may declare workspaces: sorted complete file membership and
empty-directory paths for each hashed root. Every Groovy upsert must belong to
exactly one structurally complete descriptor with both nonempty metadata files.
File-only or partial contributions fail validation. Changed members select all
members; usage protects the whole workspace. Source directory identities join the
frozen native fingerprint, so directory-only changes also invalidate retry.
After eligible attempts are selected, choose-worker-directory picks the smallest
producer job name in JavaScript UTF-16 ordinal order for each workspace root.
Different roots remain independent. default rejects conflicting full views;
file-level duplicate permissions cannot combine workspace contents. Diagnostics
bound winner/discarded-producer details. Forwarders publish their selected view
under their own identity.
Application preflights ownership and target descendants, stages and verifies a whole unit on the target filesystem, then records durable intent before removing old managed members and installing the replacement. It restores empty directories explicitly. Changed or excluded target obstacles fail closed. Interrupted replacement is recovered on the next prepare by discarding only recorded partial contents as a cache miss; unknown descendants block recovery. This is recoverable per-unit replacement, not a transaction across an entire batch of workspaces.
Base storage uses a descriptor under .mammoth/partition-objects-v1/<partition>/
and native payload paths. Groovy references carry accepted complete workspace roots
so native archive path versions match on restore; descriptors bind membership and
empty directories. Base publication hashes/uploads changed native files without a
new staging copy. Worker envelopes retain their existing complete-unit transport.
Snapshot base transport and recovery
The partitioned-v2 storage family discriminator, CI lifecycle 6 and journal schema 4
isolate the new base format. Worker manifest/package formats remain 5/6. A small
.mammoth/generations-v1/record.json selects exact independent partition objects.
Verified snapshot object transport is renamed into the existing local
.mammoth/partition-snapshots-v1/<partition>/ transport before replacement. Preexisting
managed snapshot files are cleared before restore; unavailable snapshots start empty,
while other validated partitions remain usable. Exact membership and payload hashes
are verified before installation and publication. Maven cross-partition directory
owners recover as a group when one object is unavailable. See
base cache design for record-last publication and eviction recovery.
The journal binds the baseline content digest, selected snapshot digest/source, membership counts, and material replacement decision. Local writer capture copies all frozen members, including old unchanged files. An interrupted first install can regenerate from frozen live sources until its record is durable; a selected snapshot must then retain its identity. Nonwriter local changes never replace the retained archive projection. Deletion-only and last-file removals independently qualify for publication. GC cannot delete individual snapshot files. Standalone uses the same staged transport and pays a full snapshot copy/hash cost; workers also stage the complete snapshot payload for upload. No pre-build ordinary content inventory is added.