Skip to content

Resolve the committed snapshot before regenerating over it - #22

Merged
estebanzimanyi merged 2 commits into
MobilityDB:mainfrom
estebanzimanyi:ci/committed-snapshot-gate
Sep 2, 2026
Merged

estebanzimanyi merged 2 commits into
MobilityDB:mainfrom
estebanzimanyi:ci/committed-snapshot-gate

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The generated tree this repository tracks is what a consumer of it compiles,
and every step of the run overwrites it, so whether it still holds together is
decided before the regeneration or nowhere. CI builds that tree and resolves
its declarations against the provisioned MEOS first, through the symbol test,
and only then regenerates, reports the drift, builds and runs the suite.

Drift against a freshly derived catalog stays informational: MobilityDB master
moves independently of this binding, so a difference there is ordinary and a
contributor cannot act on it. What a stale snapshot costs is a function MEOS
renamed or dropped reaching a consumer as an EntryPointNotFoundException,
and that is what the step above fails on.

A P/Invoke binds by name at the first call, so a function MEOS renames or
drops is invisible to the compiler and reaches a caller as an
`EntryPointNotFoundException` in production. A test resolves every entry point
the binding declares against the loaded library, which turns that into one
named failure with the symbols listed. It reads the declarations by reflection
over the `LibraryImport` attributes rather than from a list beside them, so a
declaration cannot escape it, and it refuses a run that reads fewer than a
thousand of them, since a parity check with nothing in its hand accepts
anything. A second test holds the check itself to a control: `meos_initialize`
resolves and `meos_no_such_function` does not.

Under that check the binding declares MEOS's own surface. The catalog marks
the declarations that reach it from a project MEOS vendors — pgPointCloud's
`pc_api.h` and `hashtable.h`, PostgreSQL's `pg_numeric.h` — and those are that
project's API rather than MEOS's: 150 declarations, every one of them internal,
and `indexFor`, `pc_patch_sort` and `pc_patch_is_sorted` among them are the
only three in the whole catalog that the built library never exports, the first
because a `static inline` in a header defines no external symbol at all. The
remaining 4675 functions across 26 headers each resolve.
The generated tree this repository tracks is what a consumer of it compiles,
and every step of the run overwrites it, so whether it still holds together is
decided before the regeneration or nowhere. CI builds that tree and resolves
its declarations against the provisioned MEOS first, through the symbol test,
and only then regenerates, reports the drift, builds and runs the suite.

Drift against a freshly derived catalog stays informational: MobilityDB master
moves independently of this binding, so a difference there is ordinary and a
contributor cannot act on it. What a stale snapshot costs is a function MEOS
renamed or dropped reaching a consumer as an `EntryPointNotFoundException`,
and that is what the step above fails on.
@estebanzimanyi
estebanzimanyi merged commit 92dc17c into MobilityDB:main Sep 2, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the ci/committed-snapshot-gate branch September 2, 2026 21:22
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.

1 participant