From f13baee3c05d8b8b102cb91a48b84bbbc5b29ad4 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 28 Jul 2026 08:13:11 +0000 Subject: [PATCH] test(vllm-cpp): catch ABI pin/mirror skew without model weights The Go PODs in govllmcpp.go are hand-written against one VLLM_ABI_VERSION and the Makefile pins the vllm.cpp commit that produces it. Nothing checked those two agree short of the e2e suite, which needs a model to run at all, so a pin bump could land with a stale mirror and only fail at a user's first load. VLLM_CPP_LIBRARY now drives a handshake spec that dlopens a built libvllm, binds every symbol, and compares the library's reported ABI against the mirrors'. No weights required. Signed-off-by: Ettore Di Giacinto Assisted-by: Claude Code:claude-opus-5 [ClaudeCode] --- backend/go/vllm-cpp/vllmcpp_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/backend/go/vllm-cpp/vllmcpp_test.go b/backend/go/vllm-cpp/vllmcpp_test.go index 69e55de59..96112345d 100644 --- a/backend/go/vllm-cpp/vllmcpp_test.go +++ b/backend/go/vllm-cpp/vllmcpp_test.go @@ -75,6 +75,23 @@ var _ = Describe("C ABI struct mirrors", func() { }) }) +// Pin/mirror skew is the failure mode this backend is most exposed to: the Go +// PODs above are hand-written against one VLLM_ABI_VERSION, and the Makefile +// pins the vllm.cpp commit that produces it. This spec catches drift without +// needing model weights - set VLLM_CPP_LIBRARY to a built libvllm and it binds +// every symbol and compares the library's reported ABI against the mirrors'. +var _ = Describe("real library ABI handshake", func() { + It("binds every symbol and reports the ABI the mirrors were written against", func() { + lib := os.Getenv("VLLM_CPP_LIBRARY") + if lib == "" { + Skip("VLLM_CPP_LIBRARY not set; skipping the real-library handshake") + } + Expect(registerLib(lib)).To(Succeed()) + Expect(vllmABIVersion()).To(Equal(int32(abiVersion))) + Expect(vllmVersion()).NotTo(BeEmpty()) + }) +}) + var _ = Describe("parseOptions", func() { It("extracts the engine sizing knobs", func() { lo := parseOptions(&pb.ModelOptions{Options: []string{