Expand description
Pinning resolution pass.
Rewrites a CompositionNode tree so every Stage node’s id field
holds a concrete noether_core::stage::StageId
(implementation-level hash). After this pass runs, downstream
passes — effect inference, --allow-effects enforcement, Ed25519
verification, planner cost/parallel grouping, budget collection,
grid-broker splitter — can look up stages via store.get(id)
without regard for the original pinning.
§Why a separate pass?
M2 introduced crate::lagrange::Pinning: a Stage node’s id
is either a SignatureId (resolve to the current Active impl) or
an ImplementationId (bit-exact lookup). Teaching every downstream
pass about pinning would have been a dozen file changes, each of
them easy to get wrong.
The pass approach is:
- Call
resolve_pinning(&mut graph, &store)once, after graph construction and after any prefix/name resolution. - Every subsequent pass works on the mutated graph, where
idis guaranteed to be anImplementationIdthat exists in the store.
This commits to “resolve once per execution”. If the store changes between resolution and execution, the resolved graph keeps referring to the old implementation — a feature, not a bug: we want a single execution to see a consistent snapshot.
§What the pass does NOT do
- It does not change the
pinningfield. A node that was declaredPinning::Signaturekeeps that label even after itsidhas been rewritten to an implementation hash. Consumers that re-serialise the graph preserve the user’s original intent (the wire format’spinning: "signature"still means “signature” on a future execution, not “both”). - It does not walk
RemoteStage— that’s resolved at call-time over HTTP, not via the local store.
Structs§
- Multi
Active Warning - Diagnostic raised when a signature-pinned ref matches more than
one Active implementation. See
ResolutionReport::warnings. - Resolution
Report - Output of a successful
resolve_pinningpass. - Rewrite
- Record of one rewrite the pass performed. Useful for tracing:
noether run --trace-resolutioncan print the before/after pairs.
Enums§
- Resolution
Error - Error raised when a
Stagenode’s reference cannot be resolved against the store.
Functions§
- resolve_
pinning - Walk a composition tree and rewrite every
Stagenode’sidfield to a concrete, in-storeStageId. See the module doc for rationale and invariants.