Repository navigation
fix(permissions): raise Windows command timeout - #99
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 6:25 PM ET / 22:25 UTC. ClawSweeper reviewWhat this changesThe PR raises the built-in Windows permission-command timeout from 10 to 30 seconds, documents the corrected default, and adds real child-process timing coverage. Merge readinessKeep this PR open for normal maintainer merge review: current Priority: P2 Review scores
Verification
How this fits togetherThe Windows permission fallback runs owner and ACL system commands before secure reads accept a file. Their results feed a fail-closed classification: command failure or timeout leaves permissions unverified and blocks the secure read. flowchart LR
A[Secure read request] --> B[Windows permission fallback]
B --> C[Owner and ACL commands]
C --> D[Per-process deadline]
D --> E[Permission classification]
E --> F[Allow verified file]
E --> G[Reject unverified file]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the measured 30-second per-process deadline while retaining SIGKILL termination, unverified permission classification, and the documented custom-executor escape hatch. Do we have a high-confidence way to reproduce the issue? Yes—current main has a concrete 10-second executor default, and the PR body records real child-process probes where a 12-second command succeeds and an infinite command is terminated at roughly 30 seconds. No separate local runtime execution was performed in this read-only review. Is this the best way to solve the issue? Yes—the change is the narrowest maintainable correction because it raises only the internal per-process bound while preserving the existing timeout, kill signal, custom executor contract, and fail-closed result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eda9a61fcf7f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(permissions): raise Windows command timeout This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Windows ACL verification subprocess failures from the PowerShell owner query, icacls, and whoami were flattened to a generic permission-unverified FsSafeError, discarding stderr, exit status, and timing. Propagate structured PermissionCommandFailure diagnostics from executePermissionCommand through the owner and ACL inspectors onto FsSafeError details and cause. The failure records command, durationMs, timedOut, exitCode, signal, and sanitized, bounded stderr so CI flakes on contended runners are diagnosable and a future retry condition can key on real diagnostics. Verification semantics, error codes, and fail-closed behavior are unchanged. No retries are added. Refs #99.
What changed
Why 30 seconds per process
Recent Windows fallback runs put the affected secure-read test between 1.930s and 5.400s when successful. Under contention, PR #94 reached 10.130s and PR #95 reached 10.173s; both failures were the old bound firing, and PR #95 passed at 3.694s on rerun. Thirty seconds provides more than 5.5x the slowest pre-fix success and roughly 3x the overloaded cutoff without turning a genuinely wedged command back into an indefinite hang.
The deadline stays per process. Each PowerShell, icacls, or whoami child is the independently wedgable unit, and the sequence is structurally finite. An overall deadline would make multiple slow-but-successful commands compete for one budget and could reproduce the false
permission-unverifiedresult this fixes.No public timeout option is added. The measured default has ample headroom, while callers that inject a custom executor continue to own that executor's deadline. Fail-closed behavior is unchanged: a genuine command failure or timeout still yields
source: "unknown", and secure reads still reject it aspermission-unverified.Proof
pnpm check: 680 passed, 32 skippedpnpm test:security: 64 passedgit diff --checkWindows fallback proof on commit
4c2b809: