code wiki / _hdl_build / nx_wiki_devlog.nx
nx_wiki_devlog.nx source
↩ module page · 105 lines · 16315 B
1// nx_wiki_devlog.nx -- S-class LIVE DEVLOG ingestion: banks a work session into the wiki through the
2// sovereign page builder (nx_wiki_shell), so it is itself S-class (same builder nx_wiki_exceed measures).
3// Each capability cites its GATE verdict + the exact reproduce command (evidence that resolves by RE-RUNNING,
4// the strongest form). Freshness-stamped (epoch). Emits web_assets/devlog.html -> nishifamily.com/wiki/devlog.html.
5//
6// SESSION 2026-06-19: this devlog IS the operator's live-sync test -- a command-prompt Claude workstream
7// (close the NIST CODATA external-reference loop, the L3->L4 lever the NIST STEM scorecard names for itself)
8// re-published through the wiki engine at EVERY rung, via a DEDICATED nx_aw_push staging channel (proving an
9// independent workstream push that does not share the shared awpush.* files). Update the R0..R4 markers below
10// + re-run to sync the next rung live. license_tier: ORIGINAL
11import "nx_syscalls.nx"
12import "nx_wiki_shell.nx"
13
14const DL_OUT: *u8 = "web_assets/devlog.html"
15const DL_CAP: i64 = 262144
16
17func main() -> i64 {
18 let now: i64 = sys_now_realtime_sec()
19 let h: *u8 = sys_mmap(DL_CAP)
20 var w: i64 = 0
21
22 let wl: *NxWikiLinks = sys_mmap(128) as *NxWikiLinks
23 sh_links_load(wl, "knowledge/registry/wiki_links.tsv" as *u8)
24 let store: *NxWikiDocStore = sh_corpus_store()
25
26 w = sh_head(h, w, "Devlog \xE2\x80\x94 NIST STEM workstream (2026-06-19)" as *u8, "devlog" as *u8)
27 w = sh_nav(h, w, "devlog" as *u8)
28 w = sh_walk_furniture(h, w, wl, store, "devlog" as *u8)
29
30 w = sh_cat(h, w, "<h1>Devlog — NIST STEM → S-class workstream</h1>\n" as *u8)
31 w = sh_cat(h, w, "<p class=\"fresh\">⟳ Banked LIVE by <code>nx_wiki_devlog</code> at epoch=" as *u8)
32 w = sh_catn(h, w, now)
33 w = sh_cat(h, w, " — re-published through the wiki engine at every rung. Regenerate to refresh.</p>\n" as *u8)
34 w = sh_cat(h, w, "<p class=\"lede\">This page <strong>is</strong> the live-sync test: a command-prompt workstream banked into the wiki through the sovereign page builder (<code>nx_wiki_shell</code>) and re-published at each rung, so progress appears on nishifamily.com in <strong>real time</strong>. The workstream: close the <strong>NIST CODATA external-reference loop</strong> — the exact L3→L4 lever the <a href=\"/wiki/nist_stem.html\">NIST STEM scorecard</a> names for itself. See also: <a href=\"/wiki/start.html\">AI start</a> · <a href=\"/wiki/charter.html\">charter</a>.</p>\n" as *u8)
35
36 w = sh_infobox_open(h, w, "Session 2026-06-19" as *u8)
37 w = sh_infobox_row(h, w, "Workstream" as *u8, "NIST STEM → S-class (CODATA external-reference loop)" as *u8)
38 w = sh_infobox_row(h, w, "Live sync" as *u8, "this page re-published via nx_wiki_shell + nx_aw_push (dedicated channel) at each rung" as *u8)
39 w = sh_infobox_row(h, w, "Method" as *u8, "sovereign-fetch NIST CODATA → organ asserts agreement → liar-kill gate → regrade" as *u8)
40 w = sh_infobox_row(h, w, "Claim" as *u8, "parity on the numbers; exceed only on sovereignty / exactness / provenance" as *u8)
41 w = sh_infobox_row(h, w, "State" as *u8, "THREE external-reference loops (NIST CODATA 12/12 + NIST isotopes 117/118 + intl IUPAC/CIAAW 84/84) + a sovereign NISHI LIBRARY (content-addressed, no-link-rot, running index, 3 docs). Foundationed + sovereign-stored; proper HTML access; no TSV / no curl; hook fixed; bugs fixed <10s" as *u8)
42 w = sh_infobox_close(h, w)
43
44 w = sh_toc_open(h, w)
45 w = sh_toc_item(h, w, "status" as *u8, "Live rung status" as *u8)
46 w = sh_toc_item(h, w, "lever" as *u8, "The lever (why CODATA)" as *u8)
47 w = sh_toc_item(h, w, "method" as *u8, "Method (parity vs exceed)" as *u8)
48 w = sh_toc_item(h, w, "sync" as *u8, "How this page syncs live" as *u8)
49 w = sh_toc_item(h, w, "honest" as *u8, "Honest state" as *u8)
50 w = sh_toc_item(h, w, "refs" as *u8, "Evidence (gates + reproduce)" as *u8)
51 w = sh_toc_close(h, w)
52
53 w = sh_section(h, w, "status" as *u8, "Live rung status" as *u8)
54 w = sh_cat(h, w, "<ul>\n" as *u8)
55 w = sh_cat(h, w, "<li>✓ <strong>R0 — pipeline verified</strong>: PHYSCONST-GATE GREEN (12 constants, 7 SI-exact); live wiki push returns HTTP 200. The command-prompt→engine→live-wiki loop works.</li>\n" as *u8)
56 w = sh_cat(h, w, "<li>✓ <strong>R1 — ingest NIST CODATA as data</strong>: Nishi’s own TLS-1.3 stack fetched the NIST table (2022 CODATA adjustment, status 200, 40801 bytes); <code>nx_codata_ingest</code> extracted all 12 of our constants <strong>mechanically</strong> into <code>codata_reference.tsv</code>. <strong>Finding:</strong> 3 measured constants (electron mass, proton mass, fine-structure) are stale at CODATA-2018 in our registry — the loop caught real transcription drift before any gate was even written.</li>\n" as *u8)
57 w = sh_cat(h, w, "<li>✓ <strong>R2 — verify</strong>: <code>nx_codata_gate</code> compares each constant against the NIST reference (significand + exponent, truncation-aware) and reports per-constant AGREE/DISAGREE. First run: <strong>9 agree, 3 disagree</strong> — it flagged electron mass, proton mass and fine-structure as stale CODATA-2018 values.</li>\n" as *u8)
58 w = sh_cat(h, w, "<li>✓ <strong>R3 — liar-kill gate</strong>: a baked neg-control proves the comparator can tell a wrong value from a right one (a gate that cannot fail is not a gate). Fixed the 3 stale constants to CODATA-2022 <em>from the committed NIST dataset</em> → re-run <strong>GREEN: 12/12 agree, neg-control OK</strong>. The existing PHYSCONST-GATE stayed GREEN (no regression).</li>\n" as *u8)
59 w = sh_cat(h, w, "<li>✓ <strong>R4 — regrade + republish scorecard</strong>: the Math/Chemistry constants rows now read “verified vs the live NIST CODATA-2022 dataset (nx_codata_gate 12/12)”. The <a href=\"/wiki/nist_stem.html\">scorecard</a> is regraded and live; the constants axis crossed L3→L4 — written by the gate’s computed 12/12, not by hand.</li>\n" as *u8)
60 w = sh_cat(h, w, "<li>✓ <strong>R5 — sovereign live-verify (no curl)</strong>: operator law — <em>tests reproducible by OUR system, nothing unproven</em>. <code>nx_nist_verify_gate</code> does a real HTTPS GET of the live page through Nishi’s own TLS-1.3 + the Mozilla CA chain and asserts status 200 + the regrade markers — 6/6 GREEN. The “page is live” proof no longer touches a third-party tool.</li>\n" as *u8)
61 w = sh_cat(h, w, "<li>✓ <strong>R6 — foundationed ingest (lineage to god)</strong>: operator law — <em>no consuming non-foundationed data; trace its lineage to god</em>. <code>nx_codata_foundation</code> content-addresses the NIST table (CID <code>nxc1-77fb90…</code>), binds it to an ed25519-signed <em>downloaded</em>-provenance credential, and proves 3 liar-kills (flipped byte / wrong key / re-bind all REJECTED) + a mechanical 10-hop lineage walk <code>UNI-WIRE→…→ORIGIN(god)</code> — GREEN. The credential is a sovereign NXPC1 blob, not a TSV.</li>\n" as *u8)
62 w = sh_cat(h, w, "<li>✓ <strong>R7 — reference off TSV → sovereign store</strong>: operator law — <em>move away from TSV/3rd-party formats</em>. <code>nx_codata_ingest</code> now writes the NIST reference as content-addressed canonical records into the durable <code>nx_seg_store</code> (the SSOT); <code>nx_codata_gate</code> reads its reference <strong>from the store</strong> (<code>ss_get</code> + <code>canon_decode</code>), not a TSV — 12/12 GREEN from the sovereign store. The <code>.tsv</code> is now a generated human view. Honest follow-up: our own authored registry <code>sci_constants.tsv</code> is still TSV.</li>\n" as *u8)
63 w = sh_cat(h, w, "<li>✓ <strong>R8 — second loop closed: chemistry isotope masses</strong>: the pattern, run end-to-end the right way. Sovereign-fetched the NIST Atomic Weights dataset (354 isotopes, all 118 elements) → <code>nx_isotope_foundation</code> (CID + signed provenance + 10-hop lineage to god) → ingested to the sovereign seg_store → <code>nx_isotope_gate</code> compares our periodic table: <strong>117/118 exact</strong> (1 unverified = Ts-294 not in the NIST subset). The loop <strong>caught 26 isotope-mass drifts incl an At-210 transposition bug</strong> (209.8715→209.9871); all 26 corrected to NIST AME2020 → GREEN, periodic organ regression-clean.</li>\n" as *u8)
64 w = sh_cat(h, w, "<li>✓ <strong>R9 — beyond NIST (international) + proper access</strong>: operator — <em>build the capability to access it properly, hardware-rung-up; stop grepping</em>. Built the sovereign HTML table extractor <code>nx_html_table</code> (gate 9/9, rows×cells + entity-decode, no grep) — the missing access rung. Then closed the <strong>3rd external-reference loop, the FIRST against an international body upstream of NIST</strong>: IUPAC/CIAAW standard atomic weights, foundationed (CID + provenance + lineage) → ingested via <code>nx_html_table</code> → <code>nx_ciaaw_gate</code>. Standard atomic weights are <em>uncertain</em> quantities, so the correct test is agreement <strong>within CIAAW’s stated uncertainty</strong>: <strong>84/84 agree</strong> (34 elements have no standard weight). GREEN.</li>\n" as *u8)
65 w = sh_cat(h, w, "<li>✓ <strong>R10 — the sovereign Nishi library (never link-rot)</strong>: operator — <em>ingest the documents so we OWN them, keep a running index, S-class, fix bugs <10s with no tech debt</em>. Built <code>nx_library</code> (gate 8/8): every ingested document is content-addressed (CID), stored in our own seg_store with a running index, and deduped. <strong>No link rot by construction</strong> — retrieve-by-CID returns byte-identical bytes forever, even with the source gone. Seeded with 3 foundationed docs (NIST CODATA, NIST Atomic Weights, IUPAC/CIAAW); the library CIDs match their foundation CIDs. Two bugs were caught and fixed the moment they appeared (addr-0 segfault from an i64/pointer mismatch; a <code>const *u8</code> indexing parser desync) — no deferred debt.</li>\n" as *u8)
66 w = sh_cat(h, w, "</ul>\n" as *u8)
67
68 w = sh_section(h, w, "lever" as *u8, "The lever — why physical constants first" as *u8)
69 w = sh_cat(h, w, "<p>The <a href=\"/wiki/nist_stem.html\">scorecard</a> grades the whole STEM stack against NIST’s domain references and names its own ceiling: <em>almost everything is checked against hand-transcribed constants or internal oracles, not a live external NIST dataset</em> — exactly the L3→L4 line. The ONE move that lifts a domain is to <strong>close one external-reference loop</strong>: ingest a real NIST dataset and assert agreement programmatically. Physical constants (CODATA) are the cleanest, most foundational choice — a bounded, authoritative dataset that underpins both the Math and Chemistry rows, and our current registry is the literal hand-transcribed case the ceiling describes.</p>\n" as *u8)
70
71 w = sh_section(h, w, "method" as *u8, "Method — parity on the numbers, exceed on sovereignty" as *u8)
72 w = sh_cat(h, w, "<p>Physical constants are <strong>non-novel</strong>: NIST publishes the ground truth, so the honest claim is <strong>parity</strong> — we match NIST exactly (defined constants to the digit; measured constants within NIST’s stated uncertainty). We never claim to “beat” the reference. The S-class <strong>exceed</strong> is only on the sovereign meta-axes: a 100% sovereign implementation (no libc, no MPFR, no cloud), exact/deterministic values, offline, and machine-verified against the published dataset so transcription drift cannot survive. Critically, the <strong>organ computes the verdict</strong> — the grade is never self-asserted.</p>\n" as *u8)
73
74 w = sh_section(h, w, "sync" as *u8, "How this page syncs live" as *u8)
75 w = sh_cat(h, w, "<p>Each rung re-emits this page through <code>nx_wiki_shell</code> (the same builder <code>nx_wiki_exceed</code> grades S-class), then streams it to the served doc-root with the sovereign <code>nx_aw_push</code> — vault-backed SSH, no third-party client. This workstream uses a <strong>dedicated staging channel</strong> (<code>nx_aw_push <src> <dst></code>) so it pushes independently of any other workstream’s <code>awpush.*</code> files — the mechanism that lets multiple command-prompt workstreams sync into one wiki without colliding. A <code>curl</code> 200 + byte-count is the post-push proof.</p>\n" as *u8)
76
77 w = sh_section(h, w, "honest" as *u8, "Honest state (no overclaim)" as *u8)
78 w = sh_cat(h, w, "<p>All five rungs are done and proven, each banked here through the engine as it landed. The constants external-reference loop is closed and live; the scorecard regrade was written by the gate’s computed 12/12, not by hand. Honest scope: this closes <strong>one</strong> loop (physical constants). DLMF special-function breadth, Chemistry WebBook / Atomic Spectra, and Genome-in-a-Bottle remain open loops, so the broader Math / Chemistry / Biology verdicts stay honestly BEHIND — this is a measured foothold, not a claim that pure STEM is now S-class. Exceed is claimed only on the sovereign meta-axes (no libc/MPFR, exact, offline, machine-verified-no-drift); on the numbers it is parity with NIST, which is the point.</p>\n" as *u8)
79 w = sh_cat(h, w, "<p>Honest scope on format sovereignty (operator’s “move off TSV”): the ingested data is now content-addressed and ed25519-signed (a sovereign NXPC1 credential, lineage-traced to god), but the reference values and registries still live in TSV. Migrating those to the sovereign content-addressed store (<code>nx_canon_cid</code> + <code>nx_seg_store</code>) is the next rung — flagged here, not claimed done.</p>\n" as *u8)
80
81 w = sh_refs_open(h, w)
82 w = sh_cat(h, w, "<li><b>nx_phys_constants</b> (PHYSCONST-GATE) — GREEN: constants=12 si_exact=7 exact_value=1 compose_dim=1. Reproduce: <code>./_offc/nx_sov_build_run.elf nx_phys_constants</code></li>\n" as *u8)
83 w = sh_cat(h, w, "<li><b>Live push</b> — <code>nx_aw_push</code> (vault-backed SSH) + <code>curl</code> verify: <code>/wiki/nist_stem.html</code> → HTTP 200. Reproduce: <code>curl -s -o /dev/null -w \"%{http_code}\" https://nishifamily.com/wiki/nist_stem.html</code></li>\n" as *u8)
84 w = sh_cat(h, w, "<li><b>nx_codata_ingest</b> — GREEN: extracted 12/12 NIST values mechanically (selftest OK). Reproduce: <code>./_offc/nx_sov_build_run.elf nx_codata_ingest</code></li>\n" as *u8)
85 w = sh_cat(h, w, "<li><b>nx_codata_gate</b> — GREEN: compared=12 agree=12 disagree=0 negctrl=OK ref=NIST-CODATA-2022. Reproduce: <code>./_offc/nx_sov_build_run.elf nx_codata_gate</code></li>\n" as *u8)
86 w = sh_cat(h, w, "<li><b>nx_nist_verify_gate</b> — GREEN 6/6: sovereign HTTPS GET (Nishi TLS + Mozilla CA), status 200, served-body markers (no curl). Reproduce: <code>./_offc/nx_sov_build_run.elf nx_nist_verify_gate</code></li>\n" as *u8)
87 w = sh_cat(h, w, "<li><b>nx_codata_foundation</b> — GREEN: CID + ed25519 signed provenance + 3 tamper-rejects + 10-hop lineage to god. Reproduce: <code>./_offc/nx_sov_build_run.elf nx_codata_foundation</code></li>\n" as *u8)
88 w = sh_refs_close(h, w)
89
90 w = sh_footer_wl(h, w, wl, "devlog" as *u8, now)
91
92 let fd: i64 = sys_openat_wr(DL_OUT, 0x1a4)
93 if fd < 0 { sys_write(2, "FATAL: cannot open devlog.html\n" as *u8, 31); sys_exit(2); return 2 }
94 sys_write(fd, h, w)
95 sys_close(fd)
96 sys_write(1, "[nx_wiki_devlog] wrote devlog.html bytes=" as *u8, 41)
97 let nb: *u8 = sys_mmap(28); var k2: i64 = 0; var m2: i64 = w
98 if m2 == 0 { nb[0] = 48 as u8; k2 = 1 }
99 while m2 > 0 { nb[k2] = (48 + (m2 % 10)) as u8; m2 = m2 / 10; k2 = k2 + 1 }
100 var q: i64 = k2 - 1
101 while q >= 0 { let o1: *u8 = sys_mmap(1); o1[0] = nb[q]; sys_write(1, o1, 1); q = q - 1 }
102 sys_write(1, "\n" as *u8, 1)
103 sys_exit(0)
104 return 0
105}