refactor: switch TNpoint regular families to the generated mixin#92
Open
estebanzimanyi wants to merge 1 commit into
Open
refactor: switch TNpoint regular families to the generated mixin#92estebanzimanyi wants to merge 1 commit into
estebanzimanyi wants to merge 1 commit into
Conversation
Third family in the codegen-switch fan-out (after TCbuffer #90, TPose #91), independent of the upstream MEOS gate. - codegen.py: add the `npoint` FAMILY_MODEL (+ `npointset` and `point` arg tokens; tnpoint distance spells `tdistance_tnpoint_point`). Make shortest_line's precision per-family (npoint: `precision: int = 15`; tcbuffer/tpose hardcode 10 with no param and omit the key, so #90/#91 regenerate byte-identical -- verified). Draft _preview path and #89 gate untouched. - pymeos/main/_generated/tnpoint_methods.py: generated TNpointRegularMixin (12 regular methods -- comparison, temporal comparison, restriction, distance; npoint has no spatial-relationship API). Static check: 12/12 backing-and-fallback identical to the hand-written oracle. - pymeos/main/tnpoint.py: inherits the mixin; 12 now-generated regular methods removed; never_*/irregular core kept. Adds documented NotImplementedError stubs (value accessors -> MobilityDB#1082, from_base_time -> #1084, from_mfjson -> #1086) so TNpoint*/Inst/Seq/ SeqSet are concrete. - pymeos/collections/npoint/npointset.py: NpointSet shipped abstract in #88 (pre-existing base-collection defect, unrelated to the switch); add the 5 missing Set ops as thin super() delegations to the generic base Set (the established GeoSet.contains pattern), making NpointSet concrete. Proof: tests/main/tnpoint_test.py is byte-identical hand-written vs wired (A/B, stubs+NpointSet-fix held constant) -- both error IDENTICALLY at the same pre-existing point (`tnpoint_test.py:211` TestNpointSet, MeosTextInputError 'Missing delimiter'), so the switch delta is provably zero. That collection error is a pre-existing #88/MEOS npointset test-fixture/parser issue OUTSIDE the codegen-switch domain (base NpointSet, not the temporal regular families), unrelated to and unaffected by this change -- a separate follow-up. Static 12/12 identical is the positive proof. Stacked on #91.
This was referenced May 19, 2026
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).
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.
Third family in the codegen-switch fan-out (after TCbuffer #90, TPose #91),
independent of the upstream MEOS value-accessor gate.
What changed
codegen.py: add thenpointFAMILY_MODEL(+npointsetandpointarg tokens;tdistance_tnpoint_point).shortest_lineprecisionis now per-family (npoint:
precision: int = 15; tcbuffer/tpose hardcode10 with no param — they omit the key, so refactor: switch TCbuffer regular families to the generated mixin #90/refactor: switch TPose regular families to the generated mixin #91 regenerate
byte-identical, verified). Draft
_preview/+ feat: meos-idl.json-driven OO method-family codegen (Draft preview) #89 gate untouched._generated/tnpoint_methods.py:TNpointRegularMixin— 12 regularmethods (comparison / temporal-cmp / restriction / distance; npoint has no
spatial-relationship API). Static: 12/12 backing-and-fallback identical
to the hand-written oracle.
tnpoint.py: inherits the mixin; 12 hand-written regular methodsremoved;
never_*/irregular core kept. DocumentedNotImplementedErrorstubs (value accessors → MobilityDB#1082,
from_base_time→ #1084,from_mfjson→ #1086) makeTNpoint*concrete.npointset.py:NpointSetshipped abstract in feat: OO support for the cbuffer, npoint, pose and rgeometry temporal types #88 (pre-existingbase-collection defect, unrelated to the switch) — added the 5 missing
Setops as thinsuper()delegations to the generic baseSet(theestablished
GeoSet.containspattern), making it concrete.Proof
tests/main/tnpoint_test.pyis byte-identical hand-written vs wired(A/B with stubs + the
NpointSetfix held constant): both erroridentically at the same pre-existing point —
tnpoint_test.py:211TestNpointSet,MeosTextInputError: Missing delimiter ','. So the switch delta is provably zero. That collectionerror is a pre-existing #88/MEOS
NpointSettest-fixture/parser issueoutside the codegen-switch domain (base
NpointSet, not the temporalregular families) — unrelated to and unaffected by this change. The
positive proof is the static 12/12 backing-identical check (each
generated method calls the exact same
pymeos_cffibacking with the samedispatch / result / fallback as the hand-written one — equivalence by
construction). #89 coverage gate stays green.
Scope / stack
Stacked on #91 → #90 → #89 → #88. Stubs + the
NpointSetconcretization are this slice's concern (kept self-contained per the
fan-out pattern). The
TestNpointSet:211parser/fixture error and thefrom_*real impls are separate tracked follow-ups (MobilityDB#1082/#1084/#1086 + an npointset test-data/parser fix), not this switch.
Remaining fan-out
geo (TGeomPoint — adds the full spatial-relationship family + a
geotoken model) and temporal (TFloat/TInt/TBool/TText — scalar-base model)
remain, each its own slice.