style(fmt): unbreak rust-ci Test job (cargo fmt drift)#36
Merged
Conversation
…t_tests) `cargo fmt --check` has been red on main since 2026-05-22 because two let-bindings in tests/seam_contract_tests.rs (lines 433 and 490) were wrapped onto two lines despite fitting on one. Pure mechanical `cargo fmt` output — no semantic change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 49 issues detected
View findings[
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Nickel file missing SPDX-License-Identifier header (1 occurrences, CWE-1104)",
"type": "ncl_missing_spdx",
"file": "/home/runner/work/panic-attack/panic-attack/reports/panic-attack-20260211180017.ncl",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "expect() in hot path (2 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/panic-attack/panic-attack/src/attestation/chain.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/attestation/evidence.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/ambush/mod.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "unwrap_or(0) with dangerous default (3 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/kanren/strategy.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "unwrap_or(0) with dangerous default (3 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/axial/mod.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "expect() in hot path (4 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/panic-attack/panic-attack/src/assail/analyzer.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "unwrap() without prior check -- DoS via panic (4 occurrences, CWE-754)",
"type": "unwrap_without_check",
"file": "/home/runner/work/panic-attack/panic-attack/benches/scan_bench.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "high"
},
{
"reason": "expect() in hot path (2 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/panic-attack/panic-attack/benches/scan_bench.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
5 tasks
hyperpolymath
added a commit
that referenced
this pull request
May 26, 2026
## Summary
`cargo clippy --all-targets --all-features -- -D warnings` and `cargo
test` were both red on `main` after the toolchain rolled to **Rust
1.95.0** and **two struct fields** (`CrashReport::schema_version`,
`ProgramStatistics::safe_unwrap_calls`) were added in v2.5.0 without
updating every test/bench literal.
This PR unblocks the `Test` job in `rust-ci` reusable.
### Lib clippy fixes (5 sites)
| File | Lint | Fix |
|------|------|-----|
| `src/assemblyline.rs:435` | `unnecessary_sort_by` | `sort_by_key(\|r\|
Reverse(...))` |
| `src/bridge/lockfile.rs:23` | `type_complexity` | `type LockfileParser
= fn(&Path) -> Result<...>` |
| `src/bridge/registry.rs:71` | `new_without_default` | `impl Default
for MitigationRegistry` forwarding to `new()` |
| `src/mass_panic/imaging.rs:201` | `unnecessary_sort_by` |
`sort_by_key(\|c\| Reverse(...))` |
| `src/storage/mod.rs:586` | `needless_range_loop` | `for (attempt,
delay) in delays.iter().enumerate()` |
Plus 9 lints already auto-fixed by `cargo clippy --fix`
(`unnecessary_map_or`, `manual_range_contains`, `format_in_format_args`,
`single_component_path_imports`) across `src/assail/analyzer.rs`,
`src/bridge/{lockfile,reachability}.rs`, `src/main.rs`,
`src/storage/mod.rs`, `tests/seam_contract_tests.rs`.
### Test/bench fixes (6 sites)
- `tests/panll_tests.rs:222` — add `CrashReport.schema_version` field
- `tests/report_tests.rs:62` — same
- `tests/panll_tests.rs:247` — `map_or(false, ..)` → `is_some_and(..)`
- `tests/aspect_tests.rs:230` — `|path| f(path)` → `f` (redundant
closure)
- `tests/property_tests.rs:137` — `if let Some(_) = ..` → `.is_some()`
- `tests/property_tests.rs:260` — `vec![..]` → `[..]` (useless_vec)
- `tests/property_tests.rs:325` — replaced tautological `!is_empty()` on
const with `chars().count() > 0` (still exercises unicode-iteration
smoke check)
- `benches/scan_bench.rs:8/221` — `criterion::black_box` →
`std::hint::black_box` (deprecated); add `safe_unwrap_calls: 0` to
`ProgramStatistics` literal
### Overlap with PR #36
The `tests/seam_contract_tests.rs:433/490` fmt collapses overlap with PR
#36 (identical fix). Whichever lands second will be a no-op merge.
## Test plan
- [x] `cargo clippy --all-targets --all-features -- -D warnings` clean
- [x] `cargo fmt --check` clean
- [x] `cargo test --all-features --no-fail-fast` — all suites green
(218+218+... pass)
- [x] Signed commit, MPL-2.0 headers untouched
- [x] No semantic changes, no new API surface, no feature changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 49 issues detected
View findings[
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Nickel file missing SPDX-License-Identifier header (1 occurrences, CWE-1104)",
"type": "ncl_missing_spdx",
"file": "/home/runner/work/panic-attack/panic-attack/reports/panic-attack-20260211180017.ncl",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "expect() in hot path (2 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/panic-attack/panic-attack/src/attestation/chain.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/attestation/evidence.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/ambush/mod.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "unwrap_or(0) with dangerous default (3 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/kanren/strategy.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "unwrap_or(0) with dangerous default (3 occurrences, CWE-754)",
"type": "unwrap_dangerous_default",
"file": "/home/runner/work/panic-attack/panic-attack/src/axial/mod.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "expect() in hot path (4 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/panic-attack/panic-attack/src/assail/analyzer.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "unwrap() without prior check -- DoS via panic (4 occurrences, CWE-754)",
"type": "unwrap_without_check",
"file": "/home/runner/work/panic-attack/panic-attack/benches/scan_bench.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "high"
},
{
"reason": "expect() in hot path (2 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/panic-attack/panic-attack/benches/scan_bench.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
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.
Summary
cargo fmt --checkhas been red onmainsince 2026-05-22, blocking the rust-ci Test job on every push. Two let-bindings intests/seam_contract_tests.rs(lines 433 and 490) were wrapped onto two lines despite fitting on one.Pure mechanical
cargo fmtoutput — no semantic change.Test plan
cargo fmt --checkexits 0 locallyTestjob goes greenOut of scope
The
Check MSRV (1.85.0)job is also red on main (eframe pulls in deps requiring rustc 1.92+) — that needs an MSRV bump or a downgrade decision, tracked separately.🤖 Generated with Claude Code