chore(ci): clippy cleanups#55
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on resolving Rust Clippy warnings and stabilizing dependency resolution, while also aligning API/DB models and frontend types as fields are exposed/trimmed (sessions, users, OIDC).
Changes:
- Refactors session/spur client call sites to use parameter structs and introduces
NewSessionfor DB insertion. - Exposes additional session/user fields across backend models and frontend API typings (e.g.,
partition,pod_name,spur_account,auth_provider,last_login_at). - Pins
spur-prototo theROCm/spurv0.3.0git tag and adjusts CI to runcargo clippy --locked.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/api/client.ts | Aligns frontend Session/UserProfile types with API fields. |
| crates/spur-cloud-common/src/session_types.rs | Renames SessionState::from_str to parse and removes unused default helper. |
| crates/spur-cloud-api/src/update.rs | Adds debug logging when spawning startup update checks. |
| crates/spur-cloud-api/src/terminal/ws_handler.rs | Minor WS ping cleanup and adjusts retry assertions to satisfy lints. |
| crates/spur-cloud-api/src/spur_client.rs | Introduces parameter structs for Spur operations; adds user/account fields to submitted JobSpec. |
| crates/spur-cloud-api/src/routes/users.rs | Small lint cleanups for SSH key parsing and base64 encoding. |
| crates/spur-cloud-api/src/routes/sessions.rs | Uses NewSession, updates Spur client calls to parameter structs, and adds native-host user lookup. |
| crates/spur-cloud-api/src/models/user.rs | Exposes spur_account, auth_provider, and last_login_at on UserProfile. |
| crates/spur-cloud-api/src/models/session.rs | Adds NewSession helper and exposes partition/pod_name on SessionDetail. |
| crates/spur-cloud-api/src/main.rs | Updates SessionState parsing call sites to parse. |
| crates/spur-cloud-api/src/db/user_repo.rs | Removes unused repo functions to satisfy dead-code lints. |
| crates/spur-cloud-api/src/db/session_repo.rs | Refactors create_session to take a NewSession struct and removes unused get_session. |
| crates/spur-cloud-api/src/auth/okta.rs | Adds issuer validation for Okta ID tokens. |
| crates/spur-cloud-api/src/auth/oidc_common.rs | Trims OIDC discovery/token types and adds iss + issuer validation helper. |
| Cargo.toml | Pins spur-proto to tag v0.3.0. |
| Cargo.lock | Updates lockfile to reflect pinned spur-proto and transitive dependency changes. |
| .github/workflows/ci.yml | Updates Clippy job to use --locked. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Resolve Clippy warnings without allow(dead_code) or allow(too_many_arguments): use parameter structs for session/Spur client calls, expose unused DB/API fields, trim OIDC types, and apply small lint fixes (trim/split_whitespace, needless borrows, WS ping). Pin spur-proto to the ROCm/spur v0.3.0 git tag instead of tracking main so Cargo.lock is stable and `cargo clippy --locked` works. Also align frontend Session/UserProfile types with the API.
shiv-tyagi
approved these changes
Jun 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolve Clippy warnings without allow(dead_code) or allow(too_many_arguments): use parameter structs for session/Spur client calls, expose unused DB/API fields, trim OIDC types, and apply small lint fixes (trim/split_whitespace, needless borrows, WS ping).
Pin spur-proto to the ROCm/spur v0.3.0 git tag instead of tracking main so Cargo.lock is stable and
cargo clippy --lockedworks.Also align frontend Session/UserProfile types with the API.