-
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
Open
leynos
wants to merge
20
commits into
main
Choose a base branch
from
issue-465-migrate-to-polonius-and-evolve-internal-apis-around-borrowing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0dc5b3a
Adopt Polonius on pinned nightly toolchain
2286179
Evolve graph_view node registry to borrow-returning form
7564c72
Drop redundant key clone in group_by grouping loop
081cfa8
Snapshot borrowed keys in cycle detection traversal
4a033a0
Borrow search directories in the which resolver
d87fe4a
Tag principled Polonius refusals at ownership boundaries
9b2fa4d
Document the Polonius audit and anti-regression contract
8f56c9d
Compile Kani cfg policy fixture directly, not via trybuild
5000642
Record harness consequences in Polonius notes
da75c18
Keep Polonius flag when CI presets RUSTFLAGS
leynos 931fb61
Restructure edge registration to flatten nested logic
leynos 2da93c8
Keep Polonius flag in release artefact builds
leynos 32f998d
Address review: checkout credentials and audit wording
leynos 6935b5f
Document explicit toolchain for registry installs
leynos 166359a
Address review: config wording, edge helper, cwd duplication
leynos 2572834
Split Windows setup checks out of install contract test
leynos 9aecea5
Extract release-install checks from install contract test
leynos e70cafe
Route quickstart installs through the users' guide
leynos f00feef
Collapse double blank line left by rebase merge
leynos 7618f5c
Collapse double blank line from rebase merge
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: