code wiki / _hdl_build / nx_uiq_console_lib.nx

nx_uiq_console_lib.nx

buildroot/runtime/_hdl_build/nx_uiq_console_lib.nx

19694 B489 linesdepth 6pulls 7 transitivereach 8 importersview sourcekind librarytopic uiq
docsdependenciesstructsconstsfunctions

about

nx_uiq_console_lib.nx -- F106a console/error capture: the console-analog defect signal, COMPUTED. SOTA ground truth (banked 07-21): console/CSP capture is the highest-ROI automated defect signal (WAREX/CovAgent). For sovereign static surfaces the console-equivalent classes ARE computable from source, deterministically, no fakes: ERRORS: var_undef var(--x) used, never defined, no fallback -> invalid property value dup_id duplicate id= -> broken fragment/aria targets dead_frag href="#x" with no matching id= in the page mixed src="http://..." or <link href="http://..."> on an https page empty_src src="" -> the browser fetches the page itself tag_imbalance unclosed container tag (div/section/table/... open!=close) WARNINGS: var_undef_fb (undefined but fallback saves it) img_noalt (a11y console class) empty_href HONEST ENVELOPE (declared in output): static source scan; <script> BODIES are masked before the HTML-structure scans; lowercase html; CSS-defined custom properties only (JS setProperty unseen); space-separated attributes. Runtime JS errors / real CSP reports need a JS engine = browser-lane, NOT faked here. license_tier: ORIGINAL genealogy: F106a experiential; family nx_uiq_color/contrast/perf

dependencies 1 imports · 3 importers

nx_uiq_color.nx nx_uiq_console_lib.nx nx_uiq_atree_lib.nx nx_uiq_console.nx nx_uiq_console_gate.nx

imports: nx_uiq_color.nx

imported by: nx_uiq_atree_lib.nxnx_uiq_console.nxnx_uiq_console_gate.nx

structs

none

consts

18const CS_CAP_BUF: i64 = 1048576
19const CS_CAP_IDS: i64 = 1024
20const CS_CAP_DETAIL: i64 = 48
21const CS_FIX_FAIL: *u8 = "<html><body><style>:root{--ok:#fff}.a{color:var(--miss)}.b{color:var(--gone,#000)}.c{color:var(--ok)}</style><div id=\"d1\"></div><div id=\"d1\"></div><a href=\"#nope\">x</a><a href=\"#d1\">y</a><a href=\"\">z</a><img src=\"x.png\"><img src=\"y.png\" alt=\"y\"><script src=\"http://x.js\"></script><img src=\"\" alt=\"e\"><div><span>s</span></body></html>" as *u8
22const CS_FIX_PASS: *u8 = "<html><body><style>:root{--ok:#111}.a{color:var(--ok)}</style><div id=\"a\"></div><a href=\"#a\">x</a><img src=\"i.png\" alt=\"i\"><script>let v=1</script><i>var(--)</i></body></html>" as *u8
23const CS_FIX_LIAR: *u8 = "<html><body><style>:root{--ok:#111}.a{color:var(--ok)}</style><div id=\"a\"></div><a href=\"#a\">x</a><img src=\"i.png\" alt=\"i\"><script>let v=1</script><b style=\"color:var(--nope)\">q</b></body></html>" as *u8
24const CS_FIX_MASK: *u8 = "<script>let s='<div id=\"q\">'</script><div></div>" as *u8

functions

33func cs_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8) { n=n+1 } return n }
35func cs_namec(c: i64) -> i64
44func cs_find_from(buf: *u8, n: i64, start: i64, pat: *u8) -> i64
63func cs_span_eq(buf: *u8, o1: i64, l1: i64, o2: i64, l2: i64) -> i64
71func cs_detail(cls: i64, off: i64, len: i64) -> i64
86func cs_mask_scripts(src: *u8, n: i64, dst: *u8) -> i64
112func cs_has_def(buf: *u8, n: i64, noff: i64, nlen: i64) -> i64
137func cs_scan_vars(buf: *u8, n: i64, cnt: *i64) -> i64
165func cs_scan_ids(buf: *u8, n: i64, ioff: *i64, ilen: *i64, cap: i64, dupout: *i64) -> i64
187func cs_scan_frags(buf: *u8, n: i64, ioff: *i64, ilen: *i64, un: i64, cnt: *i64) -> i64
210func cs_scan_imgs(buf: *u8, n: i64, cnt: *i64) -> i64
230func cs_scan_mixed(buf: *u8, n: i64, cnt: *i64) -> i64
256func cs_scan_empty(buf: *u8, n: i64, errc: *i64, warnc: *i64) -> i64
274func cs_count_pat(buf: *u8, n: i64, pat: *u8, nb: i64) -> i64
293func cs_tagpair(mk: *u8, n: i64, opat: *u8, cpat: *u8, name: *u8, emit: i64, first: *i64) -> i64
310func cs_clsname(c: i64) -> i64
324func cs_audit_buf(buf: *u8, n: i64, emit: i64) -> i64
443func cs_slurp(path: *u8, buf: *u8, cap: i64) -> i64
455func cs_selftest() -> i64