Skip to content

[CI Doctor] fmt failure: unformatted closure in test_three_node_cycle_detected #17

Description

@github-actions

CI Failure: Rust Format job

Failed run: https://github.com/composable-delivery/busbar-sf-agentscript/actions/runs/22536093016
Branch: sf-plugin
Failing commit: 14d603b"test: add coverage for connection/language/directive roundtrip and graph cycles (5 new tests)"


Failing command

cargo fmt --all --check

Exit code: 1


Exact error output

Diff in src/graph/validation.rs:549:
             .collect();
         // At least one of the three topics should appear in the reported cycle path
         assert!(
-            cycle_names.iter().any(|n| {
-                n == "topic_a" || n == "topic_b" || n == "topic_c"
-            }),
+            cycle_names
+                .iter()
+                .any(|n| { n == "topic_a" || n == "topic_b" || n == "topic_c" }),
             "Cycle should involve topic_a/b/c, got: {:?}",
             cycle_names
         );

Root cause

The commit 14d603b added two new tests to src/graph/validation.rs, including test_three_node_cycle_detected. The multi-line method-chain closure in the assert! macro was written in a style that rustfmt reformats differently — it wants the .iter().any(...) chain broken across lines with the closure body inlined on one line, rather than the closure body expanded on its own line.

This is a pure formatting issue with no logic impact.


Suggested fix

In src/graph/validation.rs around line 549, reformat the assert! to match what rustfmt expects:

assert!(
    cycle_names
        .iter()
        .any(|n| { n == "topic_a" || n == "topic_b" || n == "topic_c" }),
    "Cycle should involve topic_a/b/c, got: {:?}",
    cycle_names
);

Or simply run:

cargo fmt

and commit the result.

Generated by CI Doctor

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciCI/CD issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions