feat(parser): extensible parser routing + functional parser modules (0.22.0) - #172
Merged
Merged
Conversation
facontidavide
force-pushed
the
feat/parser-extensibility-1a
branch
from
August 9, 2026 09:18
ad01f03 to
babd073
Compare
facontidavide
marked this pull request as draft
August 9, 2026 10:05
facontidavide
force-pushed
the
feat/parser-extensibility-1a
branch
from
August 9, 2026 11:03
babd073 to
4e42f8b
Compare
facontidavide
marked this pull request as ready for review
August 9, 2026 11:03
facontidavide
force-pushed
the
feat/parser-extensibility-1a
branch
2 times, most recently
from
August 9, 2026 14:41
08503f7 to
3501581
Compare
…0.22.0) SDK core of the parser-extensibility v4 architecture (spec: pj-official-plugins PR #272) — the complete wasmer-free surface, with the dual-target module ABI frozen here: - pj.parser_route_claims.v1 extension: exact handler-table route claims (scalar/object, exact-only match), auto-implemented by MessageParserPluginBase from its handler table; delivery via get_plugin_extension, zero layout changes - pj.parser_functional.v2: object sink gains accept_object_spliced (one splice per object, input-space offsets, frozen per-type eligibility table in builtin_object_abi.h); frozen error-kind constants; v1 byte-identical - parser_module_abi.h: frozen pj_module_* export ABI (u64 module-space tokens, token-0 creation-error channel, 512-byte error buffer) + bounds-checked little-endian codecs for BindingInfo / parse-input / output-descriptor blocks - host claim catalog + route resolver: §4 admission matrix (priority bounds, wildcard/object rules, encoding registry, duplicate identity, provenance never from manifests), module-manifest ingestion, synthesized plugin claim ids (wildcard:<encoding>, handler:<encoding>:<type>), §5 selection (pin fail-closed → exact > wildcard → provenance tier → priority → identity tie-break) with split per-route probe caches and selection traces - native module loader (dlopen RTLD_LOCAL|RTLD_NOW, per-handle export resolution, session never-unload) + module runtime over the codecs with splice eligibility/bounds validation and the fault-vs-data-error strike tracker (3 strikes → quarantine → recreate; repeat → session disable) - authoring kit pj_base/include/pj_base/parser_module/: header-only, C++17, wasi-clean (own Status/Expected/arena; -fno-exceptions capable); CdrReader + CdrFieldLocator (XCDR1 traversal plans, depth caps, bounds), ProtoReader + ProtoFieldLocator, checked time normalization, canonical-wire ObjectWriter (PointCloud/Image + splice path), pj::FunctionalParser + PJ_FUNCTIONAL_PARSER macro, pj_add_parser_module() native target - wasm manifest custom-section codec (shared embed/read; 1b's tooling wraps it) + static wasm ABI conformance: wasi-sdk 27 reactor build of the same toy module, binary-format audit of export names/signatures, reactor model, and single manifest section — no wasmer, gated on PJ_WASI_SDK_ROOT, wired into linux CI Docs and the in-repo authoring skill are synchronized to this surface: a new parser-module authoring reference, the parser-module choice rule and route-claim semantics in the MessageParser guidance, and corrections to stale claims (wrong plugin-base include path, two-builder ObjectWriter, builtin-type inventory). Editing VERSION now re-runs configure, so a stale build tree can no longer stamp a previous version into the generated version header. Rebased onto main: the schema-aware functional-route gate from #174 now governs the v2 advertisement as well as v1, so a mixed-model parser bound to a schema it only implements through legacy parse() withdraws both revisions (a host prefers v2, so leaving v2 advertised would route every message on those topics into a parser that can only reject them). Tests: 75/75 Debug+ASAN (74 with the wasm gate skipped), incl. layout sentinels, golden byte fixtures, adversarial loader/runtime fixtures, and a kit-authored module E2E (load → admit → bind → full + spliced PointCloud). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
facontidavide
force-pushed
the
feat/parser-extensibility-1a
branch
from
August 9, 2026 14:49
3501581 to
817130e
Compare
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.
SDK PR 1a of the parser-extensibility v4 architecture (spec, PlotJuggler/pj-official-plugins#272): the complete wasmer-free core, with the dual-target module ABI frozen here. PR 1b (wasmer loader + hardening) stacks on this branch; the two PRs merge back-to-back and release together as 0.22.0 (single version increment across the stack).
Surface
pj.parser_route_claims.v1— exact handler-table claims (scalar/object), auto-implemented byMessageParserPluginBase; delivered viaget_plugin_extension, zero vtable/layout changes (sentinels green)pj.parser_functional.v2— spliced object sink (one splice/object, input-space offsets, frozen per-type eligibility table); frozenpj.parser.*error-kind constants; v1 byte-identicalparser_module_abi.h— frozenpj_module_*export set (u64 module-space tokens, token-0 creation-error channel) + bounds-checked LE codecs for BindingInfo / parse-input / output-descriptordlopen(RTLD_LOCAL|RTLD_NOW), per-handle export resolution, session never-unload; runtime with splice eligibility/bounds validation and the fault-vs-data strike tracker (3 → quarantine → recreate; repeat → disable)pj_base/include/pj_base/parser_module/— header-only, C++17, wasi-clean,-fno-exceptionscapable;CdrReader/CdrFieldLocator(XCDR1 traversal plans),ProtoReader/ProtoFieldLocator, checked time normalization, canonical-wireObjectWriter(+ splice path),PJ_FUNCTIONAL_PARSER,pj_add_parser_module()_initialize, no start section, exactly one manifest section) — no wasmer; gated onPJ_WASI_SDK_ROOT, wired into Linux CIVerification
pj_add_parser_module, loaded blind, admitted, bound viaCdrFieldLocatoragainst a.msgschema, parsed to a host-decodable PointCloud — full-wire and zero-copy-splice variants, plus a schema-revision DECLINEfind_package(... COMPONENTS parser_module))🤖 Generated with Claude Code