fix(pj_plugins): propagate provenance errors from family enumeration - #176
Merged
Merged
Conversation
A dladdr or path-identity failure during exported-family enumeration now returns its own error instead of folding into an empty family set, so admission surfaces the real cause rather than a misleading "found 0 families" rejection. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0165qLfnJYSYb51NQMdPidZr
…ency fixture RTLD_FIRST hides dependency symbols from dlsym on macOS, so the getter is cleanly absent there; the provenance error is the Linux shape. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0165qLfnJYSYb51NQMdPidZr
facontidavide
added a commit
that referenced
this pull request
Aug 30, 2026
…get (0.24.0) SDK PR 1b of the parser-extensibility v4 architecture (spec: pj-official-plugins PR #272), following the core PR (#172, 0.22.0): a second loader for the already-frozen module ABI — wasmer execution, hardening, and the wasm authoring target. Ships as its own 0.24.0 release (0.23.0 was taken by the symbol-provenance fix, #175), so an SDK with the wasm loader is distinguishable from one without it. Rebased onto main after #174–#176: the budget-aware NativeParserModule::load keeps #175's defining-object symbol provenance, and the docs no longer describe wasm as unavailable. - wasmer 7.0.1 statically linked (pinned; required only by the plugin_host component — plugin_sdk consumers stay wasmer-free). Exit-criterion prototype findings encoded in the loader contract: the pinned static lib exports no wasm_module_share/obtain symbols (engine-owned module reuse: one compilation, store-per-bound-instance with isolated state) and no creator-thread affinity exists — calls are sequential-only, host-serialized. Pin re-evaluated against 7.2.1: no C-API gains, WASI-syscall CVEs unreachable under the empty import allow-list, and 7.2 drops x86_64-darwin (rationale in ARCHITECTURE.md) - wasm loader: validation before any instantiation — manifest custom section via the shared codec (exactly one), reactor model enforced (_initialize required, start section/_start rejected), operational export set verified by name AND signature through the shared pj_base wasm inspector, and a frozen EMPTY import allow-list (a parser module may import nothing) - execution runtime: metered store-per-instance calls (the pinned lib exports the wasmer_metering_* C API but no interrupt/epoch/deadline surface, so limits are enforceable instruction metering — fresh point allowance per guest call, exhaustion = distinct contract violation), linear-memory base re-acquired at every point of use with overflow-safe bounds, splices resolved against the original host payload, shared fault taxonomy + strike tracker with quarantine replay - memory caps at validation: artifacts must declare a linear-memory maximum (default cap 256 MiB); the engine enforces it at runtime. Aggregate session budgets (modules, artifact size, claims, active instances, declared memory) gate admission with DECLINE and mutate nothing on rejection - adversarial fixtures: unreachable trap, metered infinite loop, memory-growth bomb, admission limits, quarantine replay — plus the M1 rejection matrix - pj-wasm-embed-manifest installed CLI (embed/verify) wrapping the shared section codec; pj_add_parser_module(... TARGETS native wasm) builds both artifacts from one source with post-link audit, dogfooded on the toy module - fix: release the metering middleware on the adapter-failure path - VERSION 0.24.0, CHANGELOG entry, CI wasmer job (metering-symbol check) Tests: 80/80 Debug+ASAN with both toolchain roots; graceful skip verified for each root independently. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017U391nLF7Motf4FehVRiXz
facontidavide
added a commit
that referenced
this pull request
Aug 30, 2026
…get (0.24.0) SDK PR 1b of the parser-extensibility v4 architecture (spec: pj-official-plugins PR #272), following the core PR (#172, 0.22.0): a second loader for the already-frozen module ABI — wasmer execution, hardening, and the wasm authoring target. Ships as its own 0.24.0 release (0.23.0 was taken by the symbol-provenance fix, #175), so an SDK with the wasm loader is distinguishable from one without it. Rebased onto main after #174–#176: the budget-aware NativeParserModule::load keeps #175's defining-object symbol provenance, and the docs no longer describe wasm as unavailable. - wasmer 7.0.1 statically linked (pinned; required only by the plugin_host component — plugin_sdk consumers stay wasmer-free). Exit-criterion prototype findings encoded in the loader contract: the pinned static lib exports no wasm_module_share/obtain symbols (engine-owned module reuse: one compilation, store-per-bound-instance with isolated state) and no creator-thread affinity exists — calls are sequential-only, host-serialized. Pin re-evaluated against 7.2.1: no C-API gains, WASI-syscall CVEs unreachable under the empty import allow-list, and 7.2 drops x86_64-darwin (rationale in ARCHITECTURE.md) - wasm loader: validation before any instantiation — manifest custom section via the shared codec (exactly one), reactor model enforced (_initialize required, start section/_start rejected), operational export set verified by name AND signature through the shared pj_base wasm inspector, and a frozen EMPTY import allow-list (a parser module may import nothing) - execution runtime: metered store-per-instance calls (the pinned lib exports the wasmer_metering_* C API but no interrupt/epoch/deadline surface, so limits are enforceable instruction metering — fresh point allowance per guest call, exhaustion = distinct contract violation), linear-memory base re-acquired at every point of use with overflow-safe bounds, splices resolved against the original host payload, shared fault taxonomy + strike tracker with quarantine replay - memory caps at validation: artifacts must declare a linear-memory maximum (default cap 256 MiB); the engine enforces it at runtime. Aggregate session budgets (modules, artifact size, claims, active instances, declared memory) gate admission with DECLINE and mutate nothing on rejection - adversarial fixtures: unreachable trap, metered infinite loop, memory-growth bomb, admission limits, quarantine replay — plus the M1 rejection matrix - pj-wasm-embed-manifest installed CLI (embed/verify) wrapping the shared section codec; pj_add_parser_module(... TARGETS native wasm) builds both artifacts from one source with post-link audit, dogfooded on the toy module - fix: release the metering middleware on the adapter-failure path - VERSION 0.24.0, CHANGELOG entry, CI wasmer job (metering-symbol check) Tests: 80/80 Debug+ASAN with both toolchain roots; graceful skip verified for each root independently. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017U391nLF7Motf4FehVRiXz
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.
Follow-up to #175: exported-family enumeration returns provenance/path-identity errors as errors instead of an empty family set, so downstream admission reports the real cause instead of a misleading "found 0 families" multi-family rejection. Consumed by PJ4's PR 12b helper.
🤖 Generated with Claude Code
https://claude.ai/code/session_0165qLfnJYSYb51NQMdPidZr