Repository navigation
ci(rust): supersede #255 — clippy 1.95-safe Luhn predicate in boar_fast_filter - #256
Closed
cursor[bot] wants to merge 1 commit into
Closed
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
… predicate Supersedes #255 (Rust CI added the gate but its own clippy job failed on rust 1.95's new `clippy::manual_is_multiple_of` lint, fired by the canonical `sum % 10 == 0` Luhn check). RCA - PR #255 introduced `.github/workflows/rust-ci.yml` with `cargo clippy --all-targets --all-features -- -D warnings`. - The runner pulls `stable` via `dtolnay/rust-toolchain` (now 1.95). - Rust 1.87+ ships `Integer::is_multiple_of`; clippy 1.95 promoted `manual_is_multiple_of` to a `-W warnings` lint, so the existing `sum % 10 == 0` line in `filter_logic.rs` now hard-fails the job. - Result: the very gate the PR added blocked itself. Fix - Keep the explicit modulo (canonical Luhn predicate, identical behaviour) and pin a localised `#[allow(unknown_lints, clippy::manual_is_multiple_of)]` with a doc comment that documents intent and the upstream lint reference. - `unknown_lints` keeps older toolchains (e.g. rust 1.83 on operator workstations / lab hosts) compiling cleanly when clippy does not yet recognise the lint name. - Zero behaviour change. No DB lock, sampling, or audit-log surface touched (Defensive Scanning Manifesto §1, §3, §6 — guest contract, TOP/NOLOCK posture, no implicit ORDER BY all unaffected). - Resilience posture aligned with the Art of the Fallback §2/§3: the gate must keep delivering the diagnostic across toolchain bumps; upstream lint drift now fails forward (lint quietly suppressed at the call site) instead of silently skipping the whole prefilter test pass. Verified locally - `cargo test` in `rust/boar_fast_filter` — 7 passed. - `cargo clippy --all-targets --all-features -- -D warnings` clean. - `uv run pytest tests/test_github_workflows.py -v` — 13 passed. - `uv run pre-commit run --files <touched>` — clean. Other contents (carried from #255 so this PR is a single supersede): - `.github/workflows/rust-ci.yml` — cargo check/test/clippy on push/PR to main/master (Actions pinned to commit SHAs). - Slack CI failure notify watches the new "Rust CI" workflow. - `tests/test_github_workflows.py` — guards the workflow shape and pinned SHAs. - `docs/ops/OPERATOR_NOTIFICATION_CHANNELS*.md` — note Rust CI in the multi-channel matrix (channel B remains Slack). Co-authored-by: Cursor Agent <[email protected]>
1 of 3 tasks
2 of 3 tasks
FabioLeitao
force-pushed
the
main
branch
2 times, most recently
from
May 3, 2026 17:52
ae0da8d to
b5c995c
Compare
FabioLeitao
added a commit
that referenced
this pull request
May 3, 2026
… merges Maintainer Slack message in thread 1777319823.055829 (channel C0AN7HY3NP9) asks to halt new Rust PRs based on origin/main and rebase/wait for the auditoria-ia branch (claimed 27 commits ahead; origin currently shows 2, implying ~25 unpushed local commits). This commit is doc-only, additive, zero blast radius: - New file docs/ops/sre_audits/STOP_DIRECTIVE_AUDITORIA_IA_REBASE_2026-04-27.md records the directive verbatim, the reproducible gh/git trace that established ground truth, the open-PR surface this STOP applies to (#255, #256, #258, #260, #263), and the maintainer-side resolution recommendation. Pattern matches neighbouring dated SRE audit ledgers. - Index docs/ops/sre_audits/README.md gets one new row pointing at the STOP ledger so the next Slack-triggered SRE agent reads it before trying to base another Rust PR on the old main. No Rust crate, workflow, connector, DB, or customer payload was touched. Defensive Scanning Manifesto and The Art of the Fallback respected: audit-only, diagnostic-on-fall, paper trail before silence. Co-authored-by: Fabio Tavares Leitão <[email protected]>
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.
Description
This PR supersedes #255. PR #255 added the long-asked Rust CI gate for the
rust/boar_fast_filterPyO3 prefilter — but the very gate it added (cargo clippy --all-targets --all-features -- -D warnings) failed against itself on the runner. This PR ships the same Rust CI surface plus the one-line resilience fix that keeps the gate green on ruststable(currently 1.95) without regressing older operator/lab-host toolchains.Type of change
RCA (Julia Evans style — what actually went wrong)
PR #255 introduced
.github/workflows/rust-ci.yml:The runner installs
stableviadtolnay/rust-toolchain. Today that resolves to rust 1.95. The standard library gotInteger::is_multiple_ofin 1.87, and clippy 1.95 promotedmanual_is_multiple_ofto a default-warnlint. The brand-newrust/boar_fast_filter/src/filter_logic.rsLuhn check ends with the canonical:…which clippy 1.95 now flags. With
-D warnings, that warning is an error, the job exits 101, and the gate that #255 was supposed to give us never ran successfully — see the failed run on PR #255:cargo (check, test, clippy)job.In short:
-D warningson a movingstabletoolchain is a foot-gun. Each new clippy release can repaint a green build red without any code change in the repo.Fix (smallest possible, doctrinally aligned)
Keep the canonical Luhn modulo (no behaviour change, no DB / sampling / audit-log surface touched — Defensive Scanning Manifesto §1, §3, §6 all unaffected) and localise the lint suppression at the call site:
clippy::manual_is_multiple_ofsilences the lint on rust 1.95+.unknown_lintskeeps the attribute compiling cleanly on older toolchains (e.g. rust 1.83 present on operator workstations and lab hosts) that don't yet recognise the lint name.check_luhnexplains the trade-off so a future reviewer (or a model on the next sweep) understands why the suppression is intentional and not a code smell.This is The Art of the Fallback §2 / §3 applied to the CI gate itself: instead of removing or weakening the gate, the gate keeps emitting its diagnostic across toolchain drift; lint surprises fail forward at one localised allow attribute rather than silently disabling the whole prefilter test pass.
Defensive architecture impact
boar_fast_filteris a pure-Rust regex/Luhn prefilter that never opens a connection.4111 1111 1111 1111still validates;4111 1111 1111 1112still does not. All seven existing unit tests pass on rust 1.83 and on rust 1.95.connectors/sql_sampling.py(-- Data Boar Compliance Scan,WITH (NOLOCK),TABLESAMPLE, no implicitORDER BY) untouched.What changed (vs
main)rust/boar_fast_filter/src/filter_logic.rs— extracted prefilter logic + Luhn (carried from ci(rust): GitHub Actions for boar_fast_filter + unit tests #255), with the new#[allow(unknown_lints, clippy::manual_is_multiple_of)]attribute and a doc comment explaining the intent.rust/boar_fast_filter/src/lib.rs—FastFilterdelegates toCompiledPatterns::suspect_indices(carried from ci(rust): GitHub Actions for boar_fast_filter + unit tests #255)..github/workflows/rust-ci.yml—cargo check,cargo test,cargo clippy --all-targets --all-features -- -D warningson push/PR tomain/master; Actions pinned to full commit SHAs (carried from ci(rust): GitHub Actions for boar_fast_filter + unit tests #255)..github/workflows/slack-ci-failure-notify.yml—workflow_run.workflowsincludes Rust CI (carried from ci(rust): GitHub Actions for boar_fast_filter + unit tests #255).tests/test_github_workflows.py— guards the new workflow shape + pinned SHAs (carried from ci(rust): GitHub Actions for boar_fast_filter + unit tests #255).docs/ops/OPERATOR_NOTIFICATION_CHANNELS*.md— Slack notify list mentions Rust CI (carried from ci(rust): GitHub Actions for boar_fast_filter + unit tests #255).Verified locally
cargo testinrust/boar_fast_filter— 7 passed on rust 1.83.cargo clippy --all-targets --all-features -- -D warnings— clean on rust 1.83 (and clean on rust 1.95+ in CI).uv run pytest tests/test_github_workflows.py -v— 13 passed.uv run pre-commit run --files <touched>— clean (Ruff, plans-stats, markdown, pt-BR, commercial guard, external-plan-links guard, uv.lock sync, PII guard, PII history guard).Checklist
cargo test,uv run pytest tests/test_github_workflows.py).OPERATOR_NOTIFICATION_CHANNELS*.md).Related