0029 — Explicit base-ingest checkpoints
Status: implementation contract for #402. This adds an operation, not a wire form or a higher lineage limit. All ordinary append/merge rules remain intact.
1. Semantics and admission
A checkpoint creates a new Lineage-v1 root whose active binding identities,
kind, coverage, registry and supported metadata equal a pinned source snapshot.
It omits predecessor-version edges and retained bindings. It MUST NOT be
described as lossless provenance compression. Old history remains reachable
through a create-only snapshot tag; the new root has parents=[].
The initial operation supports only base scalar-bucket and VideoItem storage, one timeline and exact active/Schema agreement. Every retained binding must also belong to an admitted family and have base role. Every removed edge must join the same logical binding and exact modality. Cross-field layers, graph or embedding indexes, text-index bindings, claims, extended forms and unclassified dependency metadata MUST be refused, not stripped. Unknown top-level fields and space_config are initially refused. The latter restriction can be relaxed only after their dependency semantics are covered; it is not a format ban.
The Dataset layer MUST fetch/hash/decode each active Track through its current binding contract before generating/applying a plan. Data payloads are reused by their existing addresses, not downloaded and rewritten. This does not audit every underlying object for pre-existing corruption or completeness.
2. Plan and authority
Planning MUST perform no writes and MUST freeze the candidate bytes, including timestamp/writer. It MUST bind the source hash, Ref, archive tag and a caller supplied non-secret storage scope identifying the backend/bucket. The generic Connector does not attest endpoint identity; supplying that scope correctly is the caller's responsibility. The operation verifies equality, not a credential.
The version-1 SDK plan is a six-element CBOR array:
["ingest-checkpoint/1", scope, ref_name, archive_tag, source_hash_bytes, candidate_manifest_bytes]. This is a durable operation record, NOT a stored
DreamDB Object family or an authority token. Application MUST reconstruct the
allowed transform from the hash-verified source and compare exact candidate
bytes. A caller modifying the serialized seed cannot bypass eligibility checks.
The caller MUST persist the plan before apply and exclude concurrent GC during planning/application. No storage deletion, tag expiry, GC run, arbitrary history reset, or embedding-layer relationship loss is implied by this operation.
3. Publication and recovery
Application MUST reject staged writer state and use a fresh Ref binding. It MUST create/reuse an equal-target immutable tag protecting the source, flush that protection, publish the exact candidate with normal builder checks, flush the Manifest, then CAS the working Ref from the bound source generation. An existing Manifest at the target path MUST match candidate bytes before reuse.
On re-entry, the observed tip MUST be either source or exact candidate. At the candidate, verify source-tag agreement and return success without republishing. At the source, retry the same guarded sequence. Any other tip is a conflict; do not merge, overwrite or silently acknowledge it. Ambiguous transport errors leave local state unadvanced; reopen and reapply the same durable plan.
Multi-object publication is not atomic. A failed application may leave an archive tag or unreferenced Manifest. Do not delete these automatically. Tags are immutable through supported APIs, not backend WORM. Operator tooling must not use generic Ref APIs to overwrite a tag.
4. History, limits and performance
Old history is accessed through the archive tag. A pre-checkpoint branch has no fabricated common ancestor with the new root; automatic cross-epoch merges are not supported. A stale writer must reopen and explicitly retry its input.
ingest_lineage_usage returns exact canonical container bytes and the existing
protocol ceiling. A 70% ingest watermark is a scheduling policy, not guaranteed
headroom. The final builder check remains mandatory. A rejected append can have
written unreachable data objects without advancing the Ref; checkpoint on a
clean reopened handle, never on its staged work.
No throughput multiplier is promised. Successful checkpoint application writes metadata only and must not rewrite media/scalar payloads. All preserved epochs continue to consume storage. This operation does not claim unbounded semantic index capacity, a retention policy, or full-corpus ingest readiness.