nx_civicmap_gate.nx
buildroot/runtime/nx_civicmap_gate.nx
about
nx_civicmap_gate.nx -- GATE for the civic quality-of-life map: CM1 admission, CM2 county join,
CM3 the honest choropleth. Subject: nx_civicmap_lib.nx, imported and exercised IN-PROCESS, so this
gate can never report on a stale deployed artifact instead of the source it names.
WHAT THIS GATE IS ACTUALLY FOR. The easy version of every one of these teeth is vacuous:
* A deny-suite alone proves nothing -- ★A GUARD THAT REFUSES EVERYTHING PASSES EVERY NEGATIVE TEST.
So the first tooth is a POSITIVE control (a complete row MUST be admitted) and every refusal
tooth asserts WHICH RULE FIRED, not merely that something was refused.
* "The map rendered" proves nothing about honesty. The load-bearing tooth is ARITHMETIC: the number
of data-value attributes in the emitted page must EQUAL the number of PRESENT counties. An
implementation that painted suppressed counties with the bottom bucket still renders, still looks
like a map, and fails that count. That is the tooth the trivial wrong version cannot pass.
* Every fixture is built HERE, at runtime, under /tmp/nx_civicmap_gate/ -- never in knowledge/store,
because a gate that shares a fixture with a production beat measures the beat's races and reports
them as the subject's defects.
Preconditions use gv_need, so "I could not write my own fixture" ends SKIP and never RED: a gate that
reports a broken environment in the same word as a broken subject teaches everyone to ignore it.
license_tier: ORIGINAL No hardware writes (Rule 26).
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_geo_raster.nxnx_civicmap_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 24 | const CG_DIR: *u8 = "/tmp/nx_civicmap_gate" |
| 25 | const CG_COUNTIES: *u8 = "/tmp/nx_civicmap_gate/counties.conf" |
| 26 | const CG_DIRTY: *u8 = "/tmp/nx_civicmap_gate/dirty.conf" |
| 27 | const CG_OUT: *u8 = "/tmp/nx_civicmap_gate/map.html" |
| 28 | const CG_MODE_755: i64 = 493 |
| 29 | const CG_MODE_644: i64 = 420 |
| 30 | const CG_SCRATCH: i64 = 64 |
| 36 | const CG_PROBE_LAT: i64 = 40500000 // a latitude inside BOTH fixture squares |
| 37 | const CG_PROBE_LON_WEST: i64 = 74500000 // |longitude| inside the WEST fixture county |
| 38 | const CG_PROBE_LON_EAST: i64 = 72500000 // |longitude| inside the EAST fixture county |
| 39 | const CG_PROBE_LON_NOWHERE: i64 = 60000000 // |longitude| outside EVERY fixture county |
| 40 | const CG_FIPS_WEST: i64 = 10001 |
| 41 | const CG_FIPS_EAST: i64 = 10002 |
| 43 | const CG_QOL_FULL: i64 = 20001 // observed on every declared axis |
| 44 | const CG_QOL_PARTIAL: i64 = 20002 // observed on exactly one |
| 45 | const CG_QOL_NONE: i64 = 20003 // observed on nothing at all |
| 46 | const CG_QOL_DIRPROBE: i64 = 20004 // exists only to probe axis direction |
| 48 | const CG_ACRE_DISCLOSE: i64 = 30001 |
| 49 | const CG_ACRE_NONDISCLOSE: i64 = 48001 |
| 51 | const CG_ASK_TYPICAL: i64 = 5000 // sits inside the recorded band |
| 52 | const CG_ASK_ABSURD: i64 = 500000 // far above the recorded ceiling |
| 53 | const CG_BAND_MEDIAN: i64 = 5000 // the median the fixture band must produce |
| 54 | const CG_BAND_TOP: i64 = 9000 // the highest recorded per-acre sale in the fixture |
| 55 | const CG_MEAN_DRAG_FLOOR: i64 = 180000 // the mean must exceed this once the outliers are added |
| 56 | const CG_CAP_TINY: i64 = 3 |
| 57 | const CG_STATE_LEN: i64 = 2 // a USPS state code is two letters |
| 58 | const CG_PCTL_LO: i64 = 100 // band floor, as a permil percentile of recorded sales |
| 59 | const CG_PCTL_HI: i64 = 900 // band ceiling, likewise |
| 60 | const CG_SAMPLE_CAP: i64 = 64 // comparables the fixture may hold |
| 61 | const CG_MIN_SALES: i64 = 5 // declared minimum comparables for a usable band |
| 62 | const CG_MIN_SALES_UNREACHABLE: i64 = 50 // a minimum this fixture deliberately cannot meet |
| 63 | const CG_ACRE_ONE: i64 = 1000 // milli-acres in one acre |
| 64 | const CG_ASK_CHEAP: i64 = 100 // an asking price far BELOW the recorded floor |
| 65 | const CG_GRID: i64 = 16 |
| 66 | const CG_PIX: i64 = 256 |
functions
| 68 | func cg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 70 | func cg_write_file(path: *u8, body: *u8) -> i64 |
| 79 | func cg_count(buf: *u8, n: i64, lit: *u8) -> i64 |
| 96 | func cg_admit_lit(row: *u8, f: *i64) -> i64 |
| 100 | func main() -> i64 |