You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validate safeWriteJson replacement and recovery with native Windows file handles #2178
The JSON persistence caller audit identified a Windows validation gap.
Source: src/utils/safeWriteJson.ts.
The writer commits with one rename and enters a two-rename fallback only for EPERM. Fault-injection tests exercise that branch. They do not establish the error codes or replacement behavior produced by real Windows file handles.
Proposed scope:
Run native Windows tests with a reader that has explicit handle-sharing flags.
Record OS and Node versions and the observed rename errors.
Check both direct replacement and the fallback.
Check interruption between fallback renames, backup restoration, and lock handling.
Decide whether EBUSY or EACCES require changes only after collecting platform evidence.
Acceptance:
Previously committed content remains readable or recoverable after each injected interruption.
Failed restoration preserves committed backups.
Tests identify when Windows permits or rejects replacement.
The documented fallback matches observed platform behavior.
CI or an equivalent reproducible Windows run records the result.
This is a validation gap, not a claim that an additional error code must trigger the fallback.
Activity