nx_legal_audit.nx
buildroot/runtime/nx_legal_audit.nx
about
nx_legal_audit.nx -- algorithmic-cleanliness + sovereignty audit.
Per user 2026-05-15: "make sure we are avoiding any legal issues,
we want this all to be nishi bits up superior" + "i dont want to
use a third party just have something similar as i dont want
backdoors, pure nishi lang soverieng".
HARD INVARIANTS (encoded in the verdict logic below):
1. EVERY substrate component is licensed NX_LICENSE_NATIVE_NX.
The engine REFUSES to register anything else. No third-party
code linked, no third-party runtime, no third-party CRT.
2. The (year, author) fields are HISTORICAL CITATION of the
ALGORITHM (the math), NOT dependency provenance. We
reimplemented from the public mathematical idea; the
implementation is 100% NishiLang.
3. We only reimplement algorithms whose underlying math is
patent-clean: pre-1929 (Presburger and earlier), academic
publication with no patent claim, or expired (>20 yrs).
4. Sovereignty check: nx_legal_verify_sovereign() asserts
ZERO non-native licenses across the audit. Returns 1 only
if every entry is NX_LICENSE_NATIVE_NX.
dependencies 1 imports · 1 importers
imports: nx_kernel_v2.nx
imported by: nx_lia_legal_test.nx
structs
| 50 | struct LegalEntry |
| 62 | struct LegalAudit |
consts
| 32 | const NX_LICENSE_PUBLIC_DOMAIN: nx_int = 1 // > 95 years old or formally PD |
| 33 | const NX_LICENSE_MIT: nx_int = 2 |
| 34 | const NX_LICENSE_APACHE2: nx_int = 3 |
| 35 | const NX_LICENSE_BSD3: nx_int = 4 |
| 36 | const NX_LICENSE_BSD2: nx_int = 5 |
| 37 | const NX_LICENSE_NATIVE_NX: nx_int = 6 // our own NishiLang code |
| 38 | const NX_LICENSE_GPL2: nx_int = 100 // contaminating, REFUSED |
| 39 | const NX_LICENSE_GPL3: nx_int = 101 // contaminating, REFUSED |
| 40 | const NX_LICENSE_AGPL3: nx_int = 102 // contaminating, REFUSED |
| 41 | const NX_LICENSE_PROPRIETARY: nx_int = 103 // contaminating, REFUSED |
| 44 | const NX_PATENT_EXPIRED: nx_int = 1 // published > 20 years ago |
| 45 | const NX_PATENT_NEVER_PATENTED: nx_int = 2 // academic publication, no patent claim |
| 46 | const NX_PATENT_OPEN_GRANT: nx_int = 3 // patented but open grant (e.g. AVX intrinsics) |
| 47 | const NX_PATENT_LIVE: nx_int = 100 // active patent, REFUSED unless licensed |
| 60 | const NX_LEGAL_BYTES: nx_int = 56 |
| 67 | const NX_LEGAL_AUDIT_BYTES: nx_int = 24 |
| 126 | const NX_LEGAL_CLEAN: nx_int = 1 |
| 127 | const NX_LEGAL_REVIEW: nx_int = 2 |
| 128 | const NX_LEGAL_REFUSED: nx_int = 3 |
functions
| 69 | func nx_legal_audit_new(cap: nx_int) -> *LegalAudit |
| 77 | func nx_legal_at(a: *LegalAudit, i: nx_int) -> *LegalEntry |
| 85 | func nx_legal_register( called by 4: t4_audit_cleant5_audit_refuses_gplt6_audit_refuses_live_patentmain calls 1: nx_legal_at |
| 114 | func nx_legal_verify_sovereign(a: *LegalAudit) -> nx_int |
| 130 | func nx_legal_verdict(e: *LegalEntry) -> nx_int |
| 144 | func nx_legal_count_clean(a: *LegalAudit) -> nx_int |
| 155 | func nx_legal_count_refused(a: *LegalAudit) -> nx_int |
| 167 | func nx_legal_emit_row(e: *LegalEntry) -> nx_int |
| 178 | func nx_legal_emit_all(a: *LegalAudit) -> nx_int |