- Zig L1: Implemented qvl_issue_slash_signal (constructs SlashSignal)
- Rust L2: Added FFI binding and safe wrapper issue_slash_signal
- Config: Wired l1_slash_mod into qvl_ffi build
- Verified: Unit test for signal creation passing
The active defense loop is closed. L2 can now pull the trigger.
- 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.
- Created membrane-agent/ Rust crate structure
- Implemented qvl_ffi.rs: Safe Rust FFI wrapper around Zig QVL C ABI
- QvlClient with RAII semantics (init/deinit)
- Safe wrappers: get_trust_score, verify_pop, detect_betrayal, add/revoke edges
- AnomalyScore, PopVerdict enums
- Created main.rs: Minimal daemon stub
- Created Cargo.toml, build.rs for future Zig library linking
Blocker: build.zig static library target (Zig 0.15.2 API incompatibility)
- addStaticLibrary/addSharedLibrary don't exist in this Zig version
- LibraryOptions API changed (no .kind, .root_source_file fields)
- Deferred to next session: either upgrade Zig or use manual object linking
All Zig FFI tests passing (173/173). Rust compiles but can't link yet.
- Created qvl_ffi.zig: C ABI exports (qvl_init, qvl_deinit, trust scoring, PoP verification, betrayal detection, graph mutations)
- Created qvl.h: C header with full API documentation
- Created test_qvl_ffi.c: C test harness (manual compilation)
- Added FFI tests to build.zig with libc linking
- Fixed API mismatches: TrustGraph.init (3 args), BellmanFordResult.betrayal_cycles usage
- All tests passing (173/173: 137 SDK + 36 FFI)
FFI enables Rust Membrane Agents (L2) to consume L1 trust functions.
- l1-identity/crypto.zig: Export pqxdh module for SDK consumption
- build.zig: Define proper modules for PQXDH library and tests
- Link liboqs to l1_pqxdh_mod and propagate dependency to l1_mod
- Build System: Link against static liboqs.a (built without OpenSSL)
- PQXDH: Replace stubs with OQS_KEM_ml_kem_768 functions
- Tests: Verify full handshake with real post-quantum KEM
- Disable Kyber (old) in liboqs build to fix symbol conflicts
BREAKING CHANGE: Header size increased from 64 to 72 bytes
- Expand DID hints from 20 to 24 bytes (192-bit, 2^96 collision resistance)
- Clarify timestamp as u64 nanoseconds (Bytes 60-67, big-endian)
- Update frame payload capacities (-8 bytes per frame class)
- All tests passing (14/14 L0 tests)
Rationale:
- 24-byte DID hints provide future-proof routing scalability
- 8-byte overhead per frame is negligible (0.6% loss on Standard frames)
- Aligns with Sovereign Time Protocol (RFC-0105) L0/L1 split
Files modified:
- l0-transport/lwf.zig: Header structure, serialization, tests
- l0-transport/time.zig: New file for L0 time primitives
- build.zig: Time module dependencies
RFC Impact: RFC-0000 (LWF Wire Protocol), RFC-0105 (Sovereign Time)