code wiki / (root) / nx_intent_survival.nx

nx_intent_survival.nx

buildroot/runtime/nx_intent_survival.nx

9479 B243 linesdepth 3pulls 3 transitivereach 3 importersview sourcekind librarytopic intent
docsdependenciesstructsconstsfunctions

about

nx_intent_survival.nx -- did the director's intent survive the render? Closes the loop between the DirectorsNote (what was requested) and the rendered image (what came out). Per cardinal feedback-graduated- intervention-no-chainsaw: emits a TIERED verdict (GOOD/DRIFT/BROKEN), never binary pass/fail. === Division of responsibility ===================================== This substrate primitive does TWO things: (a) Defines the typed schema for per-element survival verdicts. Each of the 7 director-named elements (outfit, location, pose, affect, perspective, shot_size, camera_motivation) gets a sealed-enum survival verdict. (b) Aggregates per-element verdicts into a single PreflightTier per the graduated-intervention cardinal: all SURVIVED -> GOOD any MISSING -> BROKEN any PARTIAL (no missing)-> DRIFT What this primitive does NOT do: compute the per-element verdict. That's downstream work (CLIP probe, color histogram, learned classifier, human label, etc.) — its output is fed in as a *i64 array of verdicts. The substrate-typed envelope is the canonical interchange; whoever produces the per-element check (Python now, NishiLang vision primitive when nx_vision_check ships, human reviewer in a labelled batch) all feed the same schema. === Composition ==================================================== nx_directors_note.nx -- DirectorsNote (the requested intent; PreflightTier sealed enum) nx_tier.nx -- nx_int alias genealogy_id: clip_2021 + checklist_alignment_eval + in_toto_2019_provenance + faithful_explanation_inseq_2022 lineage_id: nx_intent_survival_v1

dependencies 3 imports · 3 importers

nx_syscalls.nx nx_tier.nx nx_directors_note.nx nx_intent_survival.nx nx_director_pipeline.nx nx_director_pipeline_test.nx nx_intent_survival_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_directors_note.nx

imported by: nx_director_pipeline.nxnx_director_pipeline_test.nxnx_intent_survival_test.nx

structs

95struct SurvivalReport

consts

57const NX_IS_SURVIVED: nx_int = 0 // clearly present, recognisable
58const NX_IS_PARTIAL: nx_int = 1 // present but drifted (different color, soft proportion shift)
59const NX_IS_MISSING: nx_int = 2 // not present at all in the render
60const NX_IS_UNMEASURED: nx_int = 3 // no probe ran (caller didn't fill this slot)
61const NX_IS_N_VERDICTS: nx_int = 4
75const NX_IS_ELEM_OUTFIT: nx_int = 0
76const NX_IS_ELEM_LOCATION: nx_int = 1
77const NX_IS_ELEM_POSE: nx_int = 2
78const NX_IS_ELEM_AFFECT: nx_int = 3
79const NX_IS_ELEM_PERSPECTIVE: nx_int = 4
80const NX_IS_ELEM_SHOT_SIZE: nx_int = 5
81const NX_IS_ELEM_CAMERA_MOTIVATION: nx_int = 6
82const NX_IS_ELEM_BODY_ARCHETYPE: nx_int = 7
83const NX_IS_N_ELEMS: nx_int = 8
108const NX_IS_REPORT_BYTES: nx_int = 80 // 10 fields * 8 bytes/nx_int

functions

63func nx_is_verdict_is_valid(v: nx_int) -> nx_int
85func nx_is_elem_is_valid(e: nx_int) -> nx_int
115func nx_is_alloc(arc_id: nx_int, moment_seq: nx_int) -> *SurvivalReport
140func nx_is_set_verdict(r: *SurvivalReport, elem: nx_int, verdict: nx_int) -> nx_int
149func nx_is_get_verdict(r: *SurvivalReport, elem: nx_int) -> nx_int
called by 1: main calls 1: nx_is_elem_is_valid
166func nx_is_aggregate(r: *SurvivalReport) -> nx_int
210func nx_is_first_missing_underspec(r: *SurvivalReport) -> nx_int
235func nx_is_apply_to_dn(r: *SurvivalReport, dn: *DirectorsNote) -> nx_int