nx_dyad.nx
buildroot/runtime/nx_dyad.nx
about
nx_dyad.nx -- paired-cell side-by-side composition.
Biology: a chromatid dyad is two sister chromatids paired during
cell division -- bound by structure, separate by identity. Paired
biological organs (kidneys, lungs, eyes) operate in parallel with
independent function. nx_dyad runs cell A and cell B side by side
receiving the SAME input, producing separate outputs, with NO
cross-leak between them.
Per [[feedback-cell-immune-system-ransomware-judo-ddos-by-bit]]:
"i want to test game a and test game b in a side by side window
for user or ai or system bot review i can without it garbaging
up everything but also being exclusive so if website a got hit
with ransomware we laugh and delete and shift to website b and
load up c as the new backup."
Naming refusal: nx_compose was the cardinal's tentative name but
it's already taken in the repo for image-composition (rule-of-
thirds visual scoring). nx_dyad keeps biology naming + unambiguous.
Composes:
nx_observatory -- watches dyad outputs from outside (parallel
telemetry without crossing the cells)
nx_brane -- capability tokens ensure A cannot read B's
memory and vice versa
nx_promote -- when one of the dyad cells gets compromised,
its slot in the dyad can be promoted from
a chromatin replica
nx_pathway -- a dyad is a 2-cell pathway with a special
"no cross-edges" constraint
V1 ships:
- struct NxDyad bundling cell_a_id, cell_b_id, both their input
ptrs + output ptrs, both their attention classes
- same_input verbs: feed both A and B from one source buffer
- both_outputs reader: read both outputs without merging
- cross_leak detector: predicate that asserts no shared buffer
Gap list (V1 honest perf verdict):
- cross_leak is a STRUCTURAL check (different buffer pointers);
dependencies 3 imports · 4 importers
imports: nx_syscalls.nxnx_tier.nxnx_attention_class.nx
imported by: nx_dyad_test.nxnx_failover_compose_test.nxnx_observatory.nxnx_observatory_test.nx
structs
| 77 | struct NxDyad |
consts
| 66 | const NX_DY_OK: nx_int = 0 |
| 67 | const NX_DY_ERR_CROSS_LEAK: nx_int = 1 |
| 68 | const NX_DY_ERR_BAD_CLASS: nx_int = 2 |
| 69 | const NX_DY_ERR_BUF_NULL: nx_int = 3 |
| 70 | const NX_DY_ERR_INPUT_DIVERGED: nx_int = 4 // dyad's invariant broken |
functions
| 99 | func nx_dyad_new(cell_a_id: nx_int, cell_a_class: nx_int, |
| 138 | func nx_dyad_feed_same_input(d: *NxDyad, src: *u8, n: nx_size) -> nx_int |
| 156 | func nx_dyad_inputs_match(d: *NxDyad, n: nx_size) -> nx_int |
| 174 | func nx_dyad_outputs_differ(d: *NxDyad, n: nx_size) -> nx_size |
| 193 | func nx_dyad_buffers_isolated(d: *NxDyad) -> nx_int |