-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate to Polonius and evolve internal APIs around borrowing (#465) #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
leynos
merged 23 commits into
main
from
issue-465-migrate-to-polonius-and-evolve-internal-apis-around-borrowing
Aug 1, 2026
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
946fe09
Adopt Polonius on pinned nightly toolchain
b800c03
Evolve graph_view node registry to borrow-returning form
c2de382
Drop redundant key clone in group_by grouping loop
842d84e
Snapshot borrowed keys in cycle detection traversal
9e0e6b5
Borrow search directories in the which resolver
69b2a52
Tag principled Polonius refusals at ownership boundaries
21f9a44
Document the Polonius audit and anti-regression contract
db57cdc
Compile Kani cfg policy fixture directly, not via trybuild
ca8e7e8
Record harness consequences in Polonius notes
f0c10fc
Keep Polonius flag when CI presets RUSTFLAGS
leynos ab76460
Restructure edge registration to flatten nested logic
leynos d11a30d
Keep Polonius flag in release artefact builds
leynos 8d249c3
Address review: checkout credentials and audit wording
leynos c4154c7
Document explicit toolchain for registry installs
leynos 44cb425
Address review: config wording, edge helper, cwd duplication
leynos 5fbe3cb
Split Windows setup checks out of install contract test
leynos 1eb7bf2
Extract release-install checks from install contract test
leynos 17b37da
Route quickstart installs through the users' guide
leynos a6589d7
Collapse double blank line left by rebase merge
leynos ea75844
Recommend cargo binstall for prebuilt registry installs
leynos 8226927
Align nextest contracts with the Polonius toolchain
leynos a114c28
Address review: docs accuracy and cwd dedup in Auto mode
leynos b0b22a3
Contract-test the Polonius toolchain plumbing
leynos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Enable the Polonius alpha borrow-checking analysis for every Cargo | ||
| # invocation, including rust-analyzer and `cargo kani`, so editors and | ||
| # verification tooling agree with CI about what borrows are legal. | ||
| # | ||
| # Note: an inherited `RUSTFLAGS` environment variable overrides this table. | ||
| # Wrappers that set `RUSTFLAGS` (see the Makefile) must re-state | ||
| # `-Zpolonius=next` themselves. See | ||
| # docs/adr-006-adopt-polonius-nightly-toolchain.md. | ||
| [build] | ||
| rustflags = ["-Zpolonius=next"] | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Changelog | ||
|
|
||
| ## Unreleased | ||
|
|
||
| ### Changed | ||
|
|
||
| - Route graph-view node registration through a borrow-returning | ||
| `NodePathRegistry` accessor that looks paths up once on hits and clones a | ||
| path only on insertion | ||
| ([#465](https://github.com/leynos/netsuke/issues/465)) | ||
| - Build with the Polonius borrow checker (`-Zpolonius=next`) on the pinned | ||
| `nightly-2026-06-25` toolchain; checkout builds pick this up | ||
| automatically via `rustup`, while registry installs must pass the | ||
| toolchain and flag explicitly | ||
| (`RUSTFLAGS=-Zpolonius=next cargo +nightly-2026-06-25 install netsuke`) | ||
| ([#465](https://github.com/leynos/netsuke/issues/465)) | ||
| - Remove the `rust-version = "1.89.0"` minimum-supported-Rust-version | ||
| declaration from `Cargo.toml`; `rust-toolchain.toml` is now the single | ||
| source of truth for the compiler contract | ||
| ([#465](https://github.com/leynos/netsuke/issues/465)) | ||
|
|
||
| ## [0.1.0] - 2026-07-28 | ||
|
|
||
| _Initial release._ | ||
|
|
||
| [0.1.0]: https://github.com/leynos/netsuke/releases/tag/v0.1.0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this source is published, the documented bare
cargo install netsukeruns outside the checkout and therefore receives neither this flag nor the pinned nightly: the manifest's package allow-list excludes both.cargo/config.tomlandrust-toolchain.toml(Cargo'spackage --listhelp describes that command as printing the files included in the package). The packaged source now contains a Polonius-only accessor, so ordinary registry installs compile it under the user's toolchain without-Zpolonius=nextand fail with E0499. Keep distributed source NLL-compatible or document and validate an install command that explicitly selects the nightly and passes the flag.AGENTS.md reference: AGENTS.md:L205-L207
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai Has this now been resolved in the latest commit?
Use codegraph analysis to determine your answer.
If this comment is now resolved, please mark it as such using the API. Otherwise, please provide an AI agent prompt for the remaining work to be done to address this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 1254
🏁 Script executed:
Length of output: 74717
🏁 Script executed:
Length of output: 753
@leynos, do not resolve this thread. The latest commit fixes the README and users’ guide, butdocs/quickstart.mdstill tells users to install via barecargo install netsuke(Line 11). That registry build receives neither the pinned nightly nor-Zpolonius=next, while theNodePathRegistry::ensure_node_mutcode path remains explicitly Polonius-only.The documentation-contract-test inspection also failed because repository setup was unavailable, so its coverage remains unverified.
Use this AI-agent prompt to finish the remaining work:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai Has this now been resolved in the latest commit?
Use codegraph analysis to determine your answer.
If this comment is now resolved, please mark it as such using the API. Otherwise, please provide an AI agent prompt for the remaining work to be done to address this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 1490
@leynos, verification is inconclusive. Repository setup failed before the codegraph analysis started.Do not resolve the thread yet. Retry the repository inspection. I cannot verify the latest commit or call the GitHub API to resolve the thread without current repository evidence.
You are interacting with an AI system.