Skip to content

Commit f13baee

Browse files
mudlerlocalai-org-maint-bot
authored andcommitted
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 <mudler@localai.io> Assisted-by: Claude Code:claude-opus-5 [ClaudeCode]
1 parent 5945b0e commit f13baee

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

backend/go/vllm-cpp/vllmcpp_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,23 @@ var _ = Describe("C ABI struct mirrors", func() {
7575
})
7676
})
7777

78+
// Pin/mirror skew is the failure mode this backend is most exposed to: the Go
79+
// PODs above are hand-written against one VLLM_ABI_VERSION, and the Makefile
80+
// pins the vllm.cpp commit that produces it. This spec catches drift without
81+
// needing model weights - set VLLM_CPP_LIBRARY to a built libvllm and it binds
82+
// every symbol and compares the library's reported ABI against the mirrors'.
83+
var _ = Describe("real library ABI handshake", func() {
84+
It("binds every symbol and reports the ABI the mirrors were written against", func() {
85+
lib := os.Getenv("VLLM_CPP_LIBRARY")
86+
if lib == "" {
87+
Skip("VLLM_CPP_LIBRARY not set; skipping the real-library handshake")
88+
}
89+
Expect(registerLib(lib)).To(Succeed())
90+
Expect(vllmABIVersion()).To(Equal(int32(abiVersion)))
91+
Expect(vllmVersion()).NotTo(BeEmpty())
92+
})
93+
})
94+
7895
var _ = Describe("parseOptions", func() {
7996
It("extracts the engine sizing knobs", func() {
8097
lo := parseOptions(&pb.ModelOptions{Options: []string{

0 commit comments

Comments
 (0)