code wiki / _hdl_build / nx_research_fetch_cli.nx
nx_research_fetch_cli.nx
buildroot/runtime/_hdl_build/nx_research_fetch_cli.nx
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
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
structs
| none |
consts
| 27 | const RFC_OUTCAP: i64 = 1048576 |
| 28 | const RFC_MAGIC_4096: i64 = 4096 |
| 29 | const RFC_STORECAP: i64 = 4194304 |
| 30 | const RFC_CERTS: i64 = 512 |
functions
| 32 | func 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 } |
| 33 | func rfc_putn(v: i64) -> i64 |
| 49 | func main(argc: i64, argv: *i64) -> i64 |