nx_warden_lib.nx
buildroot/runtime/nx_warden_lib.nx
about
nx_warden_lib.nx -- the Warden's reusable POLICY (no main). The single source
of cardinal-truth for autonomous actions, so every role-program that must
authorize an action (the Conductor/guardian self-heal, the demo cockpit) shares
ONE policy -- no duplicated cardinals (the genealogist's reuse discipline).
Law (inherited cardinals): #13 additive-only (never hard-delete, never overwrite
source autonomously); additive-safe heal (swap-to-known-good only if a proven
backup exists AND the target is a regenerable build artifact); DENY-by-default.
license_tier: ORIGINAL
dependencies 1 imports · 7 importers
imports: nx_syscalls.nx
imported by: nx_conductor_live.nxnx_council_gate.nxnx_crew_selfheal.nxnx_import_probe.nxnx_self_build.nxnx_unified_conductor.nxnx_warden.nx
structs
| none |
consts
| 13 | const W_HEAL_SWAP: i64 = 1 // restore a pinned known-good over a build artifact |
| 14 | const W_DELETE: i64 = 2 // hard-delete a path |
| 15 | const W_OVERWRITE_SRC: i64 = 3 // overwrite a source file |
| 16 | const W_ADDITIVE: i64 = 4 // append / write a NEW file (additive) |
| 18 | const W_ALLOW: i64 = 1 |
| 19 | const W_DENY: i64 = 0 |
| 21 | const W_AUDIT: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/_offc/nx_warden_audit.log" |
| 22 | const W_MODE_FILE: i64 = 420 |
functions
| 24 | func w_wstr(fd: i64, s: *u8) -> i64 |
| 32 | func w_contains(hay: *u8, needle: *u8) -> i64 called by 1: w_is_build_artifact |
| 48 | func w_kind_name(k: i64) -> *u8 |
| 58 | func w_is_build_artifact(path: *u8) -> i64 |
| 65 | func warden_check(kind: i64, target: *u8, has_backup: i64) -> i64 |
| 77 | func w_audit(kind: i64, target: *u8, verdict: i64) -> i64 |
| 90 | func warden_authorize(kind: i64, target: *u8, has_backup: i64) -> i64 called by 8: mainmainnx_warden_council_authorizemainmainnx_self_build_authorize+2 calls 2: warden_checkw_audit |