code wiki / (root) / nx_methyl.nx

nx_methyl.nx

buildroot/runtime/nx_methyl.nx

7236 B175 linesdepth 2pulls 2 transitivereach 28 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_methyl.nx -- cryptographic self-marking (Tier-1 immune). Biology: DNA methylation marks host DNA so restriction enzymes know NOT to cut self. Foreign viral DNA arrives unmethylated; restriction enzymes cleave it. Same principle, software substrate: every Nishi-emitted artifact carries a methyl-mark (originator id + chromatin hash + emission timestamp). Foreign bits lack the mark or carry stale/invalid marks; nx_restriction (queued) refuses them at the IO boundary. THIS IS ALSO THE FOUNDATION FOR MIMICRY DEFENSE. nx_decoy plants fake artifacts that LOOK like Nishi cells but carry NO methyl mark (or a deliberately-invalid one). A scraper reading them gets data that pattern-matches "Nishi cell" but the auth chain doesn't validate against any real chromatin -- so the scrape is detectable AS forgery if it ever shows up downstream. Composes: nx_chromatin -- the canonical originator-chain primitive that methyl marks reference nx_xenocell -- foreign artifacts found in the substrate that lack valid methyl become evidence nx_decoy -- decoy artifacts carry invalid methyl by design so leaked decoys are detectable nx_pamp + nx_crispr -- detection-and-memory primitives nx_restriction (queued) -- IO-boundary check that consumes methyl V1 ships: - struct NxMethylMark with originator/chromatin_hash/ts - mark/verify functions - is_self predicate (returns 1 if mark validates) - "deliberate-invalid" variant for decoy use Gap list (V1 honest perf verdict): - signature is externally supplied (V2 inlines nx_ml_dsa_65) - no canonical bytes-to-mark function; caller supplies hash - no propagation through nx_brane capability tokens (queued) - no peer-mesh sharing of revoked originators (queued) genealogy_id: cardinal_2026-05-19_tier_1_innate_immune_microbial +

dependencies 2 imports · 22 importers

nx_syscalls.nx nx_tier.nx nx_methyl.nx nx_cell.nx nx_cell_anatomy_compose_test.nx nx_cell_test.nx nx_chromatin.nx nx_chromatin_test.nx nx_failover_compose_test.nx nx_game_runtime_compose_test.nx nx_methyl_test.nx nx_microbiome_test.nx nx_mimicry_compose_test.nx

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

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_cell.nxnx_cell_anatomy_compose_test.nxnx_cell_test.nxnx_chromatin.nxnx_chromatin_test.nxnx_failover_compose_test.nxnx_game_runtime_compose_test.nxnx_methyl_test.nxnx_microbiome_test.nxnx_mimicry_compose_test.nxnx_promote_test.nxnx_provenance_chain.nxnx_provenance_chain_test.nxnx_save_slot_test.nxnx_session_audit_compose_test.nxnx_tier1_immune_compose_test.nxnx_tier3_ecology_compose_test.nxnx_trace_log_test.nxnx_vacuole.nxnx_vacuole_test.nxnx_vesicle.nxnx_vesicle_test.nx

structs

74struct NxMethylMark

consts

57const NX_METHYL_OK: nx_int = 0
58const NX_METHYL_ERR_NO_MARK: nx_int = 1
59const NX_METHYL_ERR_BAD_ORIG: nx_int = 2
60const NX_METHYL_ERR_BAD_CHAIN: nx_int = 3
61const NX_METHYL_ERR_STALE: nx_int = 4
62const NX_METHYL_ERR_DECOY: nx_int = 5 // deliberately-invalid

functions

85func nx_methyl_new(originator_id: nx_int,
called by 17: mainmainmainmainmainmain+11 calls 1: sys_mmap
108func nx_methyl_new_decoy(fake_originator_id: nx_int,
called by 2: mainmain calls 1: sys_mmap
136func nx_methyl_is_self(m: *NxMethylMark,
156func nx_methyl_verdict(m: *NxMethylMark,
called by 1: main
172func nx_methyl_is_decoy(m: *NxMethylMark) -> nx_int
called by 2: mainmain