nx_external_reach_probe.nx
buildroot/runtime/nx_external_reach_probe.nx
about
nx_external_reach_probe.nx -- continuously probe an external endpoint for
per-stage reachability + latency; alert on degradation.
module: nishi-core.perception.external_reach_probe
depends: nishi-core.perception.profile + nishi-core.perception.perceptual_dataset +
nishi-core.perception.provenance_curve_store + nishi-core.perception.instrument_diagnostician +
nishi-core.net.socket + nishi-core.io.syscalls
disk_kb: 6
capability: PERCEPTION
wired_status: PARTIAL_WIRED (nx_reach_probe_now GRADUATED to basic-glue
2026-05-20: composes nx_https_get + nx_clock_monotonic_ns
for total-time + overall verdict; per-stage
breakdown still queued)
MISSING_CAPABILITIES (still queued):
- PER_STAGE_CLOCK_TAPS (separate DNS / TCP / TLS / HTTP timings;
requires calling nx_https_url_for_fetch + nx_https_url_connect +
nx_tls13_client_session_run + nx_http_get directly with clock taps
between each phase instead of single nx_https_get black box)
- SCHEDULED_PROBE_LOOP (composes with nx_race_timing CONTINUOUS or SCHEDULED
modes already FULLY_WIRED)
- DEGRADATION_ALERT_DISPATCH (composes with nx_instrument_diagnostician
for named-fix output when reachability drops below threshold)
- PEER_HOST_DISPATCH (probe runs from one or more peer hosts so a single
monitoring vantage point doesn't masquerade as "the whole world reaches
us")
- CALLER_PROVIDED_TRUST_STORE_AND_RNG (v1 uses fixed seed + empty trust
store; v2 accepts caller-provided per user-owns-every-bit cardinal)
- DATASET_PERSIST (write result to nx_perceptual_dataset as
DRIFT_OBSERVATION entry; queued behind nx_pds_write_trial wire-up)
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: feedback-substrate-does-heavy-lifting-user-is-partner-not-gate_2026 +
feedback-substrate-primitives-meta-not-one-off_2026 +
feedback-real-playtest-loop-not-just-logs_2026 +
feedback-no-false-ok-substrate-honesty-audit +
nx_realism_score +
NISHIFAMILY_VIDEO_HARDENING_2026-05-20 +
feedback-self-surfacing-intelligence-staged-autonomy
dependencies 8 imports · 3 importers
imports: nx_syscalls.nxnx_perceptual_profile.nxnx_perceptual_dataset.nxnx_provenance_curve_store.nxnx_instrument_diagnostician.nxnx_https_get.nxnx_clock.nxnx_x509_trust_store.nx
imported by: nx_external_reach_probe_test.nxnx_load_test_harness.nxnx_reach_probe_cli.nx
structs
| 123 | struct NxReachProbeResult |
consts
| 71 | const NX_MAGIC_65536: i64 = 65536 |
| 72 | const NX_MAGIC_1718452800: i64 = 1718452800 |
| 73 | const NX_MAGIC_1000000: i64 = 1000000 |
| 77 | const NX_REACH_STAGE_DNS_RESOLVE: i64 = 1 |
| 78 | const NX_REACH_STAGE_TCP_CONNECT: i64 = 2 |
| 79 | const NX_REACH_STAGE_TLS_HANDSHAKE: i64 = 3 |
| 80 | const NX_REACH_STAGE_HTTP_TTFB: i64 = 4 |
| 81 | const NX_REACH_STAGE_PAYLOAD_DOWNLOAD: i64 = 5 |
| 82 | const NX_REACH_STAGE_TOTAL_END_TO_END: i64 = 6 |
| 96 | const NX_REACH_OK: i64 = 0 |
| 97 | const NX_REACH_DEGRADED_SLOW: i64 = 1 // completes but exceeds threshold |
| 98 | const NX_REACH_FAIL_DNS: i64 = 2 |
| 99 | const NX_REACH_FAIL_TCP_TIMEOUT: i64 = 3 // 2026-05-20 nishifamily.com:443 mode |
| 100 | const NX_REACH_FAIL_TLS_HANDSHAKE: i64 = 4 |
| 101 | const NX_REACH_FAIL_HTTP_ERROR: i64 = 5 // 4xx / 5xx |
| 102 | const NX_REACH_FAIL_PAYLOAD_INCOMPLETE: i64 = 6 // received < Content-Length |
| 103 | const NX_REACH_FAIL_DEPENDENCY_MISSING: i64 = 7 // PARTIAL_WIRED default |
functions
| 84 | func nx_reach_stage_name(s: i64) -> *u8 |
| 105 | func nx_reach_verdict_name(v: i64) -> *u8 |
| 168 | func nx_reach_probe_now(endpoint_url_ptr: *u8, endpoint_url_len: i64, |
| 254 | func nx_reach_probe_register_endpoint(endpoint_url_ptr: *u8, endpoint_url_len: i64, |
| 267 | func nx_reach_probe_get_last_result(endpoint_url_ptr: *u8, endpoint_url_len: i64, |
| 278 | func nx_reach_probe_count_failures_in_window(endpoint_url_ptr: *u8, endpoint_url_len: i64, |
| 291 | func nx_reach_probe_diagnose_failure(result_ptr: *NxReachProbeResult, |
| 300 | func nx_reach_probe_get_last_verdict() -> i64 |