nx_cam_chaturbate_gate.nx
buildroot/runtime/nx_cam_chaturbate_gate.nx
about
nx_cam_chaturbate_gate.nx -- REFEREE for nx_cam_chaturbate (/compare/mediaingest R9 lr_watch, site half).
NO NETWORK, BY CONSTRUCTION. Every fixture host is under the reserved .invalid TLD and nothing is
ever fetched: the whole subject under test is the adapter's PURE decision core -- the state
machine, the JSON field reader and the CMAF rewrite -- so a flaky exit IP or an offline room can
never make this gate red, and a green here is never evidence that the live endpoint answered.
The live half (one real resolve against one real room) is a separate, declared step and is NOT
claimed by this gate.
The teeth that matter most are the three the incumbent recorder paid for in production:
- a PUBLIC room with an EMPTY url is RESTRICTED, not PUBLIC (else the capture path is handed an
empty input and retries forever);
- 403 is RATELIMIT, not ERROR (else fast retries lengthen a Cloudflare block);
- an unrecognised room_status lands in UNKNOWN and NEVER in a known bucket.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_cam_chaturbate.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 20 | const G_BUFCAP: i64 = 1024 |
| 23 | const G_JSON_PUBLIC: *u8 = "{\"room_status\": \"public\", \"url\": \"https://edge1.example.invalid/live-abc/amlst:xyz/playlist.m3u8?tkn=1\", \"cmaf_edge\": true}" |
| 24 | const G_JSON_RESTRICTED: *u8 = "{\"room_status\": \"public\", \"url\": \"\", \"cmaf_edge\": false}" |
| 25 | const G_JSON_OFFLINE: *u8 = "{\"room_status\": \"offline\", \"url\": \"\"}" |
| 27 | const G_URL_IN: *u8 = "https://edge1.example.invalid/live-abc/amlst:xyz/playlist.m3u8?tkn=1" |
| 28 | const G_URL_CMAF: *u8 = "https://edge1.example.invalid/live-c-fhls/amlst:xyz/playlist_sfm4s.m3u8?tkn=1" |
| 29 | const G_URL_PLAIN: *u8 = "https://edge1.example.invalid/hls/stream.ts" |
| 31 | const G_HTTP_200: i64 = 200 |
| 32 | const G_HTTP_403: i64 = 403 |
| 33 | const G_HTTP_404: i64 = 404 |
| 34 | const G_HTTP_429: i64 = 429 |
| 35 | const G_HTTP_503: i64 = 503 |
| 36 | const G_HTTP_418: i64 = 418 // an unmapped status: must land in UNKNOWN, not in a known bucket |
| 38 | const G_URLLEN_PRESENT: i64 = 40 // any non-zero: the DECISION keys on presence, never on length |
| 39 | const G_URLLEN_EMPTY: i64 = 0 |
functions
| 41 | func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 44 | func g_eqs(buf: *u8, off: i64, len: i64, lit: *u8) -> i64 |
| 54 | func g_has(buf: *u8, n: i64, lit: *u8) -> i64 |
| 68 | func g_decide_lit(status: i64, rs: *u8, url_len: i64) -> i64 |
| 72 | func main() -> i64 |