Skip to content

Make the streaming-relevance baseline reproducible in-repo#39

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:tooling/reproducible-baseline
Jul 10, 2026
Merged

Make the streaming-relevance baseline reproducible in-repo#39
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:tooling/reproducible-baseline

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

What

The generator tools/codegen_facades.py projects the bundled JMEOS FFI surface against tools/baseline/streaming-relevance-baseline.json (it emits a facade only for the streaming-relevant tiers). That baseline was the one non-reproducible input left in the generation chain: a frozen snapshot produced by a classifier that lived outside the repo, recording a dangling absolute source_catalog path — so nobody (and no CI) could regenerate it.

This PR closes that gap, bringing Flink in line with the peer bindings (Spark regenerates its UDFs from the tracked commit via an in-repo generator).

Changes

  • tools/classify_streaming_relevance.py — vendored deterministic classifier. A function's tier is decided purely by its name, its object-model role, and its temporal-parameter count (zero per-function judgement), so the same MEOS catalog always yields the same baseline.
  • tools/regen_baseline.sh — thin wrapper to regenerate the baseline from a catalog.
  • GENERATION.md — documents the full input chain:
    MobilityDB @ tools/meos-source-commit.txt
      → MEOS-API/run.py                    → meos-idl.json
      → classify_streaming_relevance.py    → streaming-relevance-baseline.json
      → codegen_facades.py                 → org.mobilitydb.meos.MeosOps* facades
    
  • tools/baseline/streaming-relevance-baseline.json — regenerated through the vendored classifier so its provenance is portable.

Non-breaking — proven

The function classification is byte-identical to the previous baseline (3548 functions, 0 tier changes, identical order); only the metadata (source_catalog, generated_at) differs, and codegen_facades.py reads only functions[]. Regenerating the 57 facade classes from the old vs new baseline produces byte-identical output (diff -rq empty). The classifier is verified deterministic (two runs byte-identical).

The generator codegen_facades.py projects the JMEOS FFI surface against
tools/baseline/streaming-relevance-baseline.json, but that baseline was a
frozen snapshot produced by an out-of-repo classifier and recorded a
dangling absolute source_catalog path, so it could not be regenerated
here — the last non-reproducible input in the generation chain.

Vendor the deterministic classifier as tools/classify_streaming_relevance.py
(the tier of a function is decided purely by its name, object-model role,
and temporal-parameter count) plus a tools/regen_baseline.sh wrapper, and
document the full input chain in GENERATION.md:

  MobilityDB @ tools/meos-source-commit.txt
    -> MEOS-API/run.py            -> meos-idl.json
    -> classify_streaming_relevance.py -> streaming-relevance-baseline.json
    -> codegen_facades.py         -> org.mobilitydb.meos.MeosOps* facades

Regenerate the committed baseline through the vendored classifier so its
provenance is portable. The function classification is byte-identical to
the previous baseline, so the 57 generated facade classes are unchanged;
only the metadata (source_catalog, generated_at) differs.
@estebanzimanyi
estebanzimanyi merged commit 5bcf2c8 into MobilityDB:main Jul 10, 2026
1 check passed
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