Skip to content

Add ABI diff check for C API and C++ bindings - #387

Open
ethanglaser wants to merge 15 commits into
mainfrom
dev/eglaser-abi
Open

ethanglaser wants to merge 15 commits into
mainfrom
dev/eglaser-abi

Conversation

@ethanglaser

Copy link
Copy Markdown
Member

No description provided.

ahuber21 pushed a commit that referenced this pull request Sep 14, 2026
Similar to #385,
originated from #345,
identified as part of
#387 efforts
@napetrov

Copy link
Copy Markdown
Contributor

abicheck/integration-lab#2 - it's possible to use GH actions for some of this work an dthey can post messages to PRs in case of removals/additions

Comment thread .github/workflows/build-cpp-runtime-bindings.yml Outdated
ethanglaser and others added 11 commits September 14, 2026 08:31
Co-authored-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
The shared library's header root is the whole of svs, which does not finish
parsing in an hour; --depth binary compares it in seconds. Unused by this
repo's own check, which only covers the runtime bindings, but abi-check.sh is
the shared primitive and its env-override surface is its API -- the innersource
nightly's release comparison is the consumer.

Also treats abicheck's exit 5 (budget exceeded) as a finding rather than a
harness bug, and retargets comments that described the deleted
innersource-vs-public equivalence check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Neither macro is referenced by any header the tarballs ship (grep over all
1992 headers of the runtime bindings tarball: 0 hits each; they are only read
from .cpp files). Both build paths force IVF on -- innersource passes
-DSVS_EXPERIMENTAL_ENABLE_IVF=YES and public -DSVS_RUNTIME_ENABLE_IVF=ON --
so the comment claiming the two sides disagree on SVS_ENABLE_IVF was also
wrong. Verified the runtime comparison produces a byte-identical report
without them.

The svs/index/ivf/* header exclusions stay: svs/index/ivf/common.h really
does include <mkl.h> unguarded and no tarball ships MKL headers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mirrors the runtime bindings' check: build-c-api-bindings.yml grows an abi-check
job comparing this build's svs-c-api tarball against the newest downloadable one
from a main push run, through the same .github/scripts/abi-check.sh the innersource
repo calls, so neither repo can drift on how libsvs_c_api.so is measured.

The C API is the best-conditioned target of the three libraries. It is compiled
-fvisibility=hidden and exports only `svs_*` -- which the existing integration test
independently asserts -- so there are no mangled names, no template instantiations
leaked from header-only dependencies and no std:: internals in the exported set.
svs_c.h reaches stdbool/stddef/stdint and its own generated version header, so full
header depth is both affordable and meaningful. The suppression file is therefore
empty, and stays a file rather than being omitted because abi-check.sh skips a
missing --suppress path silently: a typo there would otherwise be
indistinguishable from deliberate emptiness.

No release-relative check, in this repo or innersource: no published release ships
a C API, so there is nothing to compare against yet.

The artifact's retention on main goes to 30 days, since it is now the baseline every
open PR is measured against.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ethanglaser ethanglaser changed the title Add ABI checking Add ABI diff check for C API and C++ bindings Sep 22, 2026
@ethanglaser
ethanglaser marked this pull request as ready for review September 22, 2026 19:32
@ethanglaser

Copy link
Copy Markdown
Member Author

abicheck/integration-lab#2 - it's possible to use GH actions for some of this work an dthey can post messages to PRs in case of removals/additions

Pushed a branch off of this one that does this: https://github.com/intel/ScalableVectorSearch/compare/dev/eglaser-abi...dev/eglaser-abicheck-ghaction?expand=1, overall similar level of complexity to current state

@ethanglaser

ethanglaser commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

ABI check currently failing because available artifacts from last merged PR expired after 1 week. Fixing by rerunning those, but this PR would also extend that window to 30 days.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants