code wiki / (root) / nx_bright_rewrite_run.nx

nx_bright_rewrite_run.nx

buildroot/runtime/nx_bright_rewrite_run.nx

9598 B151 linesdepth 11pulls 38 transitivereach 0 importersview sourcekind tooltopic bright
docsdependenciesstructsconstsfunctions

about

nx_bright_rewrite_run.nx -- R0l-d: the SOVEREIGN reasoning-rewrite run for BRIGHT (search R0l, 2026-09-16). The program is a thin door over nx_bright_rewrite_lib (the lib carries the run, the two engine doors, the lease, the idempotent re-run and the split verdict, so nx_bright_rewrite_gate can drive every rule in-process). argv are key=value only (so nx_sov_build_run --qualify can forward them): gguf=<path> | engine=a.b.c.d:port -- ONE of the two engine doors is required: in-process weights, or a sovereign nx_nofloat_serve on the LAN (POST /gen); a NAS plan row names the compute node's engine and the NAS never loads the model root=<bright root> out=<name> [mode=reason|concat] [maxnew=512] [limit=0] [split=<one split>] [temp=<permil, 0 = greedy> topp=<permil> topk=<n> seed=<n>] -- sampling as DATA: the NAS smoke (2026-09-16) showed greedy decoding looping on the same paragraph by the third step, so a run may declare the paper's sampling instead; the seed keeps a sampled run reproducible byte for byte and every receipt names the values. [lease_ttl=<s>] [progress=<path>] Exit 0 every requested split COMPLETE, COMPLETE-EXISTING or SMOKE / 1 any split PARTIAL, LEASED-ELSEWHERE, ALL-PASSTHROUGH or UNREADABLE / 2 usage / 3 model load failed / 4 the engine went down mid-run (rows kept). license_tier: ORIGINAL. No hw writes (Rule 26).

dependencies 1 imports · 0 importers

nx_bright_rewrite_lib.nx nx_bright_rewrite_run.nx

imports: nx_bright_rewrite_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main br_starts br_streq br_slen br_atoi brr_usage br_puts br_slen ↻ sys_write br_puts ↻ br_eng_alloc sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ br_engine_parse br_engine_timeout_s br_find br_slen ↻ br_slen ↻ br_putn sys_mmap ↻ sys_write ↻ nsv_init_i8 nsv_init sys_now_ms sys_mmap ↻ sys_clock_gettime_mono nsv_log

structs

none

consts

19const BRR_EXIT_OK: i64 = 0
20const BRR_EXIT_PARTIAL: i64 = 1
21const BRR_EXIT_USAGE: i64 = 2
22const BRR_EXIT_MODEL: i64 = 3
23const BRR_EXIT_ENGINE: i64 = 4

functions

25func brr_usage() -> i64
called by 1: main calls 1: br_puts
30func main(argc: i64, argv: *i64) -> i64