code wiki / _hdl_build / nx_render_coherence.nx

nx_render_coherence.nx

buildroot/runtime/_hdl_build/nx_render_coherence.nx

4820 B79 linesdepth 3pulls 3 transitivereach 8 importersview sourcekind librarytopic render
docsdependenciesstructsconstsfunctions

about

nx_render_coherence.nx -- the RenderCoherence object: compose-time PREVENTATIVES for the render_bug_register bug classes (the flip side of nx_anatomy_risk, which only DETECTS). First preventative: wet_without_context -- the #1 render bug (7,694 occ = 40% of all tagged failures, sev 0.90). The register's recommended fix is "if a wet token appears with NO plausible wet-context {shower/pool/bath/rain/ocean/swim/beach/sweat} -> strip OR flag". Stripping bare loses intent (rule 25: build intelligence, don't strip), so we REFRAME: incoherent standing-water "wet" (no source -> melted-anatomy artifacts) becomes a coherent photographic SKIN-SHEEN descriptor (dewy/glistening) that renders clean AND no longer trips the detector. Only fires when there is genuinely no wet-context (wet-in-shower is left untouched). Word-boundary matched (case-insensitive) so "wetland"/"sweater" are not touched. Object model: companion_arch.md. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_anatomy_risk.nx nx_render_coherence.nx nx_gen_orchestrator.nx test_render_coherence.nx

imports: nx_syscalls.nxnx_anatomy_risk.nx

imported by: nx_gen_orchestrator.nxtest_render_coherence.nx

structs

none

consts

none

functions

16func go_coherence_enabled() -> i64
24func rc_is_letter(c: i64) -> i64 { if c>=65 { if c<=90 { return 1 } } if c>=97 { if c<=122 { return 1 } } return 0 }
called by 1: rc_wordmatch
26func rc_wordmatch(hay: *u8, hlen: i64, i: i64, needle: *u8) -> i64
called by 1: go_coherence_repair calls 1: rc_is_letter
44func rc_emit(out: *u8, o: i64, s: *u8) -> i64 { var k: i64=o; var i: i64=0; while s[i]!=(0 as u8){out[k]=s[i]; k=k+1; i=i+1} return k }
called by 1: go_coherence_repair
49func go_coherence_repair(prompt: *u8, plen: i64, out: *u8, fired: *i64) -> i64