docs: RFC — canonical dispatch metadata for 100% faithful OO codegen#94
Open
estebanzimanyi wants to merge 1 commit into
Open
docs: RFC — canonical dispatch metadata for 100% faithful OO codegen#94estebanzimanyi wants to merge 1 commit into
estebanzimanyi wants to merge 1 commit into
Conversation
d167115 to
8d57587
Compare
estebanzimanyi
added a commit
that referenced
this pull request
May 19, 2026
Implements the PyMEOS-side follow-up of RFC #94 §5: a consumer that emits faithful geo/temporal mixins from the canonical oo.<family>.<member>.dispatch blocks the parallel MEOS-API session is adding to meta/meos-meta.json (merged into meos-idl.json). Additive only -- the 4 shipped families' FAMILY_MODEL path (emit_faithful_mixin) is untouched; #90/#91/#92/#93 mixins regenerate byte-identical (regression-guarded) and #89 coverage gate stays green. Proven correct WITHOUT waiting on the not-yet-published metadata: _serialize_family_dispatch() expresses each of the 4 A/B-proven families (cbuffer/pose/npoint/rgeo) in the RFC #94 §3 schema; feeding those back through emit_from_oo_dispatch() reproduces their committed mixins BYTE-IDENTICALLY for all 4 (the new --verify-oo-roundtrip gate + OoDispatchConsumer test, permanently enforced). geo/temporal then plug into this same proven consumer the instant MEOS-API emits their oo.dispatch (via --mixin-from-dispatch), closing codegen 6/6 -- no PyMEOS-local transcription, equivalence by construction at the catalog level. This is the non-wasted parallel prep: when the keystone enrichment lands, PyMEOS converges immediately. Stacked on #94 (the RFC).
estebanzimanyi
added a commit
that referenced
this pull request
May 19, 2026
Implements the PyMEOS-side follow-up of RFC #94 §5: a consumer that emits faithful geo/temporal mixins from the canonical oo.<family>.<member>.dispatch blocks the parallel MEOS-API session is adding to meta/meos-meta.json (merged into meos-idl.json). Additive only -- the 4 shipped families' FAMILY_MODEL path (emit_faithful_mixin) is untouched; #90/#91/#92/#93 mixins regenerate byte-identical (regression-guarded) and #89 coverage gate stays green. Proven correct WITHOUT waiting on the not-yet-published metadata: _serialize_family_dispatch() expresses each of the 4 A/B-proven families (cbuffer/pose/npoint/rgeo) in the RFC #94 §3 schema; feeding those back through emit_from_oo_dispatch() reproduces their committed mixins BYTE-IDENTICALLY for all 4 (the new --verify-oo-roundtrip gate + OoDispatchConsumer test, permanently enforced). geo/temporal then plug into this same proven consumer the instant MEOS-API emits their oo.dispatch (via --mixin-from-dispatch), closing codegen 6/6 -- no PyMEOS-local transcription, equivalence by construction at the catalog level. This is the non-wasted parallel prep: when the keystone enrichment lands, PyMEOS converges immediately. Stacked on #94 (the RFC).
geo (TGeomPoint/TGeogPoint) and temporal (TFloat/TInt/TBool/TText) are the 2 of 6 families not switched to generated mixins. Verified root cause: their regular-method dispatch encodes editorial decisions absent from meos-idl.json (geo: STBox-via-stbox_to_geo, Point/Geometry split, runtime geodetic flag, GeoSet->generic; temporal: Int->Float coercion via super(), scalar-by-value casts, generic *_temporal_temporal self). A PyMEOS-local FAMILY_MODEL extension was rejected as the transcription anti-pattern (relocates editorial logic into per-binding config; no equivalence by construction; diverges across bindings). This RFC proposes the sound, ecosystem-correct solution: an oo.<family>.<member>.dispatch annotation in MEOS-API's meta/meos-meta.json (merged into meos-idl.json like the existing shape annotations GoMEOS already consumes), so every binding's faithful generator derives geo/temporal from the SAME canonical catalog facts -- equivalence by construction restored at the catalog level, A/B suite as the unchanged acceptance gate, ecosystem-wide 100%. The §3 dispatch tables are extracted verbatim from PyMEOS's hand-written oracle and are complete for geo/temporal. Cross-repo handoff: MEOS-API (parallel-owned) lands the metadata; PyMEOS then consumes it and generates the final 2 families. Until then geo/temporal correctly stay hand-written (fully functional -- no API-parity gap; only the codegen-uniformity goal is outstanding). Stacked on #93.
8d57587 to
b0fe78e
Compare
estebanzimanyi
added a commit
that referenced
this pull request
May 19, 2026
Implements the PyMEOS side of RFC #94 §5/§7: a consumer that emits faithful geo/temporal mixins from the canonical objectModel.dispatch metadata (MEOS-API #10 feat/object-model, merged into meos-idl.json), closing the OO codegen to all 6 temporal type families with equivalence by construction at the catalog level. Additive only — the 4 derivable families' FAMILY_MODEL path (emit_faithful_mixin) is untouched; #90/#91/#92/#93 mixins regenerate byte-identical (--verify-oo-roundtrip + OoDispatchConsumer .test_roundtrip_byte_identical, permanently enforced) and the #89 coverage gate stays green. geo + the 4 temporal concretes (TFloat/TInt/TBool/TText) are not derivable from the signature catalog (RFC #94 §1), so they are driven by the verbatim objectModel.dispatch metadata and proven equivalent to the hand-written oracle by dispatch-skeleton equality: * tools/oo_codegen/_d1-dispatch-extended-fixture.json — the verbatim §7 dispatch metadata (== MEOS-API #10 objectModel.dispatch). * tools/oo_codegen/_oracle_extended_methods.py — the byte-for-byte hand-written editorial methods (AST-extracted) the proof checks against; never executed, never imported. * --verify-oo-dispatch-extended + OoDispatchConsumer .test_extended_dispatch_matches_oracle: each of the 32 editorial methods (geo at/minus/distance/nearest_approach_distance + each concrete's always/ever/temporal eq·ne, at, minus) reduces to an identical ordered dispatch skeleton — isinstance type-set, backing symbol, arg transform, super-coerce, fallback, result wrap. 0 divergence: same native calls, same transforms, never reimplemented. The closed argTransform vocabulary maps to PyMEOS idioms (scalarValue, scalarCast-per-base, geoToGserialized with geodeticFromSelf, stboxToGeo, innerPtr, textsetMake, list[str], coerce + via:super). Stacked on #94 (the RFC, including the verbatim §7 SoT).
estebanzimanyi
added a commit
that referenced
this pull request
May 19, 2026
Implements the PyMEOS side of RFC #94 §5/§7: a consumer that emits faithful geo/temporal mixins from the canonical objectModel.dispatch metadata (MEOS-API #10 feat/object-model, merged into meos-idl.json), closing the OO codegen to all 6 temporal type families with equivalence by construction at the catalog level. Additive only — the 4 derivable families' FAMILY_MODEL path (emit_faithful_mixin) is untouched; #90/#91/#92/#93 mixins regenerate byte-identical (--verify-oo-roundtrip + OoDispatchConsumer .test_roundtrip_byte_identical, permanently enforced) and the #89 coverage gate stays green. geo + the 4 temporal concretes (TFloat/TInt/TBool/TText) are not derivable from the signature catalog (RFC #94 §1), so they are driven by the verbatim objectModel.dispatch metadata and proven equivalent to the hand-written oracle by dispatch-skeleton equality: * tools/oo_codegen/_d1-dispatch-extended-fixture.json — the verbatim §7 dispatch metadata (== MEOS-API #10 objectModel.dispatch). * tools/oo_codegen/_oracle_extended_methods.py — the byte-for-byte hand-written editorial methods (AST-extracted) the proof checks against; never executed, never imported. * --verify-oo-dispatch-extended + OoDispatchConsumer .test_extended_dispatch_matches_oracle: each of the 32 editorial methods (geo at/minus/distance/nearest_approach_distance + each concrete's always/ever/temporal eq·ne, at, minus) reduces to an identical ordered dispatch skeleton — isinstance type-set, backing symbol, arg transform, super-coerce, fallback, result wrap. 0 divergence: same native calls, same transforms, never reimplemented. The closed argTransform vocabulary maps to PyMEOS idioms (scalarValue, scalarCast-per-base, geoToGserialized with geodeticFromSelf, stboxToGeo, innerPtr, textsetMake, list[str], coerce + via:super). Stacked on #94 (the RFC, including the verbatim §7 SoT).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sound, ecosystem-correct path to 100% of the codegen switch (the final 2 of 6 families: geo, temporal), plus the precise cross-repo handoff to MEOS-API.
Why this RFC
The faithful generator switched 4/6 families (TCbuffer #90, TPose #91, TNpoint #92, TRgeometry #93) — those whose dispatch is mechanically derivable from the
<member>_<type>_<arg>catalog structure. geo and temporal cannot be: their hand-written methods encode editorial dispatch absent frommeos-idl.json(geo:STBox→stbox_to_geo,Point/Geometrysplit→different backings, runtime geodetic flag,GeoSet→generic; temporal:Int→Floatcoercion viasuper(), scalar-by-value casts, generic*_temporal_temporalself).A PyMEOS-local
FAMILY_MODELhack was rejected — it would relocate editorial logic into per-binding config (no equivalence by construction, diverges across bindings, more config than the code it replaces). That is the transcription anti-pattern.The proposal
Add an
oo.<family>.<member>.dispatchannotation to MEOS-API'smeta/meos-meta.json(merged intomeos-idl.jsonexactly like theshapeannotations GoMEOS already consumes) describing the ordered argument→backing table declaratively, with a closedargTransformvocabulary each binding maps to its own idiom. Then every binding's existing faithful generator derives geo/temporal from the same canonical catalog facts — equivalence by construction restored at the catalog level; the A/B suite test stays the acceptance gate; ecosystem-wide 100%, not PyMEOS-local.The RFC's §3 dispatch tables are extracted verbatim from PyMEOS's hand-written oracle and are complete for geo/temporal.
Ownership
argTransformvocabulary + emit intomeos-idl.json. This PR's doc is the handoff brief.codegen.pyconsumesoo.*.dispatch→ generates + A/B-proves the final 2 families → codegen 6/6.Parity note
This is a codegen-uniformity goal, not an API-parity gap: geo/temporal are fully functional hand-written today. The genuine API-parity gap (the
NotImplementedErrorstubs) is tracked separately and gated on MobilityDB #1081–#1085 reaching master. Stacked on #93.