Fix EPERM crash on Windows ACL corruption + enable DIRS mutable container for fallback paths#232
Open
NOirBRight wants to merge 1 commit into
Open
Conversation
…IRS mutable container
- ensureAccessibleDir now catches EPERM/EACCES from mkdirSync, attempts
rmSync+retry, and falls back to ${dirPath}-${process.pid} when both fail
- Return type changed from void to string (actual path used)
- DIRS mutable container replaces export const RESULTS_DIR/ASYNC_DIR for
runtime path override propagation
- All 11 consumer module sites migrated to use DIRS.results/DIRS.async
- Backward-compatible RESULTS_DIR/ASYNC_DIR aliases retained in types.ts
- Unit tests for ensureAccessibleDir + DIRS container (9 pass)
Refs: nicobailon/pi-subagents EPERM crash on Windows ACL corruption
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Pi crashes on startup on Windows Azure AD/Entra ID machines when the NTFS ACL on the global temp directory is corrupted (typically after wake-from-sleep).
ensureAccessibleDirinsrc/extension/index.tsthrows an uncaught EPERM onmkdirSync, which propagates up through Pi's extension loader and kills the entire Pi process.A secondary issue:
RESULTS_DIRandASYNC_DIRare exported asexport const(primitive string) bindings, making them read-only in all ES module consumers. A fallback path set byensureAccessibleDircannot propagate to these consumer modules.Changes
ensureAccessibleDir- catches EPERM/EACCES, attempts recovery, falls back to pid-scoped pathexport const DIRS = { results, async, chain, artifacts }replaces direct RESULTS_DIR/ASYNC_DIR usage; object properties are mutable while the binding remains const (ES module compatible)Files changed (11)