code wiki / _hdl_build / nx_research_freshness.nx

nx_research_freshness.nx

buildroot/runtime/_hdl_build/nx_research_freshness.nx

11032 B191 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic research
docsdependenciesstructsconstsfunctions

about

nx_research_freshness.nx -- AUTONOMOUS FRESHNESS REVIEW on a cadence. Previously-researched veins get re-checked: is the content MOVING (changed since last review) or STATIC? Maintains freshness_state.txt (<path> <fp> <stable> <reviews>) over the registered veins. Each review cycle re-fingerprints the source and compares to the last-recorded fingerprint: - new source -> BASELINE (first sight) - fingerprint changed -> MOVING (reset stable=0; flag for re-mine -> the vein is active) - fingerprint unchanged -> STATIC (stable++); once stable >= RF_CONST_LIMIT -> CONSTANT (it has hit its limit / is a constant -> recommend BACKING OFF the review cadence) The monthly/other CADENCE is how often this organ is RUN (cron/schedule); CONSTANT veins are flagged so the scheduler can review them less. v1 compares the on-disk .raw fingerprint (detects movement whenever the corpus is re-fetched fresh); production active-refetch needs source-URL persistence (the named next gap). Offline, deterministic, gateable. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_search_inverted_persist.nx nx_itoa_lib.nx nx_research_freshness.nx

imports: nx_search_inverted_persist.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main rf_puts sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close rf_field_end rf_parse_dec sys_openat_wr rf_catbuf rf_streq_rng rf_fp rf_catnum rf_cat sys_renameat rf_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write sys_munmap

structs

none

consts

16const RF_CAP: i64 = 65536
17const RF_CONST_LIMIT: i64 = 3 // consecutive STATIC reviews before a vein is declared a CONSTANT (settled)

functions

19func rf_puts(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
24func rf_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
25func rf_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+i }
called by 1: main
26func rf_catbuf(dst: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { dst[off+i]=src[i]; i=i+1 } return off+n }
called by 1: main
27func rf_catnum(dst: *u8, off: i64, v: i64) -> i64
called by 1: main
34func rf_field_end(buf: *u8, i: i64, end: i64) -> i64
called by 1: main
39func rf_parse_dec(buf: *u8, start: i64, fend: i64) -> i64
called by 1: main
44func rf_streq_rng(buf: *u8, a_off: i64, a_len: i64, b: *u8, b_len: i64) -> i64
called by 1: main
52func rf_fp(buf: *u8, len: i64) -> i64
called by 1: main
60func main() -> i64