Skip to content

Commit 3be1e16

Browse files
maltesanderclaude
andcommitted
fix: the benchmark crate's Backend impl takes the catalog query types
bench/ is its own Cargo workspace, so no root cargo command and no pre-commit hook compiles it -- but CI's "Compile benchmarks" step does, and it holds a full impl Backend. The catalog hook change broke it with every local check green. AGENTS.md now names the two detached workspaces and what to run after touching either trait. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent b9ad568 commit 3be1e16

2 files changed

Lines changed: 20 additions & 8 deletions

File tree

AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ framework itself and, where relevant, how a downstream driver crate consumes it.
5454
Manager can do; it closes the compile-and-lint half, which is where the
5555
regressions actually are.
5656

57+
- **`bench/` and `fuzz/` are separate Cargo workspaces, so nothing at the repo
58+
root compiles them.** Not `cargo test`, not `cargo clippy --all-targets`, and
59+
not a single `pre-commit` hook. `bench/benches/handle_lookup.rs` contains a
60+
full `impl Backend`, so **any change to the `Backend` or `StatementBackend`
61+
trait breaks it silently** — every local check passes and CI's "Compile
62+
benchmarks" step fails. That has already happened once, when the catalog hooks
63+
moved to query types. After touching either trait:
64+
65+
```bash
66+
(cd bench && cargo build --benches)
67+
(cd fuzz && cargo +nightly build --target x86_64-unknown-linux-gnu)
68+
```
69+
70+
The generalisable form: `pre-commit run --all-files` is the source of truth
71+
for everything *in the root workspace*, and these two directories are outside
72+
it by design (see the Benchmarks and Fuzzing sections for why). A detached
73+
workspace is invisible to exactly the checks you would expect to catch it.
74+
5775
### Changelog
5876

5977
This project keeps a [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)

bench/benches/handle_lookup.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,14 @@ impl Backend for BenchBackend {
9090
fn tables(
9191
_: &Self::Connection,
9292
_: &Self::CancelToken,
93-
_: Option<&str>,
94-
_: Option<&str>,
95-
_: Option<&str>,
96-
_: &[String],
93+
_: &stackable_odbc_core::types::TablesQuery<'_>,
9794
) -> Result<Vec<stackable_odbc_core::types::TableRow>, Self::Error> {
9895
Ok(Vec::new())
9996
}
10097
fn columns(
10198
_: &Self::Connection,
10299
_: &Self::CancelToken,
103-
_: Option<&str>,
104-
_: Option<&str>,
105-
_: Option<&str>,
106-
_: Option<&str>,
100+
_: &stackable_odbc_core::types::ColumnsQuery<'_>,
107101
) -> Result<Vec<stackable_odbc_core::types::ColumnRow>, Self::Error> {
108102
Ok(Vec::new())
109103
}

0 commit comments

Comments
 (0)