Skip to content

fix: fixing formatting#1004

Merged
sauraww merged 1 commit into
mainfrom
fix/formatting
May 15, 2026
Merged

fix: fixing formatting#1004
sauraww merged 1 commit into
mainfrom
fix/formatting

Conversation

@sauraww
Copy link
Copy Markdown
Collaborator

@sauraww sauraww commented May 15, 2026

Problem

Describe the problem you are trying to solve here

Solution

Provide a brief summary of your solution so that reviewers can understand your code

Environment variable changes

What ENVs need to be added or changed

Pre-deployment activity

Things needed to be done before deploying this change (if any)

Post-deployment activity

Things needed to be done after deploying this change (if any)

API changes

Endpoint Method Request body Response Body
API GET/POST, etc request response

Possible Issues in the future

Describe any possible issues that could occur because of this change

Summary by CodeRabbit

  • Style
    • Improved code formatting consistency across experimentation platform handlers and helpers through import reordering and standardized syntax formatting.

Review Change Stack

Copilot AI review requested due to automatic review settings May 15, 2026 10:20
@sauraww sauraww requested a review from a team as a code owner May 15, 2026 10:20
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented May 15, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9078e02-21e0-42a2-8a6f-829b2fee1b81

📥 Commits

Reviewing files that changed from the base of the PR and between f5121d8 and a123e3d.

📒 Files selected for processing (4)
  • crates/experimentation_platform/src/api/experiment_groups/handlers.rs
  • crates/experimentation_platform/src/api/experiments/handlers.rs
  • crates/experimentation_platform/src/api/experiments/helpers.rs
  • crates/superposition_types/src/database/models.rs

Walkthrough

This PR standardizes code formatting across the experimentation platform by reordering imports for consistency, adding trailing commas to handler function calls, and reformatting a helper function's multi-line arguments. The database models file also receives import reordering updates. No runtime logic or public API signatures are modified.

Changes

Experimentation Platform Formatting

Layer / File(s) Summary
Handler import reordering
crates/experimentation_platform/src/api/experiment_groups/handlers.rs, crates/experimentation_platform/src/api/experiments/handlers.rs
Import lists in both handlers are reordered so hash and validation group ID helpers appear before validate_change_reason_with_function.
Trailing comma formatting in handlers
crates/experimentation_platform/src/api/experiments/handlers.rs
Trailing commas are added after the &user argument in validate_change_reason_with_function calls across seven handler functions: create, conclude, discard, ramp, update, pause, and resume.
Helper function argument formatting
crates/experimentation_platform/src/api/experiments/helpers.rs
The headers_map assignment in validate_change_reason_with_function is reformatted to split the construct_header_map call across multiple lines.

Database Models Import Reorganization

Layer / File(s) Summary
Conditional import reordering in models
crates/superposition_types/src/database/models.rs
Conditional diesel and feature-flag imports are reorganized; sql_types moves alongside other Diesel traits, and feature-gated imports are reordered.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • knutties
  • Datron
  • mahatoankitkumar

Poem

A tidy import, a comma here,
Consistency makes the codebase clear,
Formatting flows with gentle grace,
No logic changed, just cleaner space—
The rabbit hops through styled files bright! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title "fix: fixing formatting" is vague and non-descriptive, using generic terms that don't convey specific information about which formatting aspects were changed across the multiple files. Use a more specific title like "fix: reorder imports and format multi-line function calls" to clearly indicate the scope and nature of the formatting changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/formatting

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR applies minor Rust formatting adjustments to keep imports and line wrapping consistent across the codebase.

Changes:

  • Reordered/realigned use imports in a few modules.
  • Wrapped a long construct_header_map(...) call across multiple lines for readability.
  • Added trailing commas to multi-line function argument lists for consistent formatting.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
crates/superposition_types/src/database/models.rs Import formatting / ordering adjustments.
crates/experimentation_platform/src/api/experiments/helpers.rs Line-wrapped header map construction for formatting consistency.
crates/experimentation_platform/src/api/experiments/handlers.rs Reordered helper imports and added trailing commas in multi-line calls.
crates/experimentation_platform/src/api/experiment_groups/handlers.rs Reordered helper imports for consistent formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 10 to 14
#[cfg(feature = "diesel_derives")]
use diesel::{
AsChangeset, AsExpression, FromSqlRow, Insertable, QueryId, Queryable, Selectable,
sql_types::{Json, Text},
AsChangeset, AsExpression, FromSqlRow, Insertable, QueryId, Queryable, Selectable,
};
@sauraww sauraww added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit 2c079cf May 15, 2026
25 checks passed
@sauraww sauraww deleted the fix/formatting branch May 15, 2026 10:50
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.

4 participants