Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3c33e5654
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| // Rename is atomic on Unix when both paths share a filesystem. Go does not | ||
| // guarantee atomicity on Windows, but staging still avoids in-place writes. | ||
| return os.Rename(temporaryFilename, filename) |
There was a problem hiding this comment.
Retain a fallback for sharing-blocked Windows replacements
On Windows, replacing an existing database with os.Rename fails with a sharing violation whenever another process has the file open without FILE_SHARE_DELETE; a normal Go os.Open reader is one example. The previous in-place os.Create path could still update the file when that reader allowed FILE_SHARE_WRITE, so an IDE, indexer, or other database consumer holding the file open can now make the supported Windows CLI terminate without updating it. Retry the replacement or fall back to an in-place write for this Windows error.
AGENTS.md reference: AGENTS.md:L48-L48
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@codex review
▏ The Windows sharing-violation scenario is valid, but falling back to an in-place truncate/write would reintroduce the partial-JSON race this change is intended to eliminate. When replacement is blocked, the current implementation
▏ preserves the complete old database, removes the staged file, and returns an error. Windows replacement is intentionally best-effort because a handle opened without FILE_SHARE_DELETE makes atomic replacement impossible. A retry
▏ would only help transient readers and cannot guarantee progress for long-lived handles
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3c33e5654
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e24fc238d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
No description provided.