From 7b33314701669f510997820bc263a99f73346bb0 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Wed, 14 Oct 2026 02:11:39 +0800 Subject: [PATCH] fix(ci): verify retained Windows directory ownership --- docs/testing.md | 5 +++-- scripts/verify-windows-native-inspection.mjs | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/testing.md b/docs/testing.md index 213c48e44c..9cd969749e 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -389,8 +389,9 @@ adds in-place reparse, breakaway, environment, and token observations. The separate `scripts/verify-windows-native-inspection.mjs` lane uses the `.cache/windows-native-inspection-fixture` artifact built on Linux with `node scripts/build-windows-native.mjs --inspection-fixture`. Its controlled -first deletion failure checks retained NTFS ownership, later-query recovery, -successful-admission caching, and environment-teardown cleanup. It neither +first deletion failure checks retained NTFS ownership across a same-volume +rename, later-query handle-based recovery, successful-admission caching, and +environment-teardown cleanup. It neither establishes the cause of the intermittent #1701 host failure nor replaces verification with the shipped production artifact. `npm run verify:ghidra:windows:package` additionally packs and installs REA into diff --git a/scripts/verify-windows-native-inspection.mjs b/scripts/verify-windows-native-inspection.mjs index e5f807da31..b5b75abd4a 100644 --- a/scripts/verify-windows-native-inspection.mjs +++ b/scripts/verify-windows-native-inspection.mjs @@ -62,8 +62,11 @@ assert.equal(first.retryable,true); assert.match(first.reason,/Delete owned object by handle failed.*Win32 5/s); const [name,...extra]=readdirSync(temp);assert.ok(name);assert.equal(extra.length,0); const path=join(temp,name);const identity=statSync(path,{bigint:true}); -assert.throws(()=>renameSync(path,path+'-replacement')); -assert.equal(statSync(path,{bigint:true}).ino,identity.ino); +// This private directory permits rename while its retained handle still owns +// cleanup. Recovery must follow the object identity after its path changes. +const replacement=path+'-replacement';renameSync(path,replacement); +assert.equal(statSync(replacement,{bigint:true}).ino,identity.ino); +assert.equal(readdirSync(temp).length,1); if(process.argv[2]!=='teardown'){ const second=systemWindowsNativeAuthority();assert.equal(second.available,true); assert.equal(readdirSync(temp).length,0);