code wiki / _hdl_build / nx_research_fetch_cli.nx

nx_research_fetch_cli.nx

buildroot/runtime/_hdl_build/nx_research_fetch_cli.nx

5260 B95 linesdepth 24pulls 155 transitivereach 0 importersview sourcekind tooltopic research
docsdependenciesstructsconstsfunctions

about

nx_research_fetch_cli.nx -- the RUNNABLE DRIVER for rf_fetch_bank. WHY THIS EXISTS: runtime/nx_research_engine.nx carries a complete `rf_fetch_bank(url, name, store, out, cap)` -- the exact symbol knowledge/compare/deepresearch.matrix names as grounding its "Web fetch and bank pipeline" claim -- but the file's own entry point is `func main() -> i64 { return 0 }`, a COMPILE SMOKE. So the capability is real, gated, and grounded, and yet cannot be RUN: no promoted binary anywhere exposes a fetch+bank verb. Same shape as nx_https_get (a smoke main that needed a real CLI beside it) and the ~dozen other build-what-already-exists cases banked this session. ★★★★★A LIBRARY FUNCTION NOBODY CAN INVOKE IS A CAPABILITY ON PAPER: the claim grounds, the gate passes, and the world is never actually touched. CONSEQUENCE THIS UNBLOCKS: deepresearch holds quorum + provenance + freshness + non-vacuity (redseen 1/1) and is short exactly ONE method class. An EXPERIENTIAL row supplies both that class and the require_human leg at once -- but only if the pipeline can be RUN against a real third-party server, because a row whose `observed=` was never observed is prose. This driver is what makes that row honest. nx_research_fetch_cli <url> <name> Fetches over our own TLS + Mozilla trust store, banks raw -> knowledge/fetched/<name>.raw and text -> knowledge/library/<name>.txt, and prints a MACHINE-READABLE observation line for the attestation: RFETCH url=<url> name=<name> rc=<n> banked_bytes=<n> verdict=OK|BANKED-SKIP|FAIL ★EXIT CODE IS THE VERDICT (0 fetched+banked, 1 already banked, 2 usage, 3 trust store, 4 fetch failed) so a caller never has to parse prose -- and, per this session's own law, two different failures never share a code. expect_exit: 0 license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 0 importers

nx_research_engine.nx nx_research_fetch_cli.nx

imports: nx_research_engine.nx

imported by: nobody (leaf or entry point)

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

main rfc_puts nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read 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 trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id sys_mmap ↻

structs

none

consts

27const RFC_OUTCAP: i64 = 1048576
28const RFC_MAGIC_4096: i64 = 4096
29const RFC_STORECAP: i64 = 4194304
30const RFC_CERTS: i64 = 512

functions

32func rfc_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 2: rfc_putnmain
33func rfc_putn(v: i64) -> i64
called by 1: main calls 2: rfc_putssys_munmap
49func main(argc: i64, argv: *i64) -> i64