code wiki / _hdl_build / nx_user_journey.nx
nx_user_journey.nx
buildroot/runtime/_hdl_build/nx_user_journey.nx
about
nx_user_journey.nx -- TEAM-OWNED real-user journey gate over the LIVE
Nishi sites (operator: "make sure our teams play testing isnt just api but
actually mimics real users interacting with the real site... the core
nishi ecosystem"). This is NOT an API check: it does what a visitor does,
over the real network, on the team's OWN sovereign HTTPS client
(nx_https_get: DNS -> TCP -> TLS 1.3 -> GET, validated certs from the
bits-up trust store; NO curl, NO OpenSSL):
* load the homepage like a browser would,
* READ it: assert the content a human would see is actually there,
* CLICK what it shows: extract internal links from the live HTML and
follow them, asserting each lands on a real page,
* visit the published app contracts (e.g. /tictactoe must serve the
9-cell board contract from the May C0 ship).
First live run 2026-06-09 ALREADY caught a real user-facing regression:
nishifamily.com serves a 745B hub for EVERY path -- /tictactoe (smoke-green
in May, "every endpoint bits-up") returns the hub, not the game. A user
today cannot play. API-level gates never saw it; this gate exists so the
team always does. Composes [[feedback-real-playtest-loop-not-just-logs]].
TRANSPORT IS A TEMPORARY TRANSLATION LAYER (named honestly, Playwright
precedent): /usr/bin/curl as a forked child. The sovereign client
(nx_https_get + trust store) was tried FIRST and is BLOCKED by two filed
defects on this host (2026-06-09): (1) sovereign DNS resolve fails here
(known_good build returns rr=-3, env: WSL resolv stub); (2) the CURRENT
compiler lineage SEGFAULTS on that error path where known_good returns the
error -- compiler divergence repro = _uj_probe.nx. When both close, swap
uj_fetch's body back to nx_https_get with NO caller-side change
(Cardinal 19). Journey logic, contracts, parsing: all bits-up NishiLang.
JOURNEY lines -> stdout + /tmp/nishi_user_journey.log; exit = fails.
Honest scope: HTML-over-the-wire user mimicry. Pixel/DOM-event mimicry in
a real browser engine still needs the SS22.5 sovereign browser-test-runner
(PM plan item; do NOT fake it with claims here).
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 39 | const UJ_MAGIC_1200: i64 = 1200 |
| 40 | const UJ_MAGIC_2000: i64 = 2000 |
| 41 | const UJ_MAGIC_10000: i64 = 10000 |
| 42 | const UJ_MAGIC_50000: i64 = 50000 |
| 43 | const UJ_MAGIC_5000: i64 = 5000 |
| 45 | const UJ_BUF_CAP: i64 = 262144 |
| 46 | const UJ_PAUSE_MS: i64 = 400 // polite inter-request pacing, human-ish |
functions
| 48 | func uj_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } calls 1: sys_write |
| 49 | func uj_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } |
| 50 | func uj_cat_n(dst: *u8, off: i64, v: i64) -> i64 |
| 64 | func uj_find(hay: *u8, n: i64, needle: *u8) -> i64 called by 1: uj_click_links |
| 83 | func uj_count(hay: *u8, n: i64, needle: *u8) -> i64 |
| 103 | func uj_body_off(resp: *u8, n: i64) -> i64 |
| 113 | func uj_status(resp: *u8, n: i64) -> i64 |
| 136 | func uj_fetch_once(url: *u8, buf: *u8, body_ptr: *i64, body_len: *i64, status: *i64) -> i64 |
| 197 | func uj_fetch(url: *u8, buf: *u8, body_ptr: *i64, body_len: *i64, status: *i64) -> i64 |
| 207 | func uj_report(logfd: i64, ts: i64, label: *u8, ok: i64, detail: *u8, num: i64) -> i64 |
| 226 | func uj_streq(a: *u8, b: *u8) -> i64 |
| 238 | func uj_click_links(host: *u8, body: *u8, blen: i64, logfd: i64, ts: i64, cap: i64) -> i64 |
| 308 | func main() -> i64 |