Repository navigation
fix(permissions): preserve Windows ACL verification diagnostics - #152
Merged
Merged
Conversation
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.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(permissions): preserve Windows ACL verification diagnostics 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. |
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Windows ACL verification flattened an underlying command failure into a generic
permission-unverifiederror, discarding the stderr, exit status, and timing needed to diagnose it. The flaky first-run CI job from PR #149 illustrates the diagnostic gap on contended Windows runners.PR #99 raised the built-in deadline to 30 seconds per subprocess. This change preserves evidence when a command still fails, making those failures diagnosable and giving any future retry condition real diagnostics to inspect.
Change
PermissionCommandErrorwith command timing inpermission-exec; propagate a structuredPermissionCommandFailurecontainingcommand,durationMs,timedOut,exitCode,signal, and sanitized, bounded stderr.errorDetailanderrorCausethroughinspectWindowsOwner,inspectWindowsAcl, andPermissionCheck.FsSafeErrordetails and cause, and enrich its message insecure-file.formatErrorDetailand a 400-character cap. Capture stderr only, never stdout or file contents.powershell.exefromicacls.exe, including failures reached throughwhoami.PermissionCommandFailurethrough the/permissionsand/advancedpackage subpaths.Unchanged
Security assertion semantics, error codes, throw conditions, and fail-closed behavior remain unchanged. No retries are added.
Proof
Completed verification for the prepared change:
tsc), file-size and filesystem-boundary lints, documentation checks, and package/public-API checks: all green.pnpm testhas pre-existing native PAX failures caused by a stale prebuilt native binary. These are unrelated to this change and fail identically on cleanmain.Refs #99.