Skip to content

fix(fmt): apply rustfmt to session.rs test assertions - #85

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/rustfmt-session-rs
May 19, 2026
Merged

fix(fmt): apply rustfmt to session.rs test assertions#85
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/rustfmt-session-rs

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Problem

Rust Core CI has been failing on main since PR #84 (fix(session): emit session:start once per session) merged with admin-override despite a failing Rustfmt step.

Diff in crates/amplifier-core/src/session.rs:797:
             .filter(|(name, _)| name == events::SESSION_START)
             .count();
         assert_eq!(
-            start_count,
-            1,
+            start_count, 1,
             "session:start must fire exactly once per session\u2026"

Diff in crates/amplifier-core/src/session.rs:842:
         assert_eq!(
-            resume_count,
-            1,
+            resume_count, 1,

Fix

cargo fmt -p amplifier-core \u2014 two assertion macros collapse to canonical formatting. Tests behave identically; this is pure whitespace.

Verification (all four CI commands run locally on the fixed branch)

Step Result
cargo fmt -p amplifier-core -p amplifier-core-py --check \u2705
cargo check -p amplifier-core -p amplifier-core-py \u2705
cargo test -p amplifier-core --no-run \u2705
cargo clippy -p amplifier-core -p amplifier-core-py -- -D warnings \u2705

Notes

Two assert_eq! macros in mod tests had multi-line arg formatting that
rustfmt --check rejected. PR #84 landed despite the failing format check
because admin-merge bypassed CI. This restores green Rust Core CI.

Both diffs collapse:
    assert_eq!(
-       start_count,
-       1,
+       start_count, 1,
        "…"
    );

No functional change.

Co-authored-by: Amplifier <amplifier@microsoft.com>
@bkrabach
Brian Krabach (bkrabach) merged commit 225b5d8 into main May 19, 2026
6 checks passed
@bkrabach
Brian Krabach (bkrabach) deleted the fix/rustfmt-session-rs branch May 19, 2026 00:36
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