From f41bb1943954b6f8884a04605a4670f6f6dd5eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Schn=C3=B6rch?= Date: Sat, 3 Oct 2026 18:45:25 +0000 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20gate=20b0=5Falloc=5Fconnector=20alloc?= =?UTF-8?q?ations=20(design=20054=20=C2=A75)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 19 ++++++++++++++++++- Makefile | 11 ++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b82ef313..dbae129b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,23 @@ jobs: - name: Prove no library crate installs a process-global run: make check-no-globals + # Connector allocation counts (design 054 §5) + bench-gate: + name: Bench Gate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + submodules: recursive + + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v2 + with: + rustflags: "" + + - name: Assert connector allocations per message + run: make bench-gate + # Embedded target testing embedded-targets: name: Embedded Cross-compilation @@ -149,7 +166,7 @@ jobs: comprehensive-check: name: Comprehensive Development Check runs-on: ubuntu-latest - needs: [format-and-lint, makefile-build, embedded-targets] + needs: [format-and-lint, makefile-build, embedded-targets, bench-gate] steps: - uses: actions/checkout@v7 with: diff --git a/Makefile b/Makefile index 8e01c98e..eed07d73 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # AimDB Makefile # Simple automation for common development tasks -.PHONY: help build test clean clean-embedded fmt fmt-check clippy doc all check test-embedded test-wasm wasm wasm-test wasm-test-deps examples deny audit security publish publish-check readme-check codegen-drift check-no-sim check-no-globals check-toolchain-pin +.PHONY: help build test clean clean-embedded fmt fmt-check clippy doc all check test-embedded test-wasm wasm wasm-test wasm-test-deps examples deny audit security publish publish-check readme-check codegen-drift check-no-sim check-no-globals check-toolchain-pin bench-gate .DEFAULT_GOAL := help # Separate target dir for embedded checks so an interrupted example build @@ -56,6 +56,7 @@ help: @printf " test-wasm Test WASM cross-compilation compatibility\n" @printf " readme-check Verify the README quickstart matches its compiled example\n" @printf " codegen-drift Compile codegen output against the workspace API\n" + @printf " bench-gate Assert connector allocation counts (b0_alloc_connector)\n" @printf "\n" @printf " $(YELLOW)Security & Quality:$(NC)\n" @printf " deny Check dependencies (licenses, advisories, bans)\n" @@ -742,6 +743,14 @@ publish: @printf "$(GREEN)✓ All $(words $(PUBLISH_ORDER)) crates published successfully!$(NC)\n" @printf "$(BLUE)🎉 AimDB v$(shell grep '^version' Cargo.toml | head -1 | cut -d '"' -f 2) is now live on crates.io!$(NC)\n" +## Benchmark gates +# Runs the counting-allocator connector bench, which asserts its EXPECTED +# allocations per message and fails on any difference (design 054 §5). +# Deterministic, so it gates CI without a quiet runner. +bench-gate: + @printf "$(GREEN)Checking connector allocation counts...$(NC)\n" + cargo bench --package aimdb-bench --bench b0_alloc_connector + ## Drift guards # The README quickstart is compiled as examples/readme-quickstart; this target # fails when the README code block and the example diverge, or when the From 373fb1abe7e8afbb2ba191b4e768cce0918ca978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Schn=C3=B6rch?= Date: Sat, 3 Oct 2026 18:47:13 +0000 Subject: [PATCH 2/2] ci: drop design references from bench-gate comments Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbae129b..a4349083 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,7 @@ jobs: - name: Prove no library crate installs a process-global run: make check-no-globals - # Connector allocation counts (design 054 §5) + # Connector allocation counts bench-gate: name: Bench Gate runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index eed07d73..fe75335b 100644 --- a/Makefile +++ b/Makefile @@ -745,7 +745,7 @@ publish: ## Benchmark gates # Runs the counting-allocator connector bench, which asserts its EXPECTED -# allocations per message and fails on any difference (design 054 §5). +# allocations per message and fails on any difference. # Deterministic, so it gates CI without a quiet runner. bench-gate: @printf "$(GREEN)Checking connector allocation counts...$(NC)\n"