nx_handcheck_gate.nx source
↩ module page · 29 lines · 2111 B
1// nx_handcheck_gate.nx -- the REFEREE for nx_handcheck, and it exists for one mechanical reason.
2//
3// nx_handcheck's teeth live behind its `selftest` VERB, exactly as nx_footcheck's do. The gate roster
4// (knowledge/gateroster.conf, run by `nx_gate_roster_run beat`) forks its rows BARE -- measured, not
5// assumed: grr_one() calls gk_run_capture_ms(p, 0, 0, 0, 0, ms, ...) with all four argument slots
6// NULL. A bare fork of nx_handcheck prints its usage line and returns 0, so putting the judge itself
7// on the roster would install a row that is GREEN FOREVER WITHOUT EVER RUNNING A TOOTH. That is the
8// vacuous-detector class this estate keeps paying for: its existence would be counted as coverage and
9// its verdict would be worth nothing. nx_footcheck, nx_clipcheck, nx_mhbench and nx_bodyparts all
10// have that same shape today and all need this same wrapper before they can be rostered.
11//
12// This organ is therefore the roster-facing surface: it takes NO arguments, runs the teeth, and
13// returns gv_verdict's exit code so /api/gate_run and the roster both read a real verdict from the
14// EXIT STATUS rather than from prose.
15//
16// IT ADDS NO RULE OF ITS OWN. There is exactly one hand ruler in the estate (hc_measure) and exactly
17// one set of teeth (hc_teeth), and this organ composes both in-process. It builds its own gv counter
18// and hands it to those same teeth, so declared and executed are equal BY CONSTRUCTION and a tooth
19// added to hc_teeth later appears here and in `nx_handcheck selftest` at the same instant -- neither
20// entry point can drift from the other, because there is only one of them.
21// license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
22import "nx_handcheck.nx"
23
24func main() -> i64 {
25 let ctr: *i64 = gv_ctr()
26 gv_head("nx_handcheck_gate -- the roster surface for the hand structure judge (same teeth, own counter)" as *u8)
27 hc_teeth(ctr)
28 return gv_verdict("HANDCHECK-GATE" as *u8, ctr, "hand structure judge: topological digit discovery, cited phalanx count and monotonic taper, fusion, opposition, abstain on no-hand and on a foot" as *u8)
29}