Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Feb 2, 2026


Latest Update: v5 — Compare vs v4

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v4 v3 v2 v1 Base
v5 vs v4 vs v3 vs v2 vs v1 vs Base
v4 vs v3 vs v2 vs v1 vs Base
v3 vs v2 vs v1 vs Base
v2 vs v1 vs Base
v1 vs Base
⬇️ Download this PR

Branch

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

Checkout

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

Cherry Pick

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

Pull

git pull origin refs/heads/G101266ed5cfc0fe74d16aaae0785d9622e8da5be

Stacked PRs enabled by GHerrit.

gherrit-pr-id: G101266ed5cfc0fe74d16aaae0785d9622e8da5be
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @joshlf, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant architectural change to how Lean specifications and proofs are processed from Rust source code. By transitioning to an AST-based parser, the system gains improved reliability and maintainability. The addition of the --allow-sorry flag provides crucial flexibility for developers, enabling incremental proof development without blocking the entire verification pipeline. Furthermore, the enhanced handling of Rust generics and a more robust testing framework contribute to a more powerful and user-friendly verification tool.

Highlights

  • Parser Overhaul: The Rust code annotation parser has been completely rewritten, moving from a regex-based approach to a robust Abstract Syntax Tree (AST) parsing method using the syn crate. This allows for more accurate and resilient extraction of Lean specifications and proofs.
  • New Annotation Syntax: Lean specifications and proofs are now extracted from ///@ doc comments instead of /*@ ... @*/ block comments, aligning with standard Rust documentation practices.
  • --allow-sorry Option: A new command-line argument, --allow-sorry, has been introduced. When enabled, missing proofs will automatically be substituted with Lean's sorry keyword, allowing the verification process to proceed without requiring all proofs to be fully implemented. By default, missing proofs will cause a failure.
  • Improved Generic Handling: The system now correctly extracts generic parameters and their bounds from Rust function signatures and translates them into appropriate Lean contexts, enhancing the accuracy of generated Lean theorems for generic Rust functions.
  • Enhanced Test Infrastructure: The integration test suite has been updated to support the new --allow-sorry mode and includes new test cases for both success and failure scenarios. The test environment setup has also been improved with shared, symlinked Lake directories for better isolation and efficiency.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new --allow-sorry flag and refactors the parser to use syn instead of regular expressions. This is a significant improvement, making the parser more robust and the tool more flexible. The implementation is solid, including updates to the build process to enforce the sorry policy and comprehensive test updates. I have a few minor suggestions to improve code clarity and test portability.

Comment on lines +78 to +84
// strip leading @ and space?
// User types `///@ ...` -> extracted `@ ...`
// If we just extract `@`, we get ` ...`
// The user might put `///@ ...`.
// If I strip `@`, I get ` ...`.
// I should probably strip the leading `@` and one optional space?
// `trimmed` starts with `@`.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These comments appear to be leftover development notes. They can be removed to improve code clarity.

Comment on lines +155 to +156
std::os::unix::fs::symlink(&shared_packages, &dest_packages)
.expect("Failed to symlink packages");
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The use of std::os::unix::fs::symlink makes these integration tests non-portable, as it will fail to compile on non-Unix platforms like Windows. If supporting tests on Windows is a goal, consider using conditional compilation (#[cfg(unix)] and #[cfg(windows)]) with std::os::windows::fs::symlink_dir for the Windows case.

}
}
if !dest_build.exists() {
std::os::unix::fs::symlink(&shared_build, &dest_build).expect("Failed to symlink build");
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Similar to the other usage in this file, std::os::unix::fs::symlink is not portable to Windows. Consider a cross-platform approach if Windows test support is needed.

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.

1 participant