Expand description
Binding-run resolution — turning a declared binding into the resolved form a run works from (sources with their bases and change strategies, the process mem a binding writes into), with the typed refusals a malformed declaration earns.
Kernel, not loop: the health surface resolves the process mem for its
projection axis and the read surface resolves a binding run before it
reports findings, so the resolution lives beside the binding store it
reads. Moved here from ingest::resolve on 2026-09-10; the loop and
every consumer path reach it through ingest::resolve.
Re-exports§
pub use crate::pipeline::Source;
Structs§
- Process
MemResolution - How a destination mem’s process mem was resolved: by explicit declaration (
MemConfig.process_memon the destination — wins where present) or by the binding-name convention (the fallback, byte-identical to the pre-declaration behaviour). One resolution function for every consumer — the brief renderer and the open-questions health axis read this and nothing else, so pairing can never drift between surfaces. - Resolved
Ingest - A v2 binding unpacked into the runtime shape the orchestration stages (cursor, brief, selection) consume.
Enums§
- Change
Strategy - A primary source’s resolved change-detection strategy — how “what changed since the last synced pass” is computed for it.
- Resolve
Error - Why a binding could not be resolved. With inline sources the only structural failures left are identity-level: an unknown binding id, or a malformed one.
- Resolved
Source - A binding source resolved to what the run needs: a primary inline source (the territory to read and write back), or a read-only reference mem supplying cross-mem context.
Constants§
- PROCESS_
MEM_ SCHEMA_ NAME - The schema family every process mem pins: a declared process mem
must carry an
ingest@*pin, whatever its version.
Functions§
- derived_
process_ mem_ name - The convention-derived process mem name for a binding, the fallback
where the destination declares none. For a single-component
destination it is the binding id itself (
engine/graph), unchanged since the convention was set. For a nested destination (library/sample) the id’s last separator becomes a hyphen (library/sample-notes): a sibling of the destination in the same namespace directory, because git keeps refs as files in directories and cannot holdlibrary/sample/notesbeside the branchlibrary/sample. The one derivation every consumer uses (the brief renderer, the open-questions health axis), so the two cannot pair differently. A malformed id passes through unchanged. - find_
git_ root - Walk up from
startlooking for a.gitentry (a directory or a file — a submodule/worktree gitlink is a file), returning the directory that contains it (the git work-tree root), orNone. Bounded to 64 ancestors. Pure filesystem, no subprocess — deterministic for tests. - resolve_
binding_ run - Unpack a v2 binding (by canonical id) into the runtime
ResolvedIngestshape the orchestration stages (cursor, brief, selection) consume. - resolve_
change_ strategy - Resolve a primary source’s
ChangeStrategy. A graph-typed source always usesGraph(its signal is the source mem’s snapshot token, which the engine provides). Otherwise the source’s declared strategy wins (none/git/mtime);auto— the default when unset, and any unrecognized value — probes for a git work tree over the source pointer (resolved againstworkspace_root): present →Git, absent →Mtime. - resolve_
process_ mem - Resolve the process mem for
destination_mem.derived_nameis the convention-derived candidate (derived_process_mem_nameof the binding id); pass it even when a declaration might exist — the declaration wins, the derivation remains the fallback. - source_
base_ path - The on-disk base directory a path-based primary source resolves to: the
source pointer joined onto the workspace root (
Path::joinyields the pointer verbatim when it is absolute), or the workspace root itself for an empty pointer. Only meaningful for path-namespaced mediums (codebase / filesystem / git) — a graph pointer is a mem id and a web pointer a URL.