From 65f5b0e40a31f174c9f2a5863ced00eabb2516d5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Nov 2026 23:53:52 +0000 Subject: [PATCH 1/2] fix(eql-mapper): satisfy Clippy and Cargo lints new in Rust 1.100 Clippy 1.100 reads a repeated thiserror format argument as a duplicated attribute and now flags the early-return form of needless_bool, so both fail the CI lint gate under -D warnings. Inline the format arguments so each field is named once, and return the is_err() result directly. Cargo 1.100 also warns by default about unused dependencies. tracing-subscriber is only used by eql-mapper's cfg(test) helpers, so it moves to dev-dependencies; showcase never used rand, so it is removed. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 1 - packages/eql-mapper/Cargo.toml | 2 +- packages/eql-mapper/src/inference/type_error.rs | 6 +----- .../src/transformation_rules/fail_on_placeholder_change.rs | 7 +------ packages/showcase/Cargo.toml | 1 - 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 161133246..d496703dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4472,7 +4472,6 @@ version = "3.0.1" dependencies = [ "cipherstash-client", "cipherstash-config", - "rand 0.9.3", "rustls", "serde", "serde_json", diff --git a/packages/eql-mapper/Cargo.toml b/packages/eql-mapper/Cargo.toml index dd4e01e8f..32a2a4e14 100644 --- a/packages/eql-mapper/Cargo.toml +++ b/packages/eql-mapper/Cargo.toml @@ -23,8 +23,8 @@ impl-trait-for-tuples = "0.2.3" sqltk = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } -tracing-subscriber = { workspace = true } topological-sort = "0.2.2" [dev-dependencies] pretty_assertions = "^1.0" +tracing-subscriber = { workspace = true } diff --git a/packages/eql-mapper/src/inference/type_error.rs b/packages/eql-mapper/src/inference/type_error.rs index ad0aefb92..96513f9ea 100644 --- a/packages/eql-mapper/src/inference/type_error.rs +++ b/packages/eql-mapper/src/inference/type_error.rs @@ -109,11 +109,7 @@ pub enum TypeError { /// This is a refusal, not a coverage gap: serving the statement would mean /// treating the column as plaintext. #[error( - "Column `{}.{}` is declared as `{}`, which this build of CipherStash Proxy cannot encrypt or decrypt. Statements referencing `{}` are refused so that plaintext is never written to it. Migrate the column to an EQL v3 domain type.", - table, - column, - column_type, - table + "Column `{table}.{column}` is declared as `{column_type}`, which this build of CipherStash Proxy cannot encrypt or decrypt. Statements referencing `{table}` are refused so that plaintext is never written to it. Migrate the column to an EQL v3 domain type." )] UnmappableEncryptedColumn { table: String, diff --git a/packages/eql-mapper/src/transformation_rules/fail_on_placeholder_change.rs b/packages/eql-mapper/src/transformation_rules/fail_on_placeholder_change.rs index ccd7abd02..badb6d097 100644 --- a/packages/eql-mapper/src/transformation_rules/fail_on_placeholder_change.rs +++ b/packages/eql-mapper/src/transformation_rules/fail_on_placeholder_change.rs @@ -67,12 +67,7 @@ impl<'ast> TransformationRule<'ast> for FailOnPlaceholderChange<'ast> { node_path: &sqltk::NodePath<'ast>, target_node: &N, ) -> bool { - if self - .check_no_placeholders_have_been_modified(node_path, target_node) + self.check_no_placeholders_have_been_modified(node_path, target_node) .is_err() - { - return true; - } - false } } diff --git a/packages/showcase/Cargo.toml b/packages/showcase/Cargo.toml index 4dd993aab..c27a1b028 100644 --- a/packages/showcase/Cargo.toml +++ b/packages/showcase/Cargo.toml @@ -21,4 +21,3 @@ tokio-postgres-rustls = "0.13.0" rustls = { version = "0.23.20", default-features = false, features = ["std", "aws_lc_rs"] } tracing = { workspace = true } tracing-subscriber = { workspace = true } -rand = "0.9" From 7ef85eedc39cd4e70964ea641333f8177b2bcca7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Nov 2026 23:53:52 +0000 Subject: [PATCH 2/2] chore: pin Rust 1.100.0 Moves the pinned toolchain from 1.99.0 to 1.100.0, which also picks up the 1.99.1 fix for a miscompile of FFI bool return values on x86_64. The MSRV stays at 1.89.0: no locked dependency needs a newer compiler. Clippy 1.100 no longer reports double_must_use on the methods async_trait generates, so the allow on EncryptionService is dropped. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- DEVELOPMENT.md | 2 +- packages/cipherstash-proxy/src/proxy/mod.rs | 3 --- rust-toolchain.toml | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37c446ddd..c3c742439 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **Database errors logged at debug level**: errors that PostgreSQL returns to a client are now logged concisely at `debug` level (`CS_LOG__PROTOCOL_LEVEL=debug` shows them), instead of in full at `error` level. Errors that Proxy itself generates are still logged. -- **Minimum supported Rust version**: building Proxy from source now requires Rust 1.89.0 or later, declared as `rust-version` in `Cargo.toml` so Cargo reports an older compiler clearly instead of failing deep in a dependency. CI builds the production binary on Rust 1.89.0 to keep that minimum from rising by accident. Development, tests, and release binaries use the Rust version pinned in `rust-toolchain.toml` (currently 1.99.0). See [Supported Rust versions](DEVELOPMENT.md#supported-rust-versions). +- **Minimum supported Rust version**: building Proxy from source now requires Rust 1.89.0 or later, declared as `rust-version` in `Cargo.toml` so Cargo reports an older compiler clearly instead of failing deep in a dependency. CI builds the production binary on Rust 1.89.0 to keep that minimum from rising by accident. Development, tests, and release binaries use the Rust version pinned in `rust-toolchain.toml` (currently 1.100.0). See [Supported Rust versions](DEVELOPMENT.md#supported-rust-versions). - **PostgreSQL execution lifecycle ownership**: Proxy now tracks prepared statements, portals, Describe operations, execution outcomes, and execution metrics as one connection-local protocol lifecycle. Suspended executions retain their original metrics scope until completion, repeated portal executions receive distinct scopes, and terminal errors replace upstream responses atomically while schema outcomes are reported exactly once. diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index ad644368b..eab6fc650 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -143,7 +143,7 @@ CI uses three Rust toolchains: | Toolchain | Declared in | What CI runs on it | |---|---|---| -| **Pinned** (currently 1.99.0) | `rust-toolchain.toml` | Formatting, Clippy, unit and integration tests across the full PostgreSQL matrix, burn-in, benchmarks, and release binaries (`mise run build:binary`). | +| **Pinned** (currently 1.100.0) | `rust-toolchain.toml` | Formatting, Clippy, unit and integration tests across the full PostgreSQL matrix, burn-in, benchmarks, and release binaries (`mise run build:binary`). | | **Latest stable** | floating `stable` channel | `Lint (Rust stable)`: formatting and Clippy only. | | **Minimum supported (MSRV)** (currently 1.89.0) | `rust-version` under `[workspace.package]` in `Cargo.toml` | `Build (Rust MSRV)`: builds the production binary with `cargo build --locked --release --package cipherstash-proxy`. | diff --git a/packages/cipherstash-proxy/src/proxy/mod.rs b/packages/cipherstash-proxy/src/proxy/mod.rs index 43222968b..9731bc6d1 100644 --- a/packages/cipherstash-proxy/src/proxy/mod.rs +++ b/packages/cipherstash-proxy/src/proxy/mod.rs @@ -147,9 +147,6 @@ impl Proxy { } } -// async_trait adds must_use to its generated methods. Clippy on Rust 1.99 -// reports these annotations as redundant because Future is already must_use. -#[allow(clippy::double_must_use)] #[async_trait::async_trait] pub trait EncryptionService: Send + Sync { /// Encrypt plaintexts for storage in the database diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 9c2ee376f..b17b26618 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.99.0" +channel = "1.100.0" components = ["clippy", "rustfmt"] profile = "minimal"