code wiki / _hdl_build / nx_lineage_deep.nx
nx_lineage_deep.nx
buildroot/runtime/_hdl_build/nx_lineage_deep.nx
about
nx_lineage_deep.nx -- LIB: DEEPER provenance (R-DEEP). Two real-world traceability gaps closed:
(1) MULTI-PARENT CROSSES -- a hybrid traces to BOTH parents (parent_a x parent_b), and a cross is detected
as such. nx_lineage stored parent_b but only walked parent_a; this reads both.
(2) HARVEST-LOT SPLITTING -- one harvest is a LOT that splits into many child lots (sauce, fresh, seed,
jars, plates), each linked to its parent lot. ANY leaf (a jar on the table) traces back through the
split chain to the harvest -> the plant -> its full seed-to-feed lineage + genetics. "One harvest ->
many plates, each individually traceable to the exact plant and its seed." Conservation: a lot can't
be split beyond what remains. Additive (rule 13). Same bio- store as nx_lineage. license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_lineage.nxnx_seg_store.nxnx_syscalls.nx
imported by: nx_lineage_deep_gate.nx
structs
| none |
consts
| none |
functions
| 13 | func ld_put(prefix: *u8, key: *u8, val: *u8) -> i64 |
| 24 | func ld_parents(prefix: *u8, id: *u8, out_a: *u8, out_b: *u8) -> i64 |
| 30 | func ld_is_cross(prefix: *u8, id: *u8) -> i64 |
| 41 | func ld_cross_label(prefix: *u8, id: *u8, out: *u8) -> i64 |
| 61 | func ld_lot_key(lotid: *u8, out: *u8) -> i64 { var o: i64 = 0; o = as_append(out, o, "lot:" as *u8); o = as_append(out, o, lotid); out[o] = 0 as u8; return o } |
| 62 | func ld_alloc_key(lotid: *u8, out: *u8) -> i64 { var o: i64 = 0; o = as_append(out, o, "lot:alloc:" as *u8); o = as_append(out, o, lotid); out[o] = 0 as u8; return o } |
| 64 | func ld_lot_str(prefix: *u8, lotid: *u8, f: i64, out: *u8) -> i64 |
| 71 | func ld_lot_int(prefix: *u8, lotid: *u8, f: i64) -> i64 |
| 77 | func ld_lot_exists(prefix: *u8, lotid: *u8) -> i64 |
| 85 | func ld_create_lot(prefix: *u8, lotid: *u8, org_id: *u8, quantity: i64, unit: *u8, day: i64) -> i64 |
| 96 | func ld_alloc(prefix: *u8, lotid: *u8) -> i64 |
| 103 | func ld_lot_remaining(prefix: *u8, lotid: *u8) -> i64 { return ld_lot_int(prefix, lotid, 2) - ld_alloc(prefix, lotid) } |
| 105 | func ld_split_lot(prefix: *u8, parent_lotid: *u8, child_lotid: *u8, quantity: i64, unit: *u8, purpose: *u8, day: i64) -> i64 |
| 124 | func ld_lot_trace(prefix: *u8, lotid: *u8, out: *u8) -> i64 |
| 150 | func ld_lot_origin_org(prefix: *u8, lotid: *u8, out: *u8) -> i64 |
| 167 | func ld_render_lot(prefix: *u8, lotid: *u8, out: *u8) -> i64 called by 1: main calls 11: sys_mmapld_lot_origin_orgln_field_stras_appendld_lot_traceas_append_escaped+5 |