Skip to main content

COMPUTEUNIT_MODULE_KEY_SOURCE

Constant COMPUTEUNIT_MODULE_KEY_SOURCE 

Source
pub const COMPUTEUNIT_MODULE_KEY_SOURCE: &str = "source";
Expand description

Canonical wasm.pleme.io/v1alpha1/ComputeUnit CRD spec.module.source per-CR wasm-component-reference leaf-scalar sub-block key — the nested spec.module.* child every rendered ComputeUnit YAML carries to name the exact wasm-component artifact the M2.5 wasm-engine instantiator loads at Servico bring-up. Peer of the parent COMPUTEUNIT_SPEC_KEY_MODULE on the same ComputeUnit CRD per-spec.module.* sub-block surface — COMPUTEUNIT_SPEC_KEY_MODULE names the top-level per-CR module- reference block; this constant names the block’s leaf reference- value axis. Every rendered programs[] entry the lareira-fleet-programs library chart consumes carries the module.source: oci://ghcr.io/pleme-io/<caixa>:<versao> (or module.source: file://... for locally-mounted wasm bundles; module.source: github:<owner>/<repo> for git-hosted sources) as its per-Servico wasm-artifact reference; every spec.module.source readback across the [caixa_flux::programs_yaml_entry] round-trip pins + the [caixa_flux::upsert_into_programs_yaml] / [caixa_flux::upsert_into_helmrelease_programs] cross-upsert navigators resolves the same &'static str.

Until this lift landed the byte "source" lived as three verbatim inline literals across caixa_flux’s test-fixture navigators (programs_yaml_entry_round_trips’s entry.get(COMPUTEUNIT_SPEC_KEY_MODULE).and_then(|m| m.get("source")) per-module.source present-check + upsert_into_programs_yaml’s arr[0].get(COMPUTEUNIT_SPEC_KEY_MODULE).get("source") cross- upsert readback + upsert_into_helmrelease_programs’s peer navigator on the HelmRelease-wrapped spec.values.programs[] path). A future ComputeUnit-CRD schema rebrand on the per-module leaf-scalar axis (the substrate moving the reference-value axis to ref: for parity with the OCI Distribution Spec’s per-manifest content-reference nomenclature, to uri: for parity with the WIT Component Model’s per-import content-reference field, to module.oci.ref / module.file.path / module.git.rev sibling- discriminator split once the ComputeUnit CRD grows typed sub-block discriminators as the ABSORPTION-ROADMAP.md M4-M5 trajectory names) without a coordinated three-site edit would silently split the schema: the emitter would write under the drifted leaf-key while every downstream navigator would still probe source: — the lareira-fleet-programs library chart’s per-entry module-source axis would silently receive an empty reference, the workload would silently come up with no wasm module bound (the M2.5 instantiator falls back to the library chart’s admission-time hello-world stub, or fails the bring-up at wasm-engine parse time with a diagnostic far from the caixa.lisp source), and the failure would surface as “the Servico’s pods are running but they aren’t running our code” far from the rebrand commit’s source. Lifting the literal to one &'static str closes the drift footgun structurally — every consumer reads the same memory, so any future rebrand reaches every consumer by construction.

Same “the typed constant lives in one place” discipline the peer COMPUTEUNIT_SPEC_KEY_MODULE / COMPUTEUNIT_SPEC_KEY_TRIGGER / COMPUTEUNIT_SPEC_KEY_CAPABILITIES lifts apply on the sibling substrate-side ComputeUnit-CRD per-spec.* sub-block axis — extends the discipline one level deeper from the top-level spec.* container-axis surface onto the nested spec.module.* leaf-scalar- axis every rendered ComputeUnit YAML declares under its per-CR module-reference block.