fix(exec): migrate approvals to custom state dir - #744
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 10, 2026, 9:52 PM ET / 01:52 UTC. Summary Reproducibility: yes. at the source level: current main always uses the tray data directory and never reads 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: Land the state-directory-aware raw migration and security-valued fallback contract after maintainers confirm the fail-closed upgrade policy and the exact head passes the required Windows build, shared-test, and tray-test gates. Do we have a high-confidence way to reproduce the issue? Yes at the source level: current main always uses the tray data directory and never reads Is this the best way to solve the issue? Yes, subject to upgrade validation: resolving the state directory in the store and atomically copying the raw file is the narrowest maintainable fix, while legacy conversion and security clamping preserve compatibility and fail-safe behavior. AGENTS.md: found and applied where relevant. Codex review notes: reasoning high; reviewed against 3fdfbfad837f. 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
|
|
Land-ready verification for
The fail-closed migration behavior is intentional and mirrors the OpenClaw state-dir approvals fix at openclaw/openclaw@adad27d. |
Summary
OPENCLAW_STATE_DIRfor the Windows exec-approvals V2 storeaskFallbackwith OpenClaw's security-valued contract while preserving legacyoff/on-miss/alwaysfilesargPatternare not droppedContext
This mirrors the state-dir approvals migration landed in OpenClaw at openclaw/openclaw@adad27d (
fix(exec): honor state dir approvals).The Windows app keeps
%LOCALAPPDATA%\OpenClawTrayas its default approvals root. WhenOPENCLAW_STATE_DIRis explicitly set, it migrates the existing file to that target instead of silently starting with a new policy.Verification
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --filter FullyQualifiedName~ExecApprovals— 131 passedgit diff --checkBroader repo gates were attempted but are environment-blocked on the clean VM:
./build.ps1requires Git, Node.js, and the Windows 10 SDK in addition to the installed repo-pinned .NET 10 SDKlibsodiumnative dependency load errorlibsodiumnative dependency load error