code wiki / _hdl_build / nx_pattern_emit4.nx

nx_pattern_emit4.nx

buildroot/runtime/_hdl_build/nx_pattern_emit4.nx

6593 B94 linesdepth 3pulls 3 transitivereach 5 importersview sourcekind librarytopic pattern
docsdependenciesstructsconstsfunctions

about

nx_pattern_emit4.nx -- PATTERN EMITTERS: PARSER_KAT (shape 6 of 10) + GOVERNOR (shape 7 of 10). PARSER_KAT: bytes -> value with exact KATs (the claim_extract / stl-parse / registry-scan shape -- the Librarian's own cl_parse_int is this shape). Authored core: skip leading ws, parse the decimal run, -1 = REFUSED (no digit; unsigned parse so -1 is unambiguous). GOVERNOR: rate/pace/backoff over per-host state (the polite_crawl shape). Authored core: allow() = min-gap pacing, backoff() = exponential doubling clamped at a cap. All three knobs (gap/base/cap) are SPEC PARAMS baked from the assignment, not magic numbers in the emitter (rule 11: the spec is the config). Test KATs are COMPUTED BY THE EMITTER from the same params (boundary pairs, clamp). Extends nx_pattern_emit (CAPREG231), emit2 (235), emit3 (241). LAWS: struct-free, integer-only, flat ifs, <=6 args per func (filed >6-stack-args miscompile). license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_pattern_emit.nx nx_syscalls.nx nx_pattern_emit4.nx nx_pattern_emit4_demo.nx nx_warden_build.nx

imports: nx_pattern_emit.nxnx_syscalls.nx

imported by: nx_pattern_emit4_demo.nxnx_warden_build.nx

structs

none

consts

none

functions

15func pe4_emit_parser(fd: i64, name: *u8) -> i64
called by 1: pe4_author_parser calls 1: pe_w
38func pe4_emit_parser_test(fd: i64, name: *u8) -> i64
50func pe4_author_parser(name: *u8, modpath: *u8, testpath: *u8) -> i64
59func pe4_emit_governor(fd: i64, name: *u8, min_gap: i64, base: i64, cap: i64) -> i64
73func pe4_emit_governor_test(fd: i64, name: *u8, min_gap: i64, base: i64, cap: i64) -> i64
88func pe4_author_governor(name: *u8, modpath: *u8, testpath: *u8, min_gap: i64, base: i64, cap: i64) -> i64