code wiki / _hdl_build / nx_langintel_rust_ingest.nx
nx_langintel_rust_ingest.nx source
↩ module page · 30 lines · 1933 B
1// nx_langintel_rust_ingest.nx -- LangIntel LI2: THIN Rust-I-unsound connector.
2// MIGRATED 2026-07-21 to the shared nx_ingest_base ib_gh_issues parser (was an inline copy) = the OO
3// consolidation: this connector is now just {raw, plane, anchor, url_base, label, flags}. Behavior
4// preserved (still rows=2 GREEN on the real corpus). ORACLE/bench-only (F616). No hw writes (Rule 26).
5// expect_exit: 0 license_tier: ORACLE-INDEX
6import "nx_ingest_base.nx"
7import "nx_syscalls.nx"
8
9const RU_STDERR: i64 = 2
10const RU_EXIT_IO: i64 = 1
11const RU_EXIT_RED: i64 = 3
12
13func main() -> i64 {
14 let rows: i64 = ib_gh_issues(
15 "knowledge/fetched/langintel_rust_unsound_p1.raw" as *u8,
16 "knowledge/store/langintel-rustunsound-" as *u8,
17 "\"html_url\":\"https://github.com/rust-lang/rust/issues/" as *u8,
18 "https://github.com/rust-lang/rust/issues/" as *u8,
19 "\"S-has-mcve\"" as *u8,
20 "mcve" as *u8,
21 "nomcve" as *u8)
22 if rows == (0 - 1) { ib_refuse("LANGINTEL-RUST-INGEST" as *u8, "corpus .raw absent or empty" as *u8, "run the fetch: nx_https_get rust-lang I-unsound issues then nx_fs_write knowledge/fetched/langintel_rust_unsound_p1.raw" as *u8); sys_exit(RU_EXIT_IO); return RU_EXIT_IO }
23 if rows == 0 { ib_refuse("LANGINTEL-RUST-INGEST" as *u8, "0 issues parsed from corpus" as *u8, "verify the .raw matches the html_url issue anchor; re-fetch if GitHub JSON shape changed" as *u8); sys_exit(RU_EXIT_RED); return RU_EXIT_RED }
24 if rows == (0 - 2) { ib_refuse("LANGINTEL-RUST-INGEST" as *u8, "store commit failed" as *u8, "check seg-store health for langintel-rustunsound-; retry" as *u8); sys_exit(RU_EXIT_IO); return RU_EXIT_IO }
25 ib_werr("LANGINTEL-RUST-INGEST OK verdict=GREEN rows=" as *u8)
26 ib_wn(RU_STDERR, rows)
27 ib_werr(" plane=langintel-rustunsound- (REAL rust-lang I-unsound; mcve=oracle repro) via ib_gh_issues base\n" as *u8)
28 sys_exit(0)
29 return 0
30}