code wiki / (root) / nx_beerqa_fetch.nx

nx_beerqa_fetch.nx source

↩ module page · 27 lines · 2000 B

1// nx_beerqa_fetch.nx -- fetch the BeerQA dev split (Stanford, beerqa.github.io) SOVEREIGNLY. BeerQA UNIFIES 2// SQuAD(1-hop) + HotpotQA(2-hop) + newly-annotated 3-hop questions in ONE format tagged by `src` = the whole 3// difficulty ladder in a single dataset (operator's explicit example). 4// ⚠STATUS 2026-07-07: BLOCKED at the TLS HANDSHAKE (pinned via nx_fetch_probe, all 3 paths): TLS1.3, chrome 5// fingerprint, AND TLS1.2 ALL fail at FAIL=HANDSHAKE(tls) -- so it is NOT DNS (resolves), NOT TCP (connects), 6// NOT a TLS-version issue. The handshake reaches negotiation and dies = CERT-VALIDATION (Stanford CA/chain not 7// in our Mozilla store, or an unsupported signature-alg) OR a required cipher/curve our client doesn't offer. 8// Fixing it = a focused TLS arc (dump the ServerHello/cert stage, add the missing CA or cipher). NOT the 9// fetcher's fault (paged/dynamic path proven on HF). ALTERNATIVE TAKEN: MuSiQue (2-4 hop, HARDER than BeerQA's 10// 3-hop tier) is parquet-backed on HF and reachable -> nx_musique_fetch gives us a harder rung without the 11// Stanford TLS arc. Keep this as the ready retry once the handshake is debugged. Run SOLO. 12// expect_exit: 0 license_tier: ORIGINAL 13import "nx_research_engine.nx" 14const K_MAGIC_25165824: i64 = 25165824 15 16func main() -> i64 { 17 let store: *TrustStore = rf_init() 18 if (store as i64) == 0 { rf_puts("beerqa: trust store load failed\n" as *u8); return 1 } 19 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- BeerQA dev v1.0 (1/2/3-hop ladder) -> fetched\n" as *u8) 20 let cap: i64 = K_MAGIC_25165824 // 24MB (dev is 16MB) 21 let out: *u8 = sys_mmap(cap) 22 var ok: i64 = 0 23 rf_section("BeerQA dev v1.0 (Stanford; src-tagged squad/hotpotqa/3-hop)" as *u8) 24 ok = ok + rf_fetch_bank("https://nlp.stanford.edu/projects/beerqa/beerqa_dev_v1.0.json" as *u8, "qab_beerqa_dev" as *u8, store, out, cap) 25 rf_puts("BEERQA BANKED: "); rf_putn(ok); rf_puts(" / 1\n" as *u8) 26 return 0 27}