code wiki / _hdl_build / nx_dp_reclassify.nx

nx_dp_reclassify.nx

buildroot/runtime/_hdl_build/nx_dp_reclassify.nx

7028 B127 linesdepth 4pulls 10 transitivereach 2 importersview sourcekind tooltopic dp
docsdependenciesstructsconstsfunctions

about

nx_dp_reclassify.nx -- SOVEREIGN per-doc reclassification (operator: "full secret isolation -- a de-listed doc's bytes must also leave the public shard"). Given (domain, cid): copy the doc [+ its url row] into a PRIVATE classified shard dp-<domain>-secret- (a DIFFERENT physical prefix => the public search's ss_open(dp-<domain>-pub-) can NEVER read it -- isolation by construction, the same law as -pub-/-prv-), then TOMBSTONE it in the public shard so dss_search + /doc + dp_read all miss it AT ONCE. ADDITIVE BY CONSTRUCTION (Rule 13): the tombstone is a NEW segment (ss_next_segid); the immutable public segment is never mutated and full history survives (ss_scan_all). This is LOGICAL eviction from every live surface -- it does NOT physically erase the bytes from the public segment file on disk (that would require a destructive segment rewrite, which the immutable-store law forbids; see the review notes). license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_docportal_lib.nx nx_itoa_lib.nx nx_docportal_search_seg.nx nx_dp_reclassify.nx nx_dp_leak_gate.nx nx_dp_reclassify_gate.nx

imports: nx_docportal_lib.nxnx_itoa_lib.nxnx_docportal_search_seg.nx

imported by: nx_dp_leak_gate.nxnx_dp_reclassify_gate.nx

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

main dpr_puts dpr_atoi dpr_run dp_read sys_mmap dp_prefix dp_cat dp_key dp_cat ↻ dp_catn sys_mmap ↻ ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_cat ↻ ss_loadfile ss_load_aux2 ssl_total_keys ssl_pow2 ssl_build ss_r32 ssl_lookup ss_manifest_free sys_munmap ssc_retire_handle ss_hget sys_mmap ↻ ss_idx_find ss_r32 ↻ ss_len ss_kcmp

structs

none

consts

15const K_MAGIC_2048: i64 = 2048

functions

17func dpr_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
22func dpr_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
23func dpr_cat(out: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[o] = s[i]; o = o + 1; i = i + 1 } return o }
24func dpr_atoi(s: *u8) -> i64
called by 1: main
30func dpr_secret_prefix(domain: *u8, out: *u8) -> i64
called by 1: dpr_run calls 1: dpr_cat
38func dpr_classkey(cid: i64, out: *u8) -> i64
called by 1: dpr_run calls 1: dpr_cat
50func dpr_run(domain: *u8, cid: i64) -> i64
114func main(argc: i64, argv: *i64) -> i64