Skip to content

fix: allow fdatasync on owner file in windows - #636

Open
Thy985 wants to merge 1 commit into
EvoMap:mainfrom
Thy985:fix/windows-canonical-fdatasync
Open

Thy985 wants to merge 1 commit into
EvoMap:mainfrom
Thy985:fix/windows-canonical-fdatasync

Conversation

@Thy985

@Thy985 Thy985 commented Sep 30, 2026

Copy link
Copy Markdown

Fixes #623

On Windows, \ s.fdatasyncSync()\ fails with \EPERM\ when the file descriptor was opened read-only ('r'). \prepareOwnerFile()\ writes the prepared owner file, then re-opens it as read-only before flushing, which breaks node credential snapshot on Windows.

Open the descriptor as
+\ so Windows \FlushFileBuffers\ can operate on the writable handle.

Verified locally on Windows:
ode --test test/canonicalIdentityLock.test.js\ passes 8/8 (previously failed with the EPERM from this issue).

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现需要报告的问题。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver"、pr_number=636、head_sha="ed876f79157237ebad0b2856f5518e5841761c7b",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 ed876f791572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] fdatasyncSync on read-only fd throws EPERM, blocks node credential snapshot (canonicalIdentityLock.js)

1 participant