@@ -195,13 +195,14 @@ test('qualifies distinct canonical linked worktree execution while hooks remain
195195 const snapshotStorage = async ( ) => Promise . all ( windowsDirectories . map ( async ( path ) => {
196196 const metadata = await stat ( path ) ; return { path, entries : ( await readdir ( path ) ) . sort ( ) , mode : metadata . mode , mtimeMs : metadata . mtimeMs , ctimeMs : metadata . ctimeMs } ;
197197 } ) ) ;
198- const windowsBefore = await snapshotStorage ( ) ; const platformDescriptor = Object . getOwnPropertyDescriptor ( process , 'platform' ) ;
199- Object . defineProperty ( process , 'platform' , { ...platformDescriptor , value : 'win32' } ) ;
200- try { await qualifyCodexRescuePreparedContinuationEvidence ( windowsInput ) ; } finally { Object . defineProperty ( process , 'platform' , platformDescriptor ) ; }
198+ const windowsBefore = await snapshotStorage ( ) ; const platformBefore = process . platform ;
199+ windowsInput . installedStoragePermissionModel = 'windows' ;
200+ await qualifyCodexRescuePreparedContinuationEvidence ( windowsInput ) ;
201+ assert . equal ( process . platform , platformBefore ) ;
201202 assert . deepEqual ( await snapshotStorage ( ) , windowsBefore ) ;
202- Object . defineProperty ( process , 'platform' , { ... platformDescriptor , value : 'linux' } ) ;
203- try { await assert . rejects ( qualifyCodexRescuePreparedContinuationEvidence ( windowsInput ) , CodexRescueEvidenceMismatchError ) ; }
204- finally { Object . defineProperty ( process , ' platform' , platformDescriptor ) ; }
203+ windowsInput . installedStoragePermissionModel = 'posix' ;
204+ await assert . rejects ( qualifyCodexRescuePreparedContinuationEvidence ( windowsInput ) , CodexRescueEvidenceMismatchError ) ;
205+ assert . equal ( process . platform , platformBefore ) ;
205206 assert . deepEqual ( await snapshotStorage ( ) , windowsBefore ) ;
206207
207208 const swapped = workspaceBoundContinuationFixture ( originWorkspace , executionWorkspace ) ;
0 commit comments