Repository navigation
refactor(parser-module)!: move the functional parser-module kit to experimental/ (1.0.0) - #230
Merged
Merged
Conversation
facontidavide
force-pushed
the
refactor/experimental-parser-module
branch
from
November 13, 2026 23:09
d64f091 to
45203ec
Compare
facontidavide
force-pushed
the
refactor/experimental-parser-module
branch
from
November 13, 2026 23:18
45203ec to
c100f7e
Compare
…perimental/ (1.0.0) The kit (authoring headers, export ABI and block codecs, native loader and runtime, pj_add_parser_module) has no module and no host using it, so 1.0 would freeze an ABI nobody has exercised. It moves to experimental/parser_module/: still built and tested here, never installed or packaged, and outside the compatibility promise. It stays in this repository because the native loader depends on the plugin loaders' private detail/library_loader.hpp, the export ABI is a host-to-module contract that needs one home, and ObjectWriter is coupled to the builtin codecs and splice table it is tested against. Removed from the installed SDK: - component plotjuggler_sdk::parser_module and PjParserModule.cmake - pj_base/parser_module/*.hpp, parser_module_abi.h, parser_module_manifest.hpp - pj_plugins/host/native_parser_module.hpp, parser_module_runtime.hpp - the pj_parser_module_host archive linked by plugin_host - ParserClaimCatalog::ingestModuleManifest, decodeParserModuleManifest and ParserModuleManifest (now parser_module_claims.hpp in experimental, which validates through the public admitClaims path) - PJ_MODULE_PARSE_INPUT_FLAG_HAS_TIMESTAMP from the feature-floor baseline Claim admission, plugin-claim synthesis and ParserRouteResolver are unchanged. test_sdk_install.sh now fails if any parser-module file reaches the install tree. PJ_BUILD_EXPERIMENTAL (default: follows PJ_BUILD_TESTS) gates the build. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
facontidavide
force-pushed
the
refactor/experimental-parser-module
branch
from
November 13, 2026 23:22
c100f7e to
be1d7c4
Compare
facontidavide
added a commit
that referenced
this pull request
Nov 14, 2026
… for experimental parser modules Integrates PR #173 (originally 75ca1a0 "wasm parser-module loader, hardening, and authoring target" and 8873b0d "host-driven fault policy, resource-keyed budgets, table caps, in-tree executor") on top of main after the parser-module kit moved to experimental/parser_module/ (#230). - WasmParserModule / WasmParserModuleInstance execute WASI reactors through a statically linked, pinned Wasmer 7.0.1 C API. Admission runs one static audit (validateParserModuleWasmArtifact, shared with the pj-wasm-embed-manifest tool) before compilation: exactly one manifest section, an empty import allow-list, the frozen export ABI, _initialize and no start function, exported memory and tables with bounded declared maxima (table cap 65536 elements). Singlepass is preferred when available. - Execution is store-per-instance with per-call instruction metering (an instruction budget, not a wall-clock deadline). Linear memory is reacquired and every returned range revalidated after each guest call; splices resolve against the original host payload. - The wasm wrapper has the native wrapper's fault contract: traps, metering exhaustion, malformed descriptors and bad splices are returned contract violations; strikes, quarantine, create/bind replay and disabling stay host policy through ParserModuleStrikeTracker, which is now thread-safe and disables a claim whose replay faults. - ParserModuleSessionBudgetTracker (optional, thread-safe) bounds modules, artifact size, claims, active instances and aggregate declared memory under opaque reservation ids; both loaders accept a null budget and then do no accounting. - pj_add_parser_module(... TARGETS native wasm) builds both artifacts from one source with wasi-sdk 27, embeds the manifest and audits post-link; the toy module and adversarial guests (trap, infinite loop, memory growth, table cap, quarantine replay) dogfood it. The parser_module_wasm_audit test tool is replaced by pj-wasm-embed-manifest. - CI installs Wasmer 7.0.1 and runs ctest -L wasmer. The feature lives entirely under experimental/parser_module/: targets pj_wasm_parser_module_host, pj_wasm_embed_manifest and the wasm tests are defined in its CMakeLists.txt (Wasmer gated on PJ_WASMER_ROOT, wasi-sdk on PJ_WASI_SDK_ROOT). Nothing is installed or packaged, so the SDK version, changelog, feature floors and Conan recipe are unchanged and installed packages are Wasmer-free. Documentation is in experimental/parser_module/README.md ("WebAssembly loader") and AUTHORING.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
What
Moves the functional parser-module kit out of the installed SDK and into
experimental/parser_module/. It is still built and tested in this repository, but it is no longer installed, no longer packaged, and no longer covered by the compatibility promise.Why
1.0.0 would otherwise freeze an export ABI, a manifest schema and about 5,000 lines of authoring headers that nothing uses: no parser module exists, and no host loads one. The pre-1.0 review found three things in module ABI 1 that would need an ABI 2 (no timestamp on the object output, the payload copied inline per message, no contract-violation result code). Keeping the kit outside the promise lets those be fixed without a MAJOR.
Why
experimental/here, and not another repositorypj_plugins/src/detail/library_loader.hpp, so the host half cannot leave without exporting or duplicating it.ObjectWriteris coupled to the builtin codecs and splice table and should keep being tested against them in the same commit.If the kit should leave the repository entirely, the follow-up is
git rm -r experimental/parser_module.Interaction with #173
Draft PR #173 (
feat/parser-extensibility-1b, the wasm parser-module loader) builds on this kit and touches the same files. Whichever lands second needs a rebase across the path moves. The two agree in direction: #173 already keeps its wasm executor in-tree and out of the installed package, and with this PR the wasm loader would land underexperimental/parser_module/beside the native one.Removed from the installed SDK (breaking)
plotjuggler_sdk::parser_moduleandpj_add_parser_module()(PjParserModule.cmake)pj_base/parser_module/*.hpp,pj_base/parser_module_abi.h,pj_base/parser_module_manifest.hpppj_plugins/host/native_parser_module.hpp,pj_plugins/host/parser_module_runtime.hpppj_parser_module_hostarchive thatplotjuggler_sdk::plugin_hostlinked; thePJ::parser_modulecodecs leavelibpj_base.aParserClaimCatalog::ingestModuleManifest,decodeParserModuleManifest,ParserModuleManifestPJ_MODULE_PARSE_INPUT_FLAG_HAS_TIMESTAMPfrom thefeature_floors.jsonbaselineNo consumer references any of these: I grepped PlotJuggler, pj-official-plugins, plotjuggler-ros-plugins, PJ-plugins, mosaico, plotjuggler-agent and WASM, including their worktrees.
Unchanged
ParserClaimCatalogclaim admission,synthesizeParserPluginClaimsandParserRouteResolver, which PJ4'sParserRoutingServiceuses.Notes for review
git mv. Headers keep theirpj_base/...andpj_plugins/host/...include spellings, so promoting the kit back later is a move, not a rewrite.experimental/it validates by admitting into a scratchParserClaimCatalogand reading the claims back, so the stable catalog gains no new public API.ingestParserModuleManifest()is now a free function that takes the diagnostic sink as an argument.static_assertpins moved fromabi_layout_sentinels_test.cppinto the experimental ABI test.PJ_BUILD_EXPERIMENTAL, default followsPJ_BUILD_TESTS. Conan exportsexperimental/*sowith_tests=Truestill configures; nothing from it is packaged.test_sdk_install.shnow fails if any parser-module file reaches the install tree.experimental/parser_module/AUTHORING.md.Verification
./build.sh --debug(Debug + ASAN): builds./test.sh: 108 of 108 pass, including the 8 parser-module tests from their new locationpre-commit(clang-format 22): cleantools/feature_floors/check_feature_floors.py: OK, 140 surfaces./test_sdk_install.sh(Release): passes, including the new leak checkconan create(Release,with_tests=False) plus a throwaway consumer that linksplotjuggler_sdk::plugin_hostand asserts theparser_moduletarget andpj_add_parser_moduleare absent: passesNot run locally: the
abidiffgate (libabigail is not installed here) and the WASI conformance job (no wasi-sdk here). Both run in CI; the WASI target name is unchanged.🤖 Generated with Claude Code