code wiki / (root) / nx_install_plan.nx

nx_install_plan.nx

buildroot/runtime/nx_install_plan.nx

11317 B296 linesdepth 5pulls 6 transitivereach 14 importersview sourcekind librarytopic install
docsdependenciesstructsconstsfunctions

about

nx_install_plan.nx -- selection-pipeline output record. SA-6/SA-7 bridge of NISHI_SELF_ASSEMBLY_ROADMAP.md. Captures (probe-snapshot, calibration-snapshot, policy-snapshot, selected-variant-ids, total-cost, verdict) into one canary-bracketed record. The artifact: - SA-6 feeds this to nx_compile (which compiles only the selected variants), then nx_verify (which smoke-runs each on the target) - SA-7 cryptographically attests this record (install_hash = H(probe_snapshot + calibration_snapshot + policy_snapshot + selection)) so future audits can REPLAY the selector against the recorded inputs and reach bit-identical output The plan is content-addressable by construction: same inputs (same probe + same calibration + same policy + same candidate set) MUST yield the same plan. This is the racing-line claim per [[feedback-end-to-end-bit-traceability-architecture]]: every byte from source -> selection -> install has a ProvenanceLink. V1 scope: - Flat snapshot of probe + calibration + policy key fields - selected_variant_ids stored as *i64 array (caller-owned) - canary bracket for tamper-detect - schema versioning for future field additions Deferred per roadmap: - cryptographic install_hash computation (SA-7; will compose with nx_sha256 + nx_blake2b) - in-toto link metadata serialization (SA-7) - Rekor-class append-only audit log (SA-7) - Multi-substrate co-residence (multiple plans on one host) (SA-7) - Replay-from-plan verifier (SA-7) genealogy_id: in_toto_2018 + slsa_2021 + sigstore_2021 + reproducible_builds_2013 + cardinal_2026-05-19_self_assembly lineage_id: substrate_install_plan_v1 nx_capability_manifest: variant_class: install_plan_record variant_id: install_plan_v1

dependencies 5 imports · 11 importers

nx_syscalls.nx nx_probe.nx nx_calibrate.nx nx_select.nx nx_select_joint.nx nx_install_plan.nx nx_install_attest.nx nx_install_attest_signed_test.nx nx_install_attest_test.nx nx_install_hash.nx nx_install_hash_test.nx nx_install_pipeline.nx nx_install_pipeline_test.nx nx_install_plan_test.nx nx_spore_up_lifecycle_test.nx nx_spore_up_network_test.nx

diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.

imports: nx_syscalls.nxnx_probe.nxnx_calibrate.nxnx_select.nxnx_select_joint.nx

imported by: nx_install_attest.nxnx_install_attest_signed_test.nxnx_install_attest_test.nxnx_install_hash.nxnx_install_hash_test.nxnx_install_pipeline.nxnx_install_pipeline_test.nxnx_install_plan_test.nxnx_spore_up_lifecycle_test.nxnx_spore_up_network_test.nxnx_spore_up_test.nx

structs

94struct NxInstallPlan

consts

67const NX_PLAN_CANARY_PRE: i64 = 0x4E58504C414E5000 // "NXPLANP\0"
68const NX_PLAN_CANARY_POST: i64 = 0x004E58504C414E45 // "\0NXPLANE"
70const NX_PLAN_SCHEMA_VERSION: i64 = 1
73const NX_PLAN_VERDICT_UNKNOWN: i64 = 0
74const NX_PLAN_VERDICT_OK: i64 = 1
75const NX_PLAN_VERDICT_PARTIAL: i64 = 2 // some nodes had NONE_MATCH
76const NX_PLAN_VERDICT_NO_FEASIBLE: i64 = 3 // entire pipeline yielded no feasible
77const NX_PLAN_VERDICT_BAD_INPUT: i64 = 4
78const NX_PLAN_VERDICT_N: i64 = 5

functions

80func nx_plan_verdict_is_valid(v: i64) -> i64
136func nx_install_plan_new() -> *NxInstallPlan
180func nx_install_plan_capture(
277func nx_install_plan_is_valid(plan: *NxInstallPlan) -> i64
290func nx_install_plan_variant_id_at(plan: *NxInstallPlan, i: i64) -> i64