Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## Gfzrninkdoypc72akmjdclivmmarjkcyi #3820 +/- ##
==================================================================
Coverage 92.94% 92.94%
==================================================================
Files 16 16
Lines 2466 2466
==================================================================
Hits 2292 2292
Misses 174 174 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d87f4cd to
3ba4cce
Compare
94c4528 to
509a2d7
Compare
|
@codex review Please re-review the current head, This update inherits the producer/cache and manifest repairs and applies the pinned nightly import formatting at each file's introduction. The complete binary/integration harness compiles with warnings denied and all 582 unit tests pass locally. Authored by an AI agent acting on joshlf's behalf. |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
509a2d7 to
c95313a
Compare
3ba4cce to
ce3868a
Compare
|
@codex review The stack has been rebased onto current main after the SHA optimization merged. Please review this PR’s current diff. The complete 583-test unit suite, producer tests, binary/integration harness checks and recursive formatter pass locally; Linux archive CI checks native assembly. Current head: Authored by an AI agent acting on joshlf's behalf. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c95313aa1f
ℹ️ 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".
| state.refreshing = true; | ||
| want_build = true; | ||
| cancel_requests_with_waiters(&mut state, &mut output, true)?; | ||
| server.process.stop(); |
There was a problem hiding this comment.
Suspend the server before allowing external writers
When an editor session is idle, an external Build, Check, or SetupFile can acquire the independent writer lock and complete between saved-state polls; this branch stops the Lake server only after contention or the updated witness is observed. That is too late for output safety: the running server is itself allowed to mutate private outputs, while prepare_local_outputs may concurrently remove .lake/build before starting another Lake process. Restarting the worker afterward invalidates its responses but cannot undo concurrent output deletion or corruption, so writer acquisition needs a handshake/lease that suspends and reaps the server producer before any external output mutation begins.
Useful? React with 👍 / 👎.
| Err(error) => return Err(error.into()), | ||
| } | ||
| check_workspace_lock_entry(&file, &path)?; | ||
| advance_writer_witness(&file).context("Recording startup writer acquisition")?; |
There was a problem hiding this comment.
Check the coordinator lease before advancing writer history
When one initialized editor already owns the server lease, starting lean ... serve from a second editor can still acquire this writer lock and advance the witness before run_with_startup later discovers that server_lock is unavailable. The rejected second session therefore makes the active coordinator observe a new writer event, stop its healthy worker, and rebuild/replay every open document even though no workspace operation occurred. Acquire or reserve the coordinator lease before recording the startup writer event so a duplicate startup fails without disrupting the existing editor.
Useful? React with 👍 / 👎.
| fn dirty(&self, document: &Document) -> bool { | ||
| self.texts.get(&document.path) != Some(&document.text) |
There was a problem hiding this comment.
Normalize line endings before classifying buffers as dirty
When a saved file uses CRLF but an editor exposes its in-memory buffer with LF—as line-ending-decoding editors such as Emacs do—this byte-for-byte comparison permanently marks the unchanged buffer dirty. Any open document importing that file is then blocked by blocked, so saves and worker refreshes never restore diagnostics or goals even though Lean treats the texts equivalently; Lean's server representation itself normalizes document text with crlfToLf. Normalize saved and live text consistently before performing the dirty comparison.
Useful? React with 👍 / 👎.
ce3868a to
359b93e
Compare
c95313a to
3c2b7f5
Compare
|
@codex review Please review the updated exact head Authored by an AI agent acting on joshlf's behalf. |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
3c2b7f5 to
548478c
Compare
359b93e to
47d4d3e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 548478ccab
ℹ️ 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".
| .stdin(if prepared.input.is_some() { Stdio::piped() } else { Stdio::null() }) | ||
| .stdout(Stdio::piped()) | ||
| .stderr(Stdio::inherit()); | ||
| let mut process = Process::spawn(command)?; |
There was a problem hiding this comment.
Keep batch descendants fenced until they actually exit
Build::child launches each Lake build/setup group without inheriting either the workspace writer fence or a producer-lifetime lease. If the group leader exits while a descendant remains, Build::poll calls Process::stop, but that only signals the group and waits for the already-exited leader; kill does not wait for descendants to terminate. The coordinator can therefore proceed to admit_produced_outputs, finish preparation, and start a replacement worker while a signaled descendant is still mutating private outputs. Inherit a lease into batch groups and wait for its release before treating the build as complete.
Useful? React with 👍 / 👎.
| if !result.texts.contains_key(&path) { | ||
| result | ||
| .texts | ||
| .insert(path.clone(), local_read(fs::read_to_string(&path), &path)?); |
There was a problem hiding this comment.
Retry transient invalid UTF-8 observed during direct saves
When an editor overwrites a Unicode Lean file in place, this read can land between writes to a multibyte character and return InvalidData. local_read only converts NotFound into SourceStampChanged, so this ordinary save race terminates the entire editor coordinator instead of entering the existing snapshot-retry path. Recheck the saved-input stamp after a UTF-8 decoding failure and treat the failure as retryable when the file changed during the read, while retaining a fatal error for stable malformed files.
Useful? React with 👍 / 👎.
| if let Some(uri) = message["params"]["rootUri"].as_str() { | ||
| ensure!( | ||
| same_bound_root(&file_uri(uri)?, root, folds_case), | ||
| "Editor initialization selects another workspace" |
There was a problem hiding this comment.
Accept filesystem-equivalent Unicode initialization roots
On a normalization-insensitive filesystem such as the supported macOS configurations, startup can admit a composed/decomposed Unicode alias for the workspace and then canonicalize it to the stored spelling, while the editor still reports the original spelling in rootUri. This comparison only supports exact or ASCII-case-equivalent components, so initialize rejects the same physical workspace with “selects another workspace”; the SDK startup tests explicitly exercise CaféWorkspace versus Cafe\u{301}Workspace. Validate the initialization root using the same filesystem-equivalence policy used during startup.
Useful? React with 👍 / 👎.
548478c to
3b6d4ef
Compare
47d4d3e to
5f4382c
Compare
|
@codex review Please review the updated exact head Authored by an AI agent acting on joshlf's behalf. |
3b6d4ef to
8bf49df
Compare
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review Please review the updated exact head Authored by an AI agent acting on joshlf's behalf. |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
5f4382c to
c6806f2
Compare
8bf49df to
fe681c8
Compare
|
@codex review Please review the updated exact head Authored by an AI agent acting on joshlf's behalf. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe681c8eb8
ℹ️ 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".
fe681c8 to
cf35b59
Compare
c6806f2 to
7a5ec75
Compare
|
@codex review Please review updated exact head Authored by an AI agent acting on joshlf's behalf. |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
cf35b59 to
ce50e94
Compare
7a5ec75 to
098a5f2
Compare
|
@codex review Please review updated exact head Authored by an AI agent acting on joshlf's behalf. |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
098a5f2 to
d994081
Compare
ce50e94 to
7fa4a99
Compare
A Lake rebuild updates saved imports but leaves modules already loaded by Lean file workers unchanged. Add a coordinator ahead of the stock Lake server so dependent diagnostics and goals become current only after the saved import closure is built and a fresh server consumes it. The coordinator keeps unsaved dependency edits pending without saving or discarding their buffers; the dependency's own diagnostics remain interactive. It prepares each open root using the root's live import header and saved dependency state. It covers roots independently, so one failed closure does not block healthy roots. After preparation, it restarts the stock server and replays current buffers, including unsaved files and incremental UTF-16 edits. It fences replies against document versions, imported inputs and server generations; failed builds and edits during a refresh cannot restore old successful results. Ordinary proof edits keep their incremental behavior. The coordinator reconciles results under short shared fences and prepares imports under an exclusive writer, allowing other writers to progress between turns. Before stopping producers, it reserves coordinator ownership. It retains pending writer reservations and uses writer history to detect output changes between polling turns. Native server groups inherit producer leases so writers wait for actual holders to exit before admitting outputs. The coordinator cleans up owned process groups on refresh, cancellation and protocol failure. At startup, it opens existing generation controls without creating sidecars for supplied roots. The coordinator binds document spellings to admitted physical workspace/source identities while preserving client URIs. It rejects ambiguous aliases, symlink traversal and access through aliases of private workspace directories. gherrit-pr-id: Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a Agent-authored-by: AI agent acting on joshlf's behalf
7fa4a99 to
8c7fc11
Compare
d994081 to
1193df7
Compare
A Lake rebuild updates saved imports but leaves modules already loaded
by Lean file workers unchanged. Add a coordinator ahead of the stock
Lake server so dependent diagnostics and goals become current only after
the saved import closure is built and a fresh server consumes it.
The coordinator keeps unsaved dependency edits pending without saving or
discarding their buffers; the dependency's own diagnostics remain
interactive. It prepares each open root using the root's live import
header and saved dependency state. It covers roots independently, so one
failed closure does not block healthy roots. After preparation, it
restarts the stock server and replays current buffers, including unsaved
files and incremental UTF-16 edits. It fences replies against document
versions, imported inputs and server generations; failed builds and
edits during a refresh cannot restore old successful results. Ordinary
proof edits keep their incremental behavior.
The coordinator reconciles results under short shared fences and
prepares imports under an exclusive writer, allowing other writers to
progress between turns. Before stopping producers, it reserves
coordinator ownership. It retains pending writer reservations and uses
writer history to detect output changes between polling turns. Native
server groups inherit producer leases so writers wait for actual holders
to exit before admitting outputs. The coordinator cleans up owned
process groups on refresh, cancellation and protocol failure. At
startup, it opens existing generation controls without creating sidecars
for supplied roots.
The coordinator binds document spellings to admitted physical
workspace/source identities while preserving client URIs. It rejects
ambiguous aliases, symlink traversal and access through aliases of
private workspace directories.
Authored by an AI agent acting on joshlf's behalf.
Latest Update: v13 — Compare vs v12
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a && git checkout -b pr-Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a FETCH_HEADCheckout
git fetch origin refs/heads/Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.