Skip to content

style: unbreak the Linting job on main (rustfmt + macOS precedence guard) - #594

Merged
smunini merged 1 commit into
mainfrom
fix/rustfmt-delivery-stats
Aug 19, 2026
Merged

style: unbreak the Linting job on main (rustfmt + macOS precedence guard)#594
smunini merged 1 commit into
mainfrom
fix/rustfmt-delivery-stats

Conversation

@smunini

@smunini smunini commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The Linting job is red on main and therefore on every open PR — including #593, which changes no Rust at all. Two independent causes.

1. cargo fmt --all -- --check fails on main

The delivery-stats work (#586, merged as #588) landed with five files unformatted:

  • crates/rest/src/lib.rs — method chain in the subscription-row builder
  • crates/subscriptions/src/delivery_stats.rs — a lock() chain and an assert_eq!
  • crates/subscriptions/src/lib.rspub use ordering
  • crates/ui/src/subscriptions.rs — the first-try-rate then() closure
  • crates/ui/tests/subscriptions_http.rs — an assert! with a message

The diff is verbatim cargo fmt output. No logic changes.

2. The HTS canonical-precedence guard (#200) fails on macOS runners

grep -r … src/ prints paths as src//backends/mod.rs under BSD grep, so the literal grep -v 'src/backends/mod.rs' exclusion never matched and the script flagged the two sanctioned test constants living in the very file it is meant to exclude. The lint job runs on a [self-hosted] pool with both Linux and macOS runners, so this passed or failed depending on where the job landed — every recent green was a Linux leg, and #593's red landed on macOS. The exclusion is now a regex that tolerates the repeated slash.

This one was latent behind the fmt failure: fixing only the formatting would have moved the red one step down the job.

Verification

  • cargo fmt --all -- --check — clean
  • crates/hts/scripts/check-canonical-precedence.sh — exits 0 (run on macOS, the leg that was failing)
  • cargo clippy --all-targets --all-features with the CI flag set — clean

https://claude.ai/code/session_0172oQyVFqtG8stqBPZXriVe

Two independent breakages, both surfaced by the Linting job on PR #593.

`cargo fmt --all -- --check` fails on main: the delivery-stats work
(#586, merged as #588) landed with five files unformatted — a method
chain in the rest subscription-row builder, two in delivery_stats.rs,
the `pub use` ordering in the subscriptions lib, the first-try-rate
`then()` closure in the UI page, and an assert in subscriptions_http.
This is pure `cargo fmt` output; no logic changes.

The HTS canonical-precedence guard (#200) then fails on macOS only.
`grep -r ... src/` prints `src//backends/mod.rs` under BSD grep, so the
literal `grep -v 'src/backends/mod.rs'` exclusion never matched and the
script flagged the two sanctioned test constants inside the file it is
meant to exclude. The lint job runs on a self-hosted pool with both
Linux and macOS runners, so it passed or failed by where it landed;
recent greens were all Linux legs. The exclusion is now a regex
tolerating the repeated slash.

Verified locally: `cargo fmt --all -- --check` clean, the guard script
exits 0, and clippy with the CI flag set is clean.

Claude-Session: https://claude.ai/code/session_0172oQyVFqtG8stqBPZXriVe
@smunini
smunini merged commit c71671a into main Aug 19, 2026
5 checks passed
@smunini
smunini deleted the fix/rustfmt-delivery-stats branch August 19, 2026 22:48
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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