MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / gdpr_erasure_drops_cell_outright

Function gdpr_erasure_drops_cell_outright

nodedb-array/src/query/retention.rs:568–583  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566 /// GDPR erasure takes precedence: ceiling does NOT contain A.
567 #[test]
568 fn gdpr_erasure_drops_cell_outright() {
569 let s = schema();
570 let bytes = build_segment(vec![
571 (TileId::new(0, 100), live_tile(&s, 1, 10)),
572 (TileId::new(0, 200), gdpr_tile(&s, 1)),
573 ]);
574 let reader = SegmentReader::open(&bytes).unwrap();
575 let versions: Vec<TileEntry> = reader.tiles().to_vec();
576 let result = merge_for_retention(&versions, &reader, &s, 300).unwrap();
577 assert!(
578 result.ceiling_tile.is_none(),
579 "GdprErased newest version must suppress cell from ceiling"
580 );
581 assert_eq!(result.cells_carried_forward, 0);
582 assert_eq!(result.dropped_tile_ids.len(), 2);
583 }
584
585 // ── Test 7 ──────────────────────────────────────────────────────────────
586

Callers

nothing calls this directly

Calls 6

build_segmentFunction · 0.85
merge_for_retentionFunction · 0.85
tilesMethod · 0.80
schemaFunction · 0.70
openFunction · 0.50
to_vecMethod · 0.45

Tested by

no test coverage detected