code wiki / _hdl_build / nx_hostop.nx

nx_hostop.nx

buildroot/runtime/_hdl_build/nx_hostop.nx

18700 B267 linesdepth 6pulls 11 transitivereach 12 importersview sourcekind librarytopic hostop
docsdependenciesstructsconstsfunctions

about

nx_hostop.nx -- THE NISHI HOST OPERATOR (library). The single sovereign owner of host-facing application, in COORDINATION with the publisher: the publisher STAGES + verifies a release (records it PUBLISHED in its ledger and drops the bytes in its liveroot); the Host Operator RECEIVES that verified output and applies it to the live host. R1 -- RECEIVE CONTRACT (read-only): hostop_receive reads the publisher's ledger and counts the releases that are APPLY-READY = recorded PUBLISHED AND actually present in the publisher's liveroot. It never re-publishes and never invents work: a ledgered release whose bytes are NOT staged is a PHANTOM and is excluded (you cannot apply what is not staged). This is the seam: host-operator CONSUMES publisher output; it does not reach into a workstream. Composes the publisher's own field/path primitives (DRY, and it IS the coordination partner). license_tier: ORIGINAL

dependencies 3 imports · 12 importers

nx_syscalls.nx nx_publisher.nx nx_pub_recover.nx nx_hostop.nx nx_hostop_apply_gate.nx nx_hostop_ctl_gate.nx nx_hostop_dns_gate.nx nx_hostop_law_gate.nx nx_hostop_obs_gate.nx nx_hostop_progressive_gate.nx nx_hostop_receive_gate.nx nx_hostop_recover_gate.nx nx_hostop_serve_gate.nx nx_hostop_state_gate.nx

diagram shows first 10 each side; +0 more imports, +2 more importers in the complete lists below.

imports: nx_syscalls.nxnx_publisher.nxnx_pub_recover.nx

imported by: nx_hostop_apply_gate.nxnx_hostop_ctl_gate.nxnx_hostop_dns_gate.nxnx_hostop_law_gate.nxnx_hostop_obs_gate.nxnx_hostop_progressive_gate.nxnx_hostop_receive_gate.nxnx_hostop_recover_gate.nxnx_hostop_serve_gate.nxnx_hostop_state_gate.nxnx_hostop_watchdog_gate.nxnx_pub_hostop_e2e_gate.nx

structs

none

consts

none

functions

15func hostop_receive(pub_ledger: *u8, liveroot: *u8) -> i64
39func hostop_is_ready(pub_ledger: *u8, liveroot: *u8, dest: *u8) -> i64
70func hostop_apply(src: *u8, host_root: *u8, dest: *u8) -> i64
77func hostop_host_rollback(host_root: *u8, dest: *u8) -> i64
called by 1: main calls 3: sys_mmappub_joinpub_rollback
83func hostop_apply_verified(pub_ledger: *u8, liveroot: *u8, host_root: *u8, dest: *u8, expect_sha: *u8) -> i64
96func hostop_forbidden_call(code: *u8, n: i64) -> i64
called by 1: hostop_audit_file calls 1: pub_substr
102func hostop_audit_file(path: *u8, allowlisted: i64) -> i64
130func hostop_dns_apply(directive_path: *u8, out: *u8, cap: i64) -> i64
153func hostop_fanout(pub_ledger: *u8, liveroot: *u8, dest: *u8, expect_sha: *u8, host_roots: *i64, nhosts: i64) -> i64
165func hostop_rolling(pub_ledger: *u8, liveroot: *u8, dest: *u8, expect_sha: *u8, host_roots: *i64, nhosts: i64) -> i64
called by 1: main calls 1: hostop_apply_verified
175func hostop_blue_green_stage(host_root: *u8, dest: *u8, color: *u8, src: *u8, expect_sha: *u8) -> i64
called by 1: main calls 1: pub_blue_green_stage
178func hostop_blue_green_flip(host_root: *u8, dest: *u8, color: *u8) -> i64
called by 1: main calls 1: pub_blue_green_flip
188func hostop_drift(host_root: *u8, dest: *u8, expect_sha: *u8) -> i64
195func hostop_dryrun(host_roots: *i64, nhosts: i64, dest: *u8, expect_sha: *u8) -> i64
called by 1: main calls 1: hostop_drift
202func hostop_idempotent(pub_ledger: *u8, liveroot: *u8, host_root: *u8, dest: *u8, expect_sha: *u8) -> i64
212func hostop_record_apply(host_ledger: *u8, sha: *u8, dest: *u8, host: *u8) -> i64 { return pub_record_ledger(host_ledger, sha, dest, host) }
214func hostop_history(host_ledger: *u8, dest: *u8, out_sha: *u8) -> i64 { return pub_audit_query(host_ledger, dest, out_sha) }
called by 1: main calls 1: pub_audit_query
216func hostop_metrics(host_ledger: *u8, out: *i64) -> i64 { return pub_dora(host_ledger, out) }
called by 1: main calls 1: pub_dora
218func hostop_notify(notifypath: *u8, kind: *u8, dest: *u8, sha: *u8) -> i64 { return pub_notify(notifypath, kind, dest, sha) }
called by 1: main calls 1: pub_notify
227func hostop_recover(metricspath: *u8, queuepath: *u8, wedge_ms: i64) -> i64 { return pr_recover(metricspath, queuepath, wedge_ms) }
called by 1: main calls 1: pr_recover
229func hostop_host_smoke(port: i64, urlpath: *u8, expect_sha: *u8) -> i64 { return pub_smoke(port, urlpath, expect_sha) }
called by 1: main calls 1: pub_smoke
231func hostop_health_gate(expect_sha: *u8, host_livepath: *u8, port: i64, urlpath: *u8) -> i64 { return pub_health_gate(expect_sha, host_livepath, port, urlpath) }
calls 1: pub_health_gate
233func hostop_canary(expect_sha: *u8, src: *u8, host_root: *u8, dest: *u8, urlbase: *u8, port: i64, cohort: i64) -> i64 { return pub_canary_rollout(expect_sha, src, host_root, dest, urlbase, port, cohort) }
called by 1: main calls 1: pub_canary_rollout
242func hostop_prehealth_cmd(out: *u8) -> i64 { var o: i64=0; o=fa_cat(out, o, "nx_aw_hostctl status" as *u8); out[o]=0 as u8; return o }
called by 1: main calls 1: fa_cat
243func hostop_prehealth_ok(status: *u8, n: i64) -> i64
called by 1: main calls 1: pub_substr
250func hostop_supervise_cmd(action: *u8, daemon: *u8, out: *u8) -> i64
called by 2: hostop_watchdogmain calls 1: fa_cat
261func hostop_watchdog(hbpath: *u8, daemon: *u8, hang_limit_s: i64, now: i64, out: *u8) -> i64