Expand description
Binding format v2 — one record per pipeline.
This is the live binding shape: crate::pipeline_store::load_pipeline_configs
reads it (version-gated), the projection CLI tree writes it, and the
resolve / brief / status / advance paths consume it. A v2 Binding
alone fully defines a pipeline: intent, inline sources (each carrying
what the retired standalone medium + facet records carried), reference
mems, destination, deny paths, coverage semantics, and operations. The
2026-07 consolidation (operator directive, 2026-07-18) removed the
three-file store: the engine reads only this format; memstead projection migrate converts prior generations, and there is no compatibility layer.
Three things live here:
Binding— the versioned record: one file per pipeline, collapsing the medium / facet / binding split into a single record with inlineSourceentries and anoperations { build, sync, verify }block.hash_binding—hash(D): the lowercase-hex SHA-256 of the canonical JSON of the binding’s content-defining projection. Scheduling knobs (trigger/batch_size/post_actions, the sync/verify blocks, prune) are excluded by construction; a source’s selection pattern or pointer changing — now inputs inside the one record — changes the hash.medium_capabilities+validate_binding— the medium-capability matrix (the medium half of a source description keeps the medium vocabulary) and the validation entry point: capability refusals plus in-record source validation (empty / duplicate source names).
The findings store (crate::ingest::findings) keys on hash(D), so the
consolidation’s shape change invalidates prior findings by construction —
accepted and disclosed (findings are re-derivable measurements).
Structs§
- Binding
- A binding, format version 2 — one record per pipeline. The single
versioned file at
projections/<mem>/<name>.jsonthat alone fully defines the obligation:intent, inlineSourceentries (each carrying the medium and facet halves the retired standalone records held),reference_mems,destination_mem,deny_paths,coverage_semantics,rules,prune, and theoperations { build, sync, verify }block. - Build
Operation - The build operation — the only operation carrying a mode. Grows new
coverage (or runs a one-shot lens).
trigger/batch_size/post_actionsare scheduling attributes, excluded fromhash_binding. - Effective
Coverage - The effective coverage of a binding plus its provenance — whether the
value was declared by the author or resolved from the sources’ media.
The fidelity report renders the distinction; every other consumer
reads only
Self::value. - Medium
Capabilities - What a medium can support — the row of the capability matrix for a
MediumType(the medium half of a source description). Pure data;validate_bindingreads it to refuse operations a medium cannot support. - Operations
- The operations block of a
Binding: every operation is optional. An absentbuild/syncblock makes that mutating operation refuse at run time with aprojection enable <op>remedy; an absentverifyblock means engine defaults (verify is read-only — never a refusal).buildis optional in serde so an absent block yields the remedy-bearing refusal rather than a generic “missing field” parse error. - Prune
Config - The prune configuration of a
Binding(F1) — additive, optional. An absentpruneblock means prune is not enabled for the binding (no deletion proposals are produced). Prune has no independent schedule: it rides the sync brief (the sole maintenance-writer channel), so it carries notrigger/batch_size— only the requestedPruneGuarantee. Like thesync/verifyblocks it is excluded fromhash_binding: a maintenance policy never changes what the mem claims. - Sync
Operation - The sync operation — the (future) sole maintenance writer. Optional: an
absent
syncblock makes that mutating operation refuse at run time. Carries no mode. - Verify
Operation - The verify operation — read-only measurement. Optional: an absent
verifyblock means engine defaults, never a refusal (verify is read-only). Carries no mode.
Enums§
- Build
Mode - How a
BuildOperationengages its binding.refinementis deleted from the vocabulary — it is neither a variant here nor migrated, so deserializing"mode": "refinement"fails as an unknown value. - Capability
Error - A validation-time refusal: a capability the source’s medium half cannot support, or a malformed in-record source declaration. Every refusal names the offending source so it is diagnosable without re-reading the store.
- Coverage
Semantics - Coverage semantics — whether the binding claims to cover everything in
its declared scope (
exhaustive) or a deliberately partial slice (curated). - Operation
- A binding operation subject to capability validation.
- Prune
Guarantee - The prune guarantee a binding requests (bundle plan
05-verify-sync-engine, F1). Prune produces deletion proposals surfaced in the sync brief (it never mutates the mem); the guarantee governs how a prune proposal treats a model-side edit that races a source removal.
Constants§
- BINDING_
VERSION - The current binding format version. A v2 binding carries
version: 2. - DEFAULT_
ADJUDICATION_ CAP - Default per-run tier-3 adjudication cap (bundle plan
05-verify-sync-engine, D1/D4). Dogfood-tuned against the liveengine/graphbinding (524 source artifacts): a fully-drifted mem of that scale clears its adjudication backlog in ~11 verify runs while each run’s asserted-drift work stays bounded and its token cost predictable.0disables the cap (adjudicate every candidate). - DEFAULT_
FULL_ RESYNC_ EVERY - Default
full_resync_every(bundle plan05-verify-sync-engine, D3/D4): fire a guaranteed full-enumeration coverage sweep every N verify runs. Dogfood-tuned againstengine/graph(524 artifacts, sample batch 20 → a rotation completes in ~27 runs): a sweep every 20 runs guarantees a complete coverage picture without waiting on the rotation to happen to finish.0disables scheduled full walks (rotating sample only). - DEFAULT_
SCAFFOLD_ DENY_ PATHS - Default
deny_pathsscaffolded onto a fresh enumerable (codebase/filesystem) binding: ordinary platform/tooling debris that would otherwise flood a first denominator. A default, not an invariant — the scaffold materialises the list into the binding record, so an author who wants one of these in scope deletes the entry and gets the files back; bindings created before the default existed keep their recorded (empty) list. Engine state (.memstead/,.memstead.cache/, mount storage) is NOT on this list — its exclusion is unconditional in the strategy layer, never a deletable record entry. - PREPARATION_
IMPL_ VERSION - The engine’s current preparation-implementation version — the single source of truth for “which preparation implementation is live”.
Functions§
- effective_
coverage_ semantics - Resolve a binding’s effective coverage semantics. A declared value
wins (validation has already refused an illegal
exhaustive). An undeclared value resolves per binding, not per source: all sources on enumerable media →exhaustive; at least one non-enumerable source →curated— a mixed binding can only honestly claim the weaker of its parts, because coverage is an obligation of the binding as a whole (the artifact that is measured, reported, and keyed). - hash_
binding - Compute
hash(D)— the lowercase-hex SHA-256 of the canonical JSON of a binding’s content-defining projection. - medium_
capabilities - The capability-matrix row for a medium type. The single source of truth the fidelity report also renders.
- prune_
guarantee_ for_ medium - The strongest prune guarantee a medium can support (F1), derived from
the capability matrix: a base-leg-retrievable medium (git-backed —
codebase / filesystem / git / graph) supports the full never-clobber
three-way merge; a non-retrievable medium (
web) supports only conflict-flag degradation. Validation refuses a request that exceeds this. - validate_
binding - Validate a binding against the medium-capability matrix and the in-record
source rules, returning every refusal (empty
Errnever returned —Okmeans clean). The v2 record needs no external resolution: everything validated lives inside the one record.