Expand description
stamp_compilation_metadata — the final pass that turns each
per-partition ModelProto into a complete artifact by writing
the compilation passport + slot binding table into
metadata_props. Install reads these stamps; the typed
BindingSpec Rust struct never crosses the compile boundary
after this pass runs.
Per-partition: each partition’s root function name is the
target identifier. Bindings are stamped against that target.
A future multi-partition merge step concatenates the partitions
into one ModelProto with each target as a distinct entry in
functions[]; this pass is partition-local so the merge can
happen at any granularity.
Slot-id resolution: walk the partition’s NodeProtos for the
(REQUIRED_TRAIT_KEY, SLOT_ID_KEY) pair stamped by the
recorder’s placeholder DSL methods. For each BindingSlot,
find the slot_id whose role matches; dep-only slots (no
NodeProto references) encode as -1.
Functions§
- stamp_
for_ test - Test-only helper: stamp a model with a synthetic
BindingSpecso test fixtures can driveinstall()without running the full compile pipeline. The first FunctionProto’s name is used as thetarget. Bindings are(slot, role, TYPE_NAME)triples; the role string is the canonical PascalCase identifier ("Backend","Index", etc.) — the stamp pass canonicalizes either form.