code wiki / _hdl_build / nx_hostop.nx
nx_hostop.nx
buildroot/runtime/_hdl_build/nx_hostop.nx
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
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
| 15 | func hostop_receive(pub_ledger: *u8, liveroot: *u8) -> i64 |
| 39 | func hostop_is_ready(pub_ledger: *u8, liveroot: *u8, dest: *u8) -> i64 |
| 70 | func hostop_apply(src: *u8, host_root: *u8, dest: *u8) -> i64 |
| 77 | func hostop_host_rollback(host_root: *u8, dest: *u8) -> i64 |
| 83 | func hostop_apply_verified(pub_ledger: *u8, liveroot: *u8, host_root: *u8, dest: *u8, expect_sha: *u8) -> i64 |
| 96 | func hostop_forbidden_call(code: *u8, n: i64) -> i64 |
| 102 | func hostop_audit_file(path: *u8, allowlisted: i64) -> i64 |
| 130 | func hostop_dns_apply(directive_path: *u8, out: *u8, cap: i64) -> i64 |
| 153 | func hostop_fanout(pub_ledger: *u8, liveroot: *u8, dest: *u8, expect_sha: *u8, host_roots: *i64, nhosts: i64) -> i64 |
| 165 | func hostop_rolling(pub_ledger: *u8, liveroot: *u8, dest: *u8, expect_sha: *u8, host_roots: *i64, nhosts: i64) -> i64 |
| 175 | func hostop_blue_green_stage(host_root: *u8, dest: *u8, color: *u8, src: *u8, expect_sha: *u8) -> i64 |
| 178 | func hostop_blue_green_flip(host_root: *u8, dest: *u8, color: *u8) -> i64 |
| 188 | func hostop_drift(host_root: *u8, dest: *u8, expect_sha: *u8) -> i64 |
| 195 | func hostop_dryrun(host_roots: *i64, nhosts: i64, dest: *u8, expect_sha: *u8) -> i64 |
| 202 | func hostop_idempotent(pub_ledger: *u8, liveroot: *u8, host_root: *u8, dest: *u8, expect_sha: *u8) -> i64 |
| 212 | func hostop_record_apply(host_ledger: *u8, sha: *u8, dest: *u8, host: *u8) -> i64 { return pub_record_ledger(host_ledger, sha, dest, host) } calls 1: pub_record_ledger |
| 214 | func hostop_history(host_ledger: *u8, dest: *u8, out_sha: *u8) -> i64 { return pub_audit_query(host_ledger, dest, out_sha) } |
| 216 | func hostop_metrics(host_ledger: *u8, out: *i64) -> i64 { return pub_dora(host_ledger, out) } |
| 218 | func hostop_notify(notifypath: *u8, kind: *u8, dest: *u8, sha: *u8) -> i64 { return pub_notify(notifypath, kind, dest, sha) } |
| 227 | func hostop_recover(metricspath: *u8, queuepath: *u8, wedge_ms: i64) -> i64 { return pr_recover(metricspath, queuepath, wedge_ms) } |
| 229 | func hostop_host_smoke(port: i64, urlpath: *u8, expect_sha: *u8) -> i64 { return pub_smoke(port, urlpath, expect_sha) } |
| 231 | func 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 |
| 233 | func 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) } |
| 242 | func 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 } |
| 243 | func hostop_prehealth_ok(status: *u8, n: i64) -> i64 |
| 250 | func hostop_supervise_cmd(action: *u8, daemon: *u8, out: *u8) -> i64 |
| 261 | func hostop_watchdog(hbpath: *u8, daemon: *u8, hang_limit_s: i64, now: i64, out: *u8) -> i64 |