Skip to content

[build] Refactor Repository Structure#36

Merged
csegarragonz merged 24 commits intomainfrom
rust-workspace
Oct 31, 2025
Merged

[build] Refactor Repository Structure#36
csegarragonz merged 24 commits intomainfrom
rust-workspace

Conversation

@csegarragonz
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @csegarragonz, 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 significantly refactors the project's repository structure and build system. The main CLI tool has been renamed from 'invrs' to 'accli', and the entire project has transitioned to a Cargo workspace for streamlined dependency management and consistent versioning across all Rust crates. Configuration files have been centralized, and new developer tools for automated versioning and code formatting have been integrated, enhancing overall project organization and developer experience.

Highlights

  • Repository Restructuring: The project underwent a significant refactor, moving configuration files (Ansible, Azure, Docker, K8s) into a new 'config/' directory and renaming the main CLI tool from 'invrs' to 'accli'.
  • Cargo Workspace Adoption: The project now utilizes a Cargo workspace, centralizing dependency management and versioning for 'accli', 'attestation-service', 'accless-jwt', and all workflow handlers, improving build consistency.
  • Enhanced Developer Tooling: New 'Dev' commands have been introduced to the 'accli' tool, enabling automated version bumping and comprehensive code formatting (Rust and C++), streamlining development workflows.
  • Updated Documentation Structure: New documentation files ('docs/baselines.md', 'docs/workflows.md', 'experiments/README.md') have been added, and the 'README.md' has been updated to reflect the new repository structure and CLI usage.
  • Dependency Updates: Extensive updates to 'Cargo.lock' reflect changes in dependencies and their versions across the entire project, including updates to 'base64', 'rsa', 'serde_json', and 'x509-parser' in 'accless-jwt'.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release.yml
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 significant and beneficial refactoring of the repository structure into a Rust workspace. This centralizes dependency management and improves project organization. However, there are several critical issues with the new build and dependency setup that need to be addressed.

Most importantly, the workspace is configured to use the Rust 2024 edition, which is not yet stable and will cause build failures with the specified stable toolchain. Additionally, the build script for workflow drivers uses incorrect package names, which will also break the build.

There are also significant issues with dependency resolution, resulting in multiple versions of key crates like base64, http, hyper, nom, and reqwest being included in the build. This can lead to increased binary size, longer compile times, and potential runtime errors. I recommend running cargo tree -d to analyze the dependency graph and unify versions where possible. Specific suggestions for some of these are included in the comments.

Comment on lines 59 to 74
if let Some(obj) = header.as_object() && obj.contains_key(property) {
let value = obj
.get(property)
.and_then(|value| value.as_str().map(|s| s.to_string()))
.unwrap();
return value == exp_value;
}

// Check in body
if let Some(obj) = payload.as_object() {
if obj.contains_key(property) {
let value = obj
.get(property)
.and_then(|value| value.as_str().map(|s| s.to_string()))
.unwrap();
return value == exp_value;
}
if let Some(obj) = payload.as_object() && obj.contains_key(property) {
let value = obj
.get(property)
.and_then(|value| value.as_str().map(|s| s.to_string()))
.unwrap();
return value == exp_value;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The use of .unwrap() here is unsafe and can cause a panic if the JWT property exists but is not a string. This function should handle malformed JWTs gracefully instead of panicking. You can use if let or matches! for a safer check.

Suggested change
if let Some(obj) = header.as_object() && obj.contains_key(property) {
let value = obj
.get(property)
.and_then(|value| value.as_str().map(|s| s.to_string()))
.unwrap();
return value == exp_value;
}
// Check in body
if let Some(obj) = payload.as_object() {
if obj.contains_key(property) {
let value = obj
.get(property)
.and_then(|value| value.as_str().map(|s| s.to_string()))
.unwrap();
return value == exp_value;
}
if let Some(obj) = payload.as_object() && obj.contains_key(property) {
let value = obj
.get(property)
.and_then(|value| value.as_str().map(|s| s.to_string()))
.unwrap();
return value == exp_value;
}
if header.get(property).and_then(|v| v.as_str()) == Some(exp_value) {
return true;
}
// Check in body
if payload.get(property).and_then(|v| v.as_str()) == Some(exp_value) {
return true;
}

@csegarragonz csegarragonz merged commit 27ac456 into main Oct 31, 2025
2 checks passed
@csegarragonz csegarragonz deleted the rust-workspace branch November 12, 2025 11:51
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