code wiki / (root) / nx_hops_probe.nx

nx_hops_probe.nx

buildroot/runtime/nx_hops_probe.nx

2962 B64 linesdepth 21pulls 155 transitivereach 0 importersview sourcekind probe
docsdependenciesstructsconstsfunctions

about

nx_hops_probe.nx -- PROVE THE REDIRECT-DEPTH OBSERVABLE FIRES. nx_https_last_hops() was added 2026-08-16 because the fetcher walked the redirect chain and threw its length away, so nothing downstream could tell a page that DELIVERED from one that BOUNCED. But an observable that has only ever been read on a NON-redirecting host reads 0, and 0 is exactly what a broken wire also reads. A green that never had a corresponding red is unverified. So this is a two-sided control, run against a caller-supplied url: a direct host -> hops should be 0 (negative control: the counter is not stuck high) a redirecting host -> hops should be >0 (positive control: the counter actually moves) Point it at our OWN edge for the redirect case -- it issues 301s for clean urls -- so proving our instrument costs no third party a single request. Reports NUMBERS, never a verdict: an uncalibrated observable that emits a judgement teaches people to trust a bar nobody measured. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_edgar_lib.nx nx_hops_probe.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_edgar_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main hp sys_write nx_trust_store_load_from_c sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal sys_mmap ↻ edgar_ua_header

structs

none

consts

22const HP_CAP: i64 = 4194304
23const HP_TRUST: i64 = 4194304
24const HP_HOPS: i64 = 6 // same bound the shipped callers pass; not a new number

functions

26func hp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
27func hn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
39func main(argc: i64, argv: *i64) -> i64