code wiki / (root) / nx_site_adapters.nx

nx_site_adapters.nx

buildroot/runtime/nx_site_adapters.nx

6396 B126 linesdepth 6pulls 7 transitivereach 1 importersview sourcekind tooltopic site
docsdependenciesstructsconstsfunctions

about

nx_site_adapters.nx -- THE ADAPTER CENSUS (/compare/mediaingest R8; contract symbol sa_count). WHY: the board's "extractor breadth" row was a CLAIM (yt-dlp 1800+, Harvestr 32 patterns + 39 scrapers) with no number of our own. This organ COUNTS what we actually have and names each, so breadth becomes a measured figure a campaign can drive up -- never a vibe. It counts TWO kinds of adapter, because the estate has two: 1. DATA-TABLE album adapters -- rows in the runtime seg-store plane knowledge/store/mvfetch- (key ad:<host>), each describing where the links live on an album/item page. A new site is an INSERT, not code (nx_mvault_fetch). 2. PER-SOURCE ingester ORGANS -- first-class programs for a named source (nx_4chan), declared as DATA in knowledge/status/source_adapters.conf (organ|source|verified_sites), so adding one is an INSERT there too. Every number is DERIVED (reg_index_len over the plane + a line count of the conf), never hardcoded -- a census that prints a constant is the fabricated-measurement defect. Honest by construction: today the count is small, and the organ says so rather than flattering it. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_registry.nx nx_site_adapters.nx nx_site_adapters_gate.nx

imports: nx_syscalls.nxnx_registry.nx

imported by: nx_site_adapters_gate.nx

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

main sa_w sys_write sa_count 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 ↻ sa_album_count reg_index ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_scan_seglist sa_w ↻ sa_source_count sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close sa_w ↻ sa_wslice sys_write ↻

structs

none

consts

17const SA_PFX: *u8 = "knowledge/store/mvfetch-\x00" // the album-adapter plane (matches nx_mvault_fetch MVF_PFX)
18const SA_IDS: *u8 = "ad:ids\x00" // its newline-separated host index (MVF_IDS)
19const SA_CONF: *u8 = "knowledge/status/source_adapters.conf"
20const SA_CONF_CAP: i64 = 262144
21const SA_HASH: i64 = 35 // '#'
22const SA_NL: i64 = 10
23const SA_PIPE: i64 = 124

functions

25func sa_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
26func sa_n(v: i64) -> i64
36func sa_wslice(buf: *u8, off: i64, len: i64) -> i64 { sys_write(1, ((buf as i64)+off) as *u8, len); return 0 }
called by 1: sa_source_count calls 1: sys_write
40func sa_album_count(idxbuf: *u8, cap: i64, out_bytes: *i64) -> i64
called by 2: sa_countmain calls 1: reg_index
53func sa_source_count(verbose: i64, out_verified: *i64) -> i64
103func sa_count(verbose: i64) -> i64
121func main(argc: i64, argv: *i64) -> i64