code wiki / _hdl_build / nx_dp_reclassify.nx
nx_dp_reclassify.nx
buildroot/runtime/_hdl_build/nx_dp_reclassify.nx
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
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
structs
| none |
consts
| 15 | const K_MAGIC_2048: i64 = 2048 |
functions
| 17 | func 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 |
| 22 | func dpr_num(v: i64) -> i64 { nxi_out(v); return 0 } |
| 23 | func 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 } |
| 24 | func dpr_atoi(s: *u8) -> i64 called by 1: main |
| 30 | func dpr_secret_prefix(domain: *u8, out: *u8) -> i64 |
| 38 | func dpr_classkey(cid: i64, out: *u8) -> i64 |
| 50 | func dpr_run(domain: *u8, cid: i64) -> i64 |
| 114 | func main(argc: i64, argv: *i64) -> i64 |