nx_intent_survival.nx
buildroot/runtime/nx_intent_survival.nx
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
imports: nx_syscalls.nxnx_tier.nxnx_directors_note.nx
imported by: nx_director_pipeline.nxnx_director_pipeline_test.nxnx_intent_survival_test.nx
structs
| 95 | struct SurvivalReport |
consts
| 57 | const NX_IS_SURVIVED: nx_int = 0 // clearly present, recognisable |
| 58 | const NX_IS_PARTIAL: nx_int = 1 // present but drifted (different color, soft proportion shift) |
| 59 | const NX_IS_MISSING: nx_int = 2 // not present at all in the render |
| 60 | const NX_IS_UNMEASURED: nx_int = 3 // no probe ran (caller didn't fill this slot) |
| 61 | const NX_IS_N_VERDICTS: nx_int = 4 |
| 75 | const NX_IS_ELEM_OUTFIT: nx_int = 0 |
| 76 | const NX_IS_ELEM_LOCATION: nx_int = 1 |
| 77 | const NX_IS_ELEM_POSE: nx_int = 2 |
| 78 | const NX_IS_ELEM_AFFECT: nx_int = 3 |
| 79 | const NX_IS_ELEM_PERSPECTIVE: nx_int = 4 |
| 80 | const NX_IS_ELEM_SHOT_SIZE: nx_int = 5 |
| 81 | const NX_IS_ELEM_CAMERA_MOTIVATION: nx_int = 6 |
| 82 | const NX_IS_ELEM_BODY_ARCHETYPE: nx_int = 7 |
| 83 | const NX_IS_N_ELEMS: nx_int = 8 |
| 108 | const NX_IS_REPORT_BYTES: nx_int = 80 // 10 fields * 8 bytes/nx_int |
functions
| 63 | func nx_is_verdict_is_valid(v: nx_int) -> nx_int |
| 85 | func nx_is_elem_is_valid(e: nx_int) -> nx_int |
| 115 | func nx_is_alloc(arc_id: nx_int, moment_seq: nx_int) -> *SurvivalReport |
| 140 | func nx_is_set_verdict(r: *SurvivalReport, elem: nx_int, verdict: nx_int) -> nx_int |
| 149 | func nx_is_get_verdict(r: *SurvivalReport, elem: nx_int) -> nx_int |
| 166 | func nx_is_aggregate(r: *SurvivalReport) -> nx_int |
| 210 | func nx_is_first_missing_underspec(r: *SurvivalReport) -> nx_int |
| 235 | func nx_is_apply_to_dn(r: *SurvivalReport, dn: *DirectorsNote) -> nx_int |