code wiki / (root) / nx_https_client_gate.nx

nx_https_client_gate.nx

buildroot/runtime/nx_https_client_gate.nx

6495 B106 linesdepth 7pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic https
docsdependenciesstructsconstsfunctions

about

nx_https_client_gate.nx -- THE GATE FOR THE STUB HTTPS CLIENT, 2026-09-03. SUBJECT: nx_https_get and nx_https_post_json AS DEFINED IN nx_https_client.nx, in-process. WHY A GATE FOR A MODULE NOBODY IMPORTS. Measured 2026-09-03: nx_https_client.nx has ZERO importers and nx_https_post_json has ZERO callers, so nothing it does is observable today. It is gated anyway because of what it WOULD do the moment someone imported it: 1. nx_https_post_json performed a **GET** and silently discarded json_body, then reported OK. A function whose NAME is the contract, issuing the wrong method, sending no body, and returning success, cannot be detected by anything downstream. 2. nx_https_get here returned NX_HTTPS_OK without opening a socket -- while the module itself already DEFINED NX_HTTPS_NOT_IMPLEMENTED and never used it. 3. nx_https_get is defined in BOTH this module and nx_https_get.nx (the real one). The first file to import both gets a working implementation SHADOWED by a stub that answers OK. THE TEETH ARE ABOUT THE DIRECTION OF FAILURE, NOT ABOUT FEATURES. There is no correct HTTPS behaviour to assert here -- the module is a declared composition framework. What must be true is that an unimplemented path FAILS LOUD. So every tooth checks that the verdict is NOT the success value, and T3 pins the two constants apart so a future edit cannot quietly define them equal. T5 IS THE ANTI-VACUITY TOOTH. T1/T2 assert "verdict != OK", which a function returning any garbage would pass. T5 demands the verdict be exactly NX_HTTPS_NOT_IMPLEMENTED -- the named refusal -- so an uninitialised or arbitrary value cannot score a pass. Teeth, in order: T1 nx_https_get does NOT report success for a request it never made. T2 nx_https_post_json does NOT report success for a body it never sent. T3 NX_HTTPS_OK and NX_HTTPS_NOT_IMPLEMENTED are distinct values (so T1/T2 can discriminate). T4 post_json does not scribble the caller's body buffer: the sentinel written there survives. T5 ANTI-VACUITY: the verdict is the NAMED refusal, not merely non-OK. T6 post_json reports no body and no bytes -- a refusal that claimed bytes would invite a read. MEASURED 6/6 GREEN 2026-09-03 on the laptop. Bite locally INCONCLUSIVE (9 valid mutants, 0 kills) and the reason is named rather than hidden: the laptop nx_gate_bite runs only operators 1/2a/2b, while the NAS binary also runs 3 (NUMERIC CONSTANT) and 4 (SYMBOL-TARGETED). The two corrected functions are straight-line constant assignments carrying no comparisons and no literals, so operator 4 is the only one that could reach them -- a local INCONCLUSIVE is a fact about the weaker tester, NOT evidence about this gate. Bite it on the NAS. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_https_client.nx nx_https_client_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_https_client.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻

structs

none

consts

44const HCG_CAP: i64 = 4096
45const HCG_SENTINEL: i64 = 0xA5
46const HCG_NOW: i64 = 1788470000

functions

48func main(argc: i64, argv: *i64) -> i64
calls 2: gv_ctrgv_head