You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ffi/zvec_ffi.h and ffi/zvec_ffi_php.h contain duplicated function declarations. The latter is the one loaded at runtime by FFI::cdef() (src/ZVec.php:76-87); the former documents/holds the same ABI. There is no check that they stay in sync.
Drift currently surfaces only as a runtime TypeError (arg count mismatch) or an ABI-level crash when a stale/short declaration shifts argument registers (e.g. an out-param read from the wrong register).
Suggested scope
A build-time or CI check that extracts function signatures from both headers and diffs them (script or unit test), or
generate ffi/zvec_ffi_php.h from ffi/zvec_ffi.h (single source of truth), or
at minimum: a comment in both headers warning they must be changed together.
Possibly related to closed #83 (SMELL-002) — checked, not a duplicate.
Found during #192 code review; verified by subagent review (CONFIRMED).
Finding (from #192 follow-up)
ffi/zvec_ffi.handffi/zvec_ffi_php.hcontain duplicated function declarations. The latter is the one loaded at runtime byFFI::cdef()(src/ZVec.php:76-87); the former documents/holds the same ABI. There is no check that they stay in sync.Evidence
ffi/zvec_ffi.h:331-334vsffi/zvec_ffi_php.h:253-256— identicalzvec_collection_fetchdeclarations, maintained by hand (both had to be updated for fetch(): expose includeVector + mirror upstream nullable normalization #192).TypeError(arg count mismatch) or an ABI-level crash when a stale/short declaration shifts argument registers (e.g. an out-param read from the wrong register).Suggested scope
ffi/zvec_ffi_php.hfromffi/zvec_ffi.h(single source of truth), orPossibly related to closed #83 (SMELL-002) — checked, not a duplicate.
Found during #192 code review; verified by subagent review (CONFIRMED).