Skip to content

Commit b30c5b6

Browse files
committed
ci(format): enforce stable rustfmt + drop continue-on-error band-aid
PR #133 (commits 7ca1cf3 + ed59b3b) stripped all 13 nightly-only directives from `rustfmt.toml` and normalized the codebase to stable rustfmt 1.94.1. The CI fmt job, however, was never updated to leverage this — it still used: uses: dtolnay/rust-toolchain@nightly continue-on-error: true …which left fmt failures showing as "passing" on PR checks (an atom-bomb red flag for code-style invariants). The original `continue-on-error: true` rationale ("5,679 drift sites with nightly rustfmt") was dependent on the nightly-only directives that PR #133 already removed. The band-aid was stale. This commit completes what PR #133 implied: - Switch fmt job from `dtolnay/rust-toolchain@nightly` to `dtolnay/rust-toolchain@1.95.0` (the rust-toolchain.toml pin). - Remove `continue-on-error: true` — fmt failures now block merge, as they should. - Rename the job from `format/nightly` → `format/stable` to reflect the actual toolchain. - Replace the stale 24-line comment block with a 12-line explanation citing PR #133 as the source of stable-clean state. Plus the 3 drift sites between stable 1.94.1 and stable 1.95.0 (import ordering changes in `src/hpc/clam.rs`, `src/hpc/mod.rs`, `src/hpc/udf_kernels.rs`) — `cargo fmt --all` on 1.95.0 normalizes them. Bundled with the 1.95 bump since this PR is the trigger. Verified: `cargo fmt --all --check` clean on 1.95.0 post-commit. Companion to PR #133 / "where did that PR go" — completes the missed step.
1 parent 9501793 commit b30c5b6

4 files changed

Lines changed: 18 additions & 23 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,23 @@ jobs:
6161

6262
format:
6363
runs-on: ubuntu-latest
64-
name: format/nightly
65-
# Marked non-blocking until a separate fmt-sweep PR aligns the
66-
# codebase with `rustfmt.toml`. Local audit (2026-04-30) under
67-
# `cargo +nightly fmt --all -- --check` reports 5,679 drift sites —
68-
# too large to bundle into a CI-fix PR. The format job remains in
69-
# the pipeline as a continuous signal so the sweep author can verify
70-
# zero drift after running `cargo +nightly fmt --all`, but it does
71-
# not gate merge until that sweep lands.
72-
continue-on-error: true
64+
name: format/stable
65+
# Blocking — no continue-on-error. `rustfmt.toml` was stripped of all
66+
# nightly-only directives in PR #133 (`7ca1cf3d chore(fmt): strip
67+
# unstable rustfmt options, keep stable-only config` + `ed59b3b1
68+
# style: normalize codebase to stable rustfmt 1.94.1`) and the
69+
# codebase normalized — so stable rustfmt enforces the project's
70+
# style losslessly. The previous `continue-on-error: true` +
71+
# `dtolnay/rust-toolchain@nightly` setup was a stale band-aid from
72+
# when `brace_style = AlwaysNextLine`, `imports_granularity =
73+
# Preserve`, `unstable_features = true` still lived in rustfmt.toml.
74+
# That state no longer exists; the band-aid is removed in this PR.
7375
steps:
7476
- uses: actions/checkout@v4
75-
# `rustfmt.toml` declares 13 nightly-only options
76-
# (`brace_style = AlwaysNextLine`, `imports_granularity = Preserve`,
77-
# `unstable_features = true`, etc.). Stable rustfmt warns and
78-
# ignores them, then produces drift on every nightly-formatted
79-
# file because its defaults differ from the unstable settings.
80-
# The format job MUST use nightly rustfmt for the project's chosen
81-
# style to be enforceable.
82-
#
83-
# The compile + clippy jobs stay on 1.95.0 (pinned in
84-
# `rust-toolchain.toml`) — only this fmt job needs nightly.
85-
- uses: dtolnay/rust-toolchain@nightly
77+
# Stable rustfmt 1.95.0 — pinned in `rust-toolchain.toml`. No
78+
# nightly dependency since rustfmt.toml is stable-clean post-PR
79+
# #133.
80+
- uses: dtolnay/rust-toolchain@1.95.0
8681
with:
8782
components: rustfmt
8883
- run: cargo fmt --all --check

src/hpc/clam.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ impl ClamTree {
12811281

12821282
use super::bf16_truth::{AwarenessState, PackedQualia};
12831283
use super::causality::{causality_decompose, CausalityDecomposition, NarsTruthValue};
1284-
use super::node::{Node, SPO, S__, _P_, __O};
1284+
use super::node::{Node, _P_, __O, SPO, S__};
12851285
use super::plane::Distance as PlaneDistance;
12861286

12871287
/// A verified hit enriched with causal metadata from SPO decomposition.

src/hpc/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ mod e2e_tests {
247247
use super::causality::{causality_decompose, CausalityDirection};
248248
use super::clam::{knn_brute, ClamTree};
249249
use super::fingerprint::Fingerprint;
250-
use super::node::{Node, SPO, S__, _P_, __O};
250+
use super::node::{Node, _P_, __O, SPO, S__};
251251
use super::seal::Seal;
252252

253253
#[test]

src/hpc/udf_kernels.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use super::bf16_truth::{bf16_hamming_scalar, BF16Weights};
2222
use super::bitwise::hamming_distance_raw;
2323
use super::cascade::Cascade;
2424
use super::causality::{causality_decompose, CausalityDirection};
25-
use super::node::{Node, SPO, S__, _P_, __O};
25+
use super::node::{Node, _P_, __O, SPO, S__};
2626
use super::plane::Truth;
2727

2828
// ============================================================================

0 commit comments

Comments
 (0)