diff --git a/GENERATION.md b/GENERATION.md index 2c9131c..2beb3d7 100644 --- a/GENERATION.md +++ b/GENERATION.md @@ -25,6 +25,35 @@ emits the `org.mobilitydb.meos.MeosOps*` 1:1 forwarder facades the Flink process The facades are a *consumer* projection (they live here, not in JMEOS, so the JMEOS FFI line and the facade line do not diverge). +## The streaming-relevance baseline (generator input) + +`tools/codegen_facades.py` emits a facade only for functions in the +**streaming-relevant** tiers, read from `tools/baseline/streaming-relevance-baseline.json`. +That baseline is itself **generated and reproducible** — it is not a hand-maintained +list. It is produced by **`tools/classify_streaming_relevance.py`**, a deterministic +classifier: the tier of a function is decided purely by its name, its object-model role, +and its number of temporal parameters (zero per-function judgement), so the same MEOS +catalog always yields the same baseline. + +The full input chain, from the tracked MobilityDB commit: + +``` +MobilityDB @ tools/meos-source-commit.txt + → MEOS-API/run.py over the MEOS headers → meos-idl.json (the catalog) + → tools/classify_streaming_relevance.py → tools/baseline/streaming-relevance-baseline.json + → tools/codegen_facades.py (jar-surface ∩ baseline) → org.mobilitydb.meos.MeosOps* facades +``` + +To refresh the baseline (e.g. after bumping `tools/meos-source-commit.txt`): rebuild the +catalog at the tracked commit with MEOS-API, then + +``` +tools/regen_baseline.sh +``` + +and commit the diff. Because the classifier is deterministic, an unchanged catalog +regenerates the baseline byte-for-byte. + ## Generate-then-retire — the green-CI version is the probe Hand-written facades/glue are replaced by the generated forwarders **family by family, diff --git a/tools/baseline/streaming-relevance-baseline.json b/tools/baseline/streaming-relevance-baseline.json index 4055e12..fd5342d 100644 --- a/tools/baseline/streaming-relevance-baseline.json +++ b/tools/baseline/streaming-relevance-baseline.json @@ -1,7 +1,6 @@ { "schema_version": "0.1.0-draft", - "generated_at": "2026-05-21T07:46:14.181946Z", - "source_catalog": "/home/esteban/src/_streaming_relevance/meos-api/output/meos-idl.json", + "source_catalog": "meos-idl.json (MobilityDB master, MEOS-API run.py)", "source_catalog_function_count": 3548, "classifier": "v4", "vocabulary": [ @@ -41647,4 +41646,4 @@ "n_params": 3 } ] -} \ No newline at end of file +} diff --git a/tools/classify_streaming_relevance.py b/tools/classify_streaming_relevance.py new file mode 100755 index 0000000..3690fff --- /dev/null +++ b/tools/classify_streaming_relevance.py @@ -0,0 +1,321 @@ +#!/usr/bin/env python3 +"""Classify the MEOS public API into streaming tiers — the reproducible +producer of ``tools/baseline/streaming-relevance-baseline.json``. + +The baseline is the generator input consumed by ``codegen_facades.py`` +(which emits a facade only for the streaming-relevant tiers). This script +is deterministic: the tier of a function is decided purely by its name, +its object-model role, and the number of temporal parameters — there is +zero per-function judgement, so the same MEOS catalog always yields the +same baseline. + +Usage: + classify_streaming_relevance.py [-o ] + [--source-ref