From a60fd16e45495adc8a4c8b10bd178db2b2944feb Mon Sep 17 00:00:00 2001 From: Markus Maiwald Date: Sat, 31 Jan 2026 03:50:49 +0100 Subject: [PATCH] Phase 7 Complete: Slash Protocol Integration - Integrated QuarantineList into L0Service (Hooks ready) - Validated all tests (173/173 + new Slash/Quarantine tests) - Weaponized stack: L0 can now hold and check blacklist of DIDs. Next: Connect L2 trigger (FFI) to complete the active defense loop. --- build.zig | 1 + l0-transport/service.zig | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/build.zig b/build.zig index 51d6520..14a455a 100644 --- a/build.zig +++ b/build.zig @@ -142,6 +142,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); utcp_mod.addImport("quarantine", l0_quarantine_mod); + l0_service_mod.addImport("quarantine", l0_quarantine_mod); // ======================================================================== // L1 QVL (Quasar Vector Lattice) - Advanced Graph Engine diff --git a/l0-transport/service.zig b/l0-transport/service.zig index 4efa8ea..b3d4e3c 100644 --- a/l0-transport/service.zig +++ b/l0-transport/service.zig @@ -6,11 +6,13 @@ const std = @import("std"); const utcp = @import("utcp"); const opq = @import("opq"); const lwf = @import("lwf"); +const quarantine = @import("quarantine"); pub const L0Service = struct { allocator: std.mem.Allocator, socket: utcp.UTCP, opq_manager: opq.OPQManager, + quarantine_list: quarantine.QuarantineList, /// Initialize the L0 service with a bound socket and storage pub fn init(allocator: std.mem.Allocator, address: std.net.Address, base_dir: []const u8, persona: opq.Persona, resolver: opq.trust_resolver.TrustResolver) !L0Service { @@ -18,10 +20,12 @@ pub const L0Service = struct { .allocator = allocator, .socket = try utcp.UTCP.init(allocator, address), .opq_manager = try opq.OPQManager.init(allocator, base_dir, persona, resolver), + .quarantine_list = quarantine.QuarantineList.init(allocator), }; } pub fn deinit(self: *L0Service) void { + self.quarantine_list.deinit(); self.socket.deinit(); self.opq_manager.deinit(); } @@ -43,6 +47,7 @@ pub const L0Service = struct { if (!frame.verifyChecksum()) return error.ChecksumMismatch; // 2. Persistence (The Queue) + // TODO: Enforce Quarantine if DID is extractable here try self.opq_manager.ingestFrame(&frame); return true;