Skip to content

[anneal][v1] Refresh stock Lean workers after local dependency changes - #3820

Open
joshlf wants to merge 1 commit into
Gfzrninkdoypc72akmjdclivmmarjkcyifrom
Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a
Open

joshlf wants to merge 1 commit into
Gfzrninkdoypc72akmjdclivmmarjkcyifrom
Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a

Conversation

@joshlf

@joshlf joshlf commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

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.

Version v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a && git checkout -b pr-Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a FETCH_HEAD

Checkout

git fetch origin refs/heads/Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a

Stacked PRs enabled by GHerrit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T19:32:46.036229Z ce50e94 Manual request
🔒 Security Review ✅ Completed 2026-10-08T19:35:01.502033Z ce50e94 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov-commenter

codecov-commenter commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.94%. Comparing base (1193df7) to head (8c7fc11).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please re-review the current head, 509a2d7338432a9ea2e5de11db189af26c5a14e1.

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 509a2d7338

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 509a2d7338

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from 509a2d7 to c95313a Compare October 8, 2026 11:23
@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from 3ba4cce to ce3868a Compare October 8, 2026 11:23
@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@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: c95313aa1fa6355011685bd4bf620ea6006d911e.

Authored by an AI agent acting on joshlf's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c95313aa1f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread anneal/v1/src/lean_server.rs Outdated
state.refreshing = true;
want_build = true;
cancel_requests_with_waiters(&mut state, &mut output, true)?;
server.process.stop();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread anneal/v1/src/lean_sdk.rs Outdated
Err(error) => return Err(error.into()),
}
check_workspace_lock_entry(&file, &path)?;
advance_writer_witness(&file).context("Recording startup writer acquisition")?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread anneal/v1/src/lean_server.rs Outdated
Comment on lines +529 to +530
fn dirty(&self, document: &Document) -> bool {
self.texts.get(&document.path) != Some(&document.text)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from ce3868a to 359b93e Compare October 8, 2026 13:30
@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from c95313a to 3c2b7f5 Compare October 8, 2026 13:30
@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review the updated exact head 3c2b7f5f8bc52d73ab5cee12083644194f4e4009. The coordinator reserves duplicate-Serve identity before writer contention, inherits producer leases across native exec, and matches RC2 CRLF normalization. A fresh native RC2/macOS two-client test confirms coexistence, writer quiescence and recovery.

Authored by an AI agent acting on joshlf's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 3c2b7f5f8b

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3c2b7f5f8b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from 3c2b7f5 to 548478c Compare October 8, 2026 14:21
@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from 359b93e to 47d4d3e Compare October 8, 2026 14:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread anneal/v1/src/lean_server.rs Outdated
.stdin(if prepared.input.is_some() { Stdio::piped() } else { Stdio::null() })
.stdout(Stdio::piped())
.stderr(Stdio::inherit());
let mut process = Process::spawn(command)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +341 to +344
if !result.texts.contains_key(&path) {
result
.texts
.insert(path.clone(), local_read(fs::read_to_string(&path), &path)?);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +2210 to +2213
if let Some(uri) = message["params"]["rootUri"].as_str() {
ensure!(
same_bound_root(&file_uri(uri)?, root, folds_case),
"Editor initialization selects another workspace"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from 548478c to 3b6d4ef Compare October 8, 2026 15:40
@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from 47d4d3e to 5f4382c Compare October 8, 2026 15:40
@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review the updated exact head 3b6d4ef9f6ec291b277cc9158c8672194fe3b63a. Finite completion waits for actual inherited lease release before coverage/next-command/output admission. Saved snapshot reads retry torn UTF-8 only if the post-read saved stamp changed; stable malformed input remains fatal. Initialization admits actual physical root aliases and retains client prefixes for canonical saved/unsaved document bookkeeping without changing client URIs.

Authored by an AI agent acting on joshlf's behalf.

@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from 3b6d4ef to 8bf49df Compare October 8, 2026 15:47
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3b6d4ef9f6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review the updated exact head 8bf49df1da3f64569994abc5607028f01f0025a3. Corrected intermediate test-only import ordering to match the CI-pinned formatter. This PR passes its own 531 unit tests and formatter; the final stack source tree remains byte-identical to the previous 601-unit/native-integration validated tree.

Authored by an AI agent acting on joshlf's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 8bf49df1da

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 8bf49df1da

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from 5f4382c to c6806f2 Compare October 8, 2026 17:21
@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from 8bf49df to fe681c8 Compare October 8, 2026 17:21
@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review the updated exact head fe681c8eb805ffd8cd84fd3ff34448e0a006dcb0. Removed PR3814 from the ancestry and restored main's original separate early unit-test command and comments exactly. All other files in this prefix are byte-identical to the previously CI-passing and Codex-reviewed prefix; the conceptual review order is unchanged.

Authored by an AI agent acting on joshlf's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: fe681c8eb8

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread anneal/v1/src/lean_server.rs
@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from fe681c8 to cf35b59 Compare October 8, 2026 18:55
@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from c6806f2 to 7a5ec75 Compare October 8, 2026 18:55
@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review updated exact head cf35b598bf7675ea8e69571dd7b72212f48e28bd. Fixed filesystem document aliases using admitted directory spellings and actual saved entry identity. Preserved named hardlinks, rejected ambiguous alternate aliases and symlink traversal; added NFC/NFD and Kelvin-sign regression cases. Repaired bounded lock-fixture timing assumptions. Local validation:608 unit tests, pinned formatting, integration-harness compilation, affected prefix checks, and the native archive/cache-reuse integration case on the exact sealed RC2/macOS installation. The original separate early unit-test CI step remains restored.

Authored by an AI agent acting on joshlf's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: cf35b598bf

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: cf35b598bf

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from cf35b59 to ce50e94 Compare October 8, 2026 19:27
@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from 7a5ec75 to 098a5f2 Compare October 8, 2026 19:27
@joshlf

joshlf commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review updated exact head ce50e945bf26bf427612a83da71770a777d94b01. Extended the existing filesystem-identity rule to reject aliases of private workspace directories for saved and never-saved documents. Validate ancestors from the root outward before probing deeper metadata. Preserve distinct physical directory names and the nearest admitted source prefix. Local validation:609 unit tests, independent affected prefix unit/format checks, pinned final formatting and integration-harness compilation. Earlier native archive/cache-reuse evidence is retained for unchanged CLI/SDK code on the exact sealed RC2/macOS installation. The original separate early unit-test CI step remains restored.

Authored by an AI agent acting on joshlf's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: ce50e945bf

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: ce50e945bf

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from 098a5f2 to d994081 Compare October 10, 2026 00:00
@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from ce50e94 to 7fa4a99 Compare October 10, 2026 00:00
@joshlf joshlf changed the title [anneal][v1] Coordinate stock Lean workers with saved dependency freshness [anneal][v1] Refresh stock Lean workers after local dependency changes Oct 10, 2026
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
@joshlf
joshlf force-pushed the Gfegyv3tiil2hvmhqmss4cxy3sgnq7n6a branch from 7fa4a99 to 8c7fc11 Compare October 10, 2026 13:18
@joshlf
joshlf force-pushed the Gfzrninkdoypc72akmjdclivmmarjkcyi branch from d994081 to 1193df7 Compare October 10, 2026 13:18

This branch has not been deployed

No deployments
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.

2 participants