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
Prevent failed multiscan owner publication from removing a replacement supervisor's empty lock directory when distinct large file IDs round to the same JavaScript number.
Changes
Read both lock-directory identities with lstat(..., { bigint: true }) before deciding whether cleanup owns the directory.
Extend the existing replacement-lock tests with distinct inode IDs that collide as numbers. Keep empty and published replacement cases separate, and isolate the filesystem spies in subprocesses.
Preserve the existing cleanup of an empty lock owned by the failed supervisor.
Testing
Using Bun 1.3.14:
bun test --timeout 30000 --seed 1 --test-name-pattern 'owner creation fails' ./tests-ts/multiscan.test.ts: before the fix, two cases passed and the empty-replacement case failed with ENOENT; after the fix, all three passed.
bun test --timeout 30000 --seed 1 ./tests-ts/multiscan.test.ts: 50 passed, zero failed.
pnpm run types, pnpm run format, and git diff --check: passed.
Three fresh native reviews and independent verification of 0cc84eca: no findings.
The full supported-runtime CI matrix, including Windows and installed-package checks, passed on this exact commit.
Risk and rollout
The production diff changes only the two identity reads in failed-owner cleanup. Lock leases, owner records, heartbeat behavior, and cleanup error handling are unchanged. This uses the same bigint stat API already used by the CLI. There are no public API, dependency, package-format, or migration changes.
Public disclosure review
No customer, partner, prospect, or user identities, data, or identifying details are included.
No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.
Please review exact head 0cc84eca3f1575d1c5213425be8092a77d01ba3d. The production change is limited to exact bigint identity reads during failed multiscan owner-publication cleanup. The regression uses synthetic colliding numeric inode IDs and verifies both empty and published replacement locks.
Please review exact head 0cc84eca3f1575d1c5213425be8092a77d01ba3d, especially preservation of replacement-lock ownership and the unchanged cleanup lifecycle.
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
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.
Summary
Prevent failed multiscan owner publication from removing a replacement supervisor's empty lock directory when distinct large file IDs round to the same JavaScript number.
Changes
lstat(..., { bigint: true })before deciding whether cleanup owns the directory.Testing
Using Bun 1.3.14:
bun test --timeout 30000 --seed 1 --test-name-pattern 'owner creation fails' ./tests-ts/multiscan.test.ts: before the fix, two cases passed and the empty-replacement case failed withENOENT; after the fix, all three passed.bun test --timeout 30000 --seed 1 ./tests-ts/multiscan.test.ts: 50 passed, zero failed.pnpm run types,pnpm run format, andgit diff --check: passed.0cc84eca: no findings.The full supported-runtime CI matrix, including Windows and installed-package checks, passed on this exact commit.
Risk and rollout
The production diff changes only the two identity reads in failed-owner cleanup. Lock leases, owner records, heartbeat behavior, and cleanup error handling are unchanged. This uses the same bigint stat API already used by the CLI. There are no public API, dependency, package-format, or migration changes.
Public disclosure review