[GH-ISSUE #2898] [Bug] Windows native inspection verifier rejects rename allowed by retained-handle cleanup #1020

Closed
opened 2026-10-15 18:30:24 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2898

The controlled Windows native inspection verifier fails on current main after the retained-handle cleanup change in #2445. It still expects renameSync on an owned probe directory to throw, although FILE_SHARE_DELETE deliberately permits renaming and cleanup now follows retained NTFS handles.

Reproduction

Pinned main: d4f0c5e664e26fe7ed1566dcc4b85ea9b57d52da. The relevant native, fixture and verifier sources are unchanged at 7e3a19863835215491b55fba7127a78bad6a7709.

  1. On Linux, build the exact revision's production native artifact and controlled inspection artifact with npm run build:windows-native and node scripts/build-windows-native.mjs --inspection-fixture.
  2. Copy the matching artifacts and built runtime to an isolated local NTFS directory on Windows x64.
  3. With Node 24.18.0, run node scripts/verify-windows-native-inspection.mjs.

Observed: exit 1, AssertionError [ERR_ASSERTION]: Missing expected exception at generated probe line 12, corresponding to assert.throws(() => renameSync(path,path+'-replacement')).

Expected: the verifier should prove retained ownership across rename and an adversarial replacement at the old pathname. The original object must be removed on retry and process teardown, while an unrelated replacement and its sentinel remain intact. Successful admission caching and first-failure diagnostics must remain covered.

Root cause and scope

#2445 added delete sharing and changed cleanup to enumerate/open children relative to retained directory handles. The verifier kept a path immobility assertion from the previous implementation. The controlled fixture injects only the first FileDispositionInfo failure and uses the production owner afterward.

This is a stale real-Windows verification oracle. It does not establish the historical cause of #1701/#2196 or a production ownership failure. The exact revision's production native conformance passed, including token/environment/breakaway, cancellation, snapshot sharing, cleanup retry and Job memory controls.

Validation/resources

Fresh Windows 11 x64 (22631), Node 24.18.0/npm 11.16.0, serial execution, two logical CPUs, BelowNormal priority. Failing lane: 2.55 seconds, 71.6 MiB peak Job commit, zero owned processes remaining. Local raw logs and receipts are retained under /tmp/rea-windows-e2e-20261013/results/native-inspection.*.

Proposed correction: update the existing verifier to move the owned directory, independently verify the same inode, install a foreign old-path replacement, and check handle-directed retry/teardown cleanup. Do not remove ownership coverage or add retries to conceal the failure.

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2898 The controlled Windows native inspection verifier fails on current main after the retained-handle cleanup change in #2445. It still expects `renameSync` on an owned probe directory to throw, although `FILE_SHARE_DELETE` deliberately permits renaming and cleanup now follows retained NTFS handles. ## Reproduction Pinned main: `d4f0c5e664e26fe7ed1566dcc4b85ea9b57d52da`. The relevant native, fixture and verifier sources are unchanged at `7e3a19863835215491b55fba7127a78bad6a7709`. 1. On Linux, build the exact revision's production native artifact and controlled inspection artifact with `npm run build:windows-native` and `node scripts/build-windows-native.mjs --inspection-fixture`. 2. Copy the matching artifacts and built runtime to an isolated local NTFS directory on Windows x64. 3. With Node 24.18.0, run `node scripts/verify-windows-native-inspection.mjs`. Observed: exit 1, `AssertionError [ERR_ASSERTION]: Missing expected exception` at generated probe line 12, corresponding to `assert.throws(() => renameSync(path,path+'-replacement'))`. Expected: the verifier should prove retained ownership across rename and an adversarial replacement at the old pathname. The original object must be removed on retry and process teardown, while an unrelated replacement and its sentinel remain intact. Successful admission caching and first-failure diagnostics must remain covered. ## Root cause and scope #2445 added delete sharing and changed cleanup to enumerate/open children relative to retained directory handles. The verifier kept a path immobility assertion from the previous implementation. The controlled fixture injects only the first `FileDispositionInfo` failure and uses the production owner afterward. This is a stale real-Windows verification oracle. It does not establish the historical cause of #1701/#2196 or a production ownership failure. The exact revision's production native conformance passed, including token/environment/breakaway, cancellation, snapshot sharing, cleanup retry and Job memory controls. ## Validation/resources Fresh Windows 11 x64 (22631), Node 24.18.0/npm 11.16.0, serial execution, two logical CPUs, BelowNormal priority. Failing lane: 2.55 seconds, 71.6 MiB peak Job commit, zero owned processes remaining. Local raw logs and receipts are retained under `/tmp/rea-windows-e2e-20261013/results/native-inspection.*`. Proposed correction: update the existing verifier to move the owned directory, independently verify the same inode, install a foreign old-path replacement, and check handle-directed retry/teardown cleanup. Do not remove ownership coverage or add retries to conceal the failure.
bsakaguchi 2026-10-15 18:30:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1020
No description provided.