code wiki / (root) / nx_substrate_propose.nx

nx_substrate_propose.nx

buildroot/runtime/nx_substrate_propose.nx

9196 B252 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tooltopic substrate
docsdependenciesstructsconstsfunctions

about

nx_substrate_propose.nx -- substrate-native proposal emitter. Reads substrate state files and emits PROPOSALS (never actions) to specs/proposed_changes.jsonl. Humans review + approve. Inputs: specs/card_coverage.tsv -- one row per module: CARDED / WATCH specs/algorithm_cards.jsonl -- current cards (for REWORK detection) specs/substrate_queue.jsonl -- queued algorithms (for INGEST) specs/duplicates.jsonl -- dedup clusters (for CONSOLIDATE_CANDIDATE) Output (stdout, one JSONL proposal per line): {"id":"...","kind":"CARD","target":"<module>","summary_plain":"...", "rationale":"...","status":"pending","created_at":"..."} Per CARDINAL: never RETIRE, never auto-delete. This tool only emits proposals; humans approve them; a separate (deferred) nx_substrate_apply reads approved ones and executes. genealogy_id: bundy_qed_manifesto_1994 + rework_not_retire_cardinal + growing_equilibrium_no_deletion lineage_id: proposal_log + human_oversight_gate axioms: NX_AX_LOGIC_EXCLUDED_MIDDLE (proposal is pending OR approved OR rejected; no fourth state) + NX_AX_REL_ANTISYMMETRY (approval is one-directional: pending -> approved cannot revert without explicit rejection)

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_axioms.nx nx_lex.nx nx_substrate_propose.nx

imports: nx_syscalls.nxnx_runtime.nxnx_axioms.nxnx_lex.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close prop_process_card_coverage sys_mmap ↻ prop_find_next_newline prop_emit print sys_write strlen print_i64 sys_mmap ↻ itoa sys_mmap ↻ sys_write ↻ println sys_write ↻ strlen ↻ sys_mmap ↻ prop_process_queue sys_mmap ↻ prop_find_next_newline ↻ prop_find_key strlen ↻ strneq prop_read_string streq strlen ↻ strneq ↻ prop_emit ↻ print ↻ print_i64 ↻ println ↻

structs

none

consts

39const NX_PROP_MAX_LINE: i64 = 8192

functions

43func prop_find_next_newline(buf: *u8, len: i64, start: i64) -> i64
53func prop_find_key(line: *u8, len: i64, key: *u8) -> i64
called by 1: prop_process_queue calls 2: strlenstrneq
73func prop_read_string(line: *u8, len: i64, pos: i64, out_buf: *u8) -> i64
called by 1: prop_process_queue
105func prop_emit(counter: *i64, kind: *u8, target: *u8,
124func prop_process_card_coverage(buf: *u8, len: i64, counter: *i64) -> i64
182func prop_process_queue(buf: *u8, len: i64, counter: *i64) -> i64
222func main() -> i64