code wiki / (root) / nx_pamp_meta.nx

nx_pamp_meta.nx

buildroot/runtime/nx_pamp_meta.nx

9981 B240 linesdepth 3pulls 3 transitivereach 7 importersview sourcekind librarytopic pamp
docsdependenciesstructsconstsfunctions

about

nx_pamp_meta.nx -- FALSE-pattern detection (deepest layer). Per [[feedback-unified-immune-architecture-three-tier]] item 2.3: "DEEPEST LAYER recognizing FALSE patterns themselves; deception requires maintenance + maintenance leaves traces; statistical- ensemble across byte+structural+behavioral+temporal+side-channel; disguise can hide in one channel not all." nx_pamp catches KNOWN attack patterns (NOP sled, homoglyph, etc). nx_pamp_meta catches DECEPTION ITSELF -- the subtle inconsistencies that arise when something is pretending to be what it's not. A sophisticated mimic can fool one channel (byte pattern); few can fool ALL channels (byte + timing + structure + entropy + relational). THE STRATEGIC INSIGHT (per user 2026-05-19 mimicry directive, applied INVERSELY here): if WE can fool vendor scanners through mimicry, then ANY adversary trying to fool US faces the same problem -- their disguise has to be consistent across multiple orthogonal channels, and maintenance of multi-channel consistency is exponentially harder than single-channel. V1 channels measured: 1. BYTE_DISTRIBUTION -- chi-squared deviation from expected distribution for declared content type 2. STRUCTURAL_SHAPE -- field count + nesting depth + size ratios 3. TIMING_VARIANCE -- inter-arrival timing of bytes in stream (real systems have hardware-jitter signature; emulated ones don't) 4. ENTROPY_PROFILE -- entropy at start vs middle vs end (legitimate content has a profile; packed/encrypted has different profile) Cross-channel consistency check: each channel returns a per-channel "looks legit" Q10 confidence; the META verdict is HIGH-DECEPTION when channels DISAGREE strongly (one says legit, another says fake) even if each individual channel passes its own threshold. Composes: nx_pamp -- shipped V1; meta layer LAYERS ATOP pamp (pamp is single-channel; meta is multi-channel)

dependencies 3 imports · 4 importers

nx_syscalls.nx nx_tier.nx nx_pamp.nx nx_pamp_meta.nx nx_antibody.nx nx_pamp_meta_test.nx nx_tier1_immune_compose_test.nx nx_tier2_immune_compose_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_pamp.nx

imported by: nx_antibody.nxnx_pamp_meta_test.nxnx_tier1_immune_compose_test.nxnx_tier2_immune_compose_test.nx

structs

101struct NxChannelReading

consts

79const NX_PCM_BYTE_DISTRIBUTION: nx_int = 0
80const NX_PCM_STRUCTURAL_SHAPE: nx_int = 1
81const NX_PCM_TIMING_VARIANCE: nx_int = 2
82const NX_PCM_ENTROPY_PROFILE: nx_int = 3
83const NX_PCM_N_CHANNELS: nx_int = 4
87const NX_PCM_CONSISTENT: nx_int = 0 // all channels agree
88const NX_PCM_SUSPICIOUS: nx_int = 1 // mild disagreement
89const NX_PCM_HIGH_DECEPTION: nx_int = 2 // strong disagreement
90const NX_PCM_UNKNOWN: nx_int = 3 // insufficient data
91const NX_PCM_N_VERDICTS: nx_int = 4
115const NX_PCM_VARIANCE_THRESHOLD_LOW: nx_int = 200 // < 200 = CONSISTENT
116const NX_PCM_VARIANCE_THRESHOLD_HIGH: nx_int = 500 // > 500 = HIGH_DECEPTION

functions

120func nx_pcm_channel_is_valid(c: nx_int) -> nx_int
called by 1: main
126func nx_pcm_verdict_is_valid(v: nx_int) -> nx_int
called by 1: main
138func nx_pcm_reading_new(byte_dist_q10: nx_int,
called by 3: mainmainmain calls 1: sys_mmap
162func _pcm_mean_q10(r: *NxChannelReading) -> nx_int
174func _pcm_abs_diff(a: nx_int, b: nx_int) -> nx_int
186func nx_pcm_max_disagreement_q10(r: *NxChannelReading) -> nx_int
217func nx_pcm_verdict(r: *NxChannelReading) -> nx_int
233func nx_pcm_deception_q10(r: *NxChannelReading) -> nx_int