Finding (from #192 follow-up)
AGENTS.md (FFI-Specific Rules) states: Inline C declarations in FFI::cdef() — do not load the .h file at runtime. — but the code does exactly the opposite.
Evidence
src/ZVec.php:76-87 — FFI::cdef(trim($headerContent), $libPath) where $headerContent comes from file_get_contents of ffi/zvec_ffi_php.h (pre-existing on main, verified).
ffi/zvec_ffi_php.h is the runtime-loaded header — any FFI signature change must update it in sync with ffi/zvec_ffi.h (see related sync-check gap).
Impact
Contributors following AGENTS.md may edit only ffi/zvec_ffi.h and miss the runtime-loaded header, producing a runtime TypeError (or ABI crash) instead of a build failure.
Suggested fix
Update the AGENTS.md FFI-Specific Rules section to document the actual mechanism (runtime cdef from ffi/zvec_ffi_php.h) and call out that both ffi/zvec_ffi.h and ffi/zvec_ffi_php.h must be kept in sync with ffi/zvec_ffi.cc.
Found during #192 implementation; verified by subagent review (CONFIRMED; no duplicate among all 105 issues).
Finding (from #192 follow-up)
AGENTS.md (FFI-Specific Rules) states:
Inline C declarations in FFI::cdef() — do not load the .h file at runtime.— but the code does exactly the opposite.Evidence
src/ZVec.php:76-87—FFI::cdef(trim($headerContent), $libPath)where $headerContent comes fromfile_get_contentsofffi/zvec_ffi_php.h(pre-existing on main, verified).ffi/zvec_ffi_php.his the runtime-loaded header — any FFI signature change must update it in sync withffi/zvec_ffi.h(see related sync-check gap).Impact
Contributors following AGENTS.md may edit only
ffi/zvec_ffi.hand miss the runtime-loaded header, producing a runtime TypeError (or ABI crash) instead of a build failure.Suggested fix
Update the AGENTS.md FFI-Specific Rules section to document the actual mechanism (runtime cdef from
ffi/zvec_ffi_php.h) and call out that bothffi/zvec_ffi.handffi/zvec_ffi_php.hmust be kept in sync withffi/zvec_ffi.cc.Found during #192 implementation; verified by subagent review (CONFIRMED; no duplicate among all 105 issues).