fix(shared): remove libsodium from device identity#746
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 11, 2026, 4:59 AM ET / 08:59 UTC. Summary Reproducibility: yes. at source level: current main loads NSec/libsodium during device identity use, and the related merged ARM64 work records broad test failures from that native dependency; this review did not independently execute a Windows VM. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the managed BouncyCastle implementation after a complete Windows environment passes Do we have a high-confidence way to reproduce the issue? Yes at source level: current main loads NSec/libsodium during device identity use, and the related merged ARM64 work records broad test failures from that native dependency; this review did not independently execute a Windows VM. Is this the best way to solve the issue? Yes. Removing the native cryptography dependency while retaining the established raw Ed25519 formats is narrower and more maintainable than adding another architecture-specific DLL-copy workaround. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 913ba4e8f504. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
NSec.Cryptography/libsodiumdevice identity signing with managed BouncyCastle Ed25519 using the same raw 32-byte private/public key and 64-byte signature shapeslibsodium.dllcopying and retarget release native dependency checks to the remaining native speech/ONNX runtime payloadContext
This was exposed while validating #744 on a Windows 11 ARM64 VM:
DeviceIdentityfailed during static initialization because NSec could not loadlibsodium.dllor its ARM64 VC runtime dependency. The cleaner fix is to remove that native dependency from identity signing entirely rather than add another fragile ARM64 test-host copy path.Verification
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj→ 2251 passeddotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore→ 2251 passeddotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj→ 1040 passeddotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore→ 1040 passedlibsodium.dllunder the shared/tray test outputsdotnet list .\src\OpenClaw.Shared\OpenClaw.Shared.csproj package --include-transitive | findstr /i "NSec libsodium BouncyCastle"→ onlyBouncyCastle.Cryptography 2.6.2git diff --check/Users/vincentkoc/GIT/_Perso/openclaw/.agents/skills/autoreview/scripts/autoreview --mode local --base origin/main./build.ps1was attempted on the same Windows ARM64 VM but is environment-blocked there: missing Git, Node.js, and Windows 10 SDK. The required shared/tray test projects do build and pass on that VM.