code wiki / (root) / nx_arxiv_census_lib.nx

nx_arxiv_census_lib.nx

buildroot/runtime/nx_arxiv_census_lib.nx

2834 B52 linesdepth 0pulls 0 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_arxiv_census_lib.nx -- THE DECISION CORE for the arXiv population census, extracted so that the CLI and its gate drive the SAME arithmetic in-process and cannot disagree by discipline. The estate has measured what happens when two organs must agree and coordinate by hand, so there is exactly one of this function. The question: does opensearch:totalResults reconcile against the entries actually delivered? The REASON is computed first and the VERDICT is derived FROM the reason, and the human text is derived from the reason too, so a verdict cannot drift away from the sentence printed beside it (message fidelity). license_tier: ORIGINAL

dependencies 0 imports · 2 importers

nx_arxiv_census_lib.nx nx_arxiv_census.nx nx_arxiv_census_gate.nx

imports: none

imported by: nx_arxiv_census.nxnx_arxiv_census_gate.nx

structs

none

consts

10const ACV_COMPLETE: i64 = 0
11const ACV_CAPPED: i64 = 1
12const ACV_USAGE: i64 = 2
13const ACV_UNREADABLE: i64 = 3
15const ACR_OK: i64 = 0 // delivered == totalResults: the window is a POPULATION
16const ACR_NO_TOTAL: i64 = 1 // totalResults absent from the body
17const ACR_OVER: i64 = 2 // delivered > totalResults: the two counters disagree
18const ACR_LOCAL_CAP: i64 = 3 // delivered hit THIS organ's slot cap, so the count is a floor
19const ACR_REMOTE_CAP: i64 = 4 // max_results delivered fewer entries than the population

functions

22func ac_reason(total: i64, nd: i64, maxd: i64) -> i64
called by 2: mainac_verdict
30func ac_verdict_of_reason(r: i64) -> i64
called by 2: mainac_verdict
37func ac_verdict(total: i64, nd: i64, maxd: i64) -> i64 { return ac_verdict_of_reason(ac_reason(total, nd, maxd)) }
called by 1: main calls 2: ac_verdict_of_reasonac_reason
39func ac_reason_text(r: i64) -> *u8
47func ac_verdict_text(v: i64) -> *u8