Repository navigation
Call each writer with its out-parameters and derive the validated OpenAPI catalog through provision-meos.sh - #226
Merged
estebanzimanyi merged 2 commits intoOct 31, 2026
Conversation
CtypesEngine.encode calls a writer with its own signature: every out-parameter the catalog lists in the writer's shape.outParams gets a slot of its own at its position, the trailing inputs fill the other positions in order, and a writer handing back its size in a size_t * is read for that many bytes, less the terminating NUL MEOS counts in the size of a string. The server reads each writer's out-parameters from the catalog (writer_outparams) and states them in the route as encode_outparams, beside encode_aux, for a result, an out-parameter result and the elements of an array result. set_as_hexwkb, span_as_hexwkb, spanset_as_hexwkb and raster_as_hexwkb, the writers of 459 results on the wire over the catalog of MobilityDB master 1ff2270f7f, are called with their size_t *size_out; no reader on the wire has an out-parameter. Witness: tests/test_engine_integration.py, an intset, an intspan and a tint written by set_as_hexwkb, span_as_hexwkb and temporal_as_hexwkb through CtypesEngine.encode and read back to their value, and tests/test_server.py, the route of a result whose writer states size_out and the call the engine receives; both fail on master's server. Why: the encode a route names for a Set, a Span, a SpanSet or a Raster called the hex writer with its value and its variant and no size_out, leaving MEOS to write the size through whatever the third argument register held. Measured: the 632 tests pass, master's 630 and the 2 above, with libmeos built from MobilityDB master 1ff2270f7f.
estebanzimanyi
force-pushed
the
fix/engine-writer-outparams
branch
from
October 31, 2026 18:58
bb69c9d to
229d253
Compare
openapi-validate.yml regenerates the catalog with tools/provision-meos.sh over the MobilityDB checkout, which runs run.py with MDB_SRC_ROOT naming it, so the @InGroup groups that make a function public are attached and the exposable functions are projected. The workflow refuses a document with no path, and a change to provision-meos.sh runs it. Why: IO-B1 of IO-PLAN.md in MobilityDB #2861. run.py reads the groups from MDB_SRC_ROOT, else from ./_mobilitydb; the workflow set neither, so every function read internal and run 41207016338 published a valid document of 0 paths ("Done: 6073 functions (0 stateless-exposable)", "0 paths, 0 schemas"). Measured: over MobilityDB master 1ff2270f7f, run.py over the source headers without MDB_SRC_ROOT states all 6077 functions internal, 0 exposable, and generate_openapi.py projects 0 paths; through provision-meos.sh the catalog states 3614 exposable functions and the document, valid OpenAPI 3.1, 3614 paths and 35 schemas. The check refuses the document of 0 paths.
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.
Call a writer with the out-parameters its catalog entry states
CtypesEngine.encode calls a writer with its own signature: every out-parameter the
catalog lists in the writer's shape.outParams gets a slot of its own at its position,
the trailing inputs fill the other positions in order, and a writer handing back its
size in a size_t * is read for that many bytes, less the terminating NUL MEOS counts in
the size of a string. The server reads each writer's out-parameters from the catalog
(writer_outparams) and states them in the route as encode_outparams, beside
encode_aux, for a result, an out-parameter result and the elements of an array result.
set_as_hexwkb, span_as_hexwkb, spanset_as_hexwkb and raster_as_hexwkb, the writers of
459 results on the wire over the catalog of MobilityDB master 1ff2270f7f, are called
with their size_t *size_out; no reader on the wire has an out-parameter.
Witness: tests/test_engine_integration.py, an intset, an intspan and a tint written by
set_as_hexwkb, span_as_hexwkb and temporal_as_hexwkb through CtypesEngine.encode and
read back to their value, and tests/test_server.py, the route of a result whose writer
states size_out and the call the engine receives; both fail on master's server.
Why: the encode a route names for a Set, a Span, a SpanSet or a Raster called the hex
writer with its value and its variant and no size_out, leaving MEOS to write the size
through whatever the third argument register held.
Measured: the 632 tests pass, master's 630 and the 2 above, with libmeos built from
MobilityDB master 1ff2270f7f.
Derive the validated OpenAPI catalog through provision-meos.sh
openapi-validate.yml regenerates the catalog with tools/provision-meos.sh over the
MobilityDB checkout, which runs run.py with MDB_SRC_ROOT naming it, so the @InGroup groups
that make a function public are attached and the exposable functions are projected. The
workflow refuses a document with no path, and a change to provision-meos.sh runs it.
Why: IO-B1 of IO-PLAN.md in MobilityDB #2861. run.py reads the groups from MDB_SRC_ROOT,
else from ./_mobilitydb; the workflow set neither, so every function read internal and
run 41207016338 published a valid document of 0 paths ("Done: 6073 functions (0
stateless-exposable)", "0 paths, 0 schemas").
Measured: over MobilityDB master 1ff2270f7f, run.py over the source headers without
MDB_SRC_ROOT states all 6077 functions internal, 0 exposable, and generate_openapi.py
projects 0 paths; through provision-meos.sh the catalog states 3614 exposable functions
and the document, valid OpenAPI 3.1, 3614 paths and 35 schemas. The check refuses the
document of 0 paths.