Skip to content

refactor!: centralize dynamic plugin validation and host APIs - #943

Draft
willkill07 wants to merge 3 commits into
NVIDIA:mainfrom
willkill07:refactor/core-dynamic-plugin-validation
Draft

refactor!: centralize dynamic plugin validation and host APIs#943
willkill07 wants to merge 3 commits into
NVIDIA:mainfrom
willkill07:refactor/core-dynamic-plugin-validation

Conversation

@willkill07

@willkill07 willkill07 commented Aug 28, 2026

Copy link
Copy Markdown
Member

Warning

BREAKING CHANGE: [Rust, Python, Node.js, Go, and C API/source compatibility] The previous plugin initialization, validation, dynamic activation-spec, and global lifecycle APIs are removed without compatibility aliases. Migrate to each binding's initialize and validate entry points, passing programmatic configuration and an optional explicit plugins.toml; keep the returned PluginHostActivation alive for the full plugin lifetime and close it explicitly for deterministic teardown.

Overview

Centralize dynamic plugin validation, attestation, configuration layering, and activation ownership in the Rust core so every language binding uses the same fail-closed runtime path. This intentionally replaces the pre-0.8 plugin host APIs with a smaller breaking API built around initialize and validate.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Move artifact hashing, Ed25519 verification, trust-policy evaluation, bounded reads, schema validation, lifecycle-state selection, snapshotting, tamper checks, and cleanup from the CLI into core.
  • Resolve plugin configuration with system-authoritative precedence: programmatic configuration, explicit plugins.toml, discovered user configuration, then discovered system configuration.
  • Preflight all selected dynamic plugins before loading code and roll back partial activation on failure.
  • Introduce a single activation handle that owns static registrations, native libraries, worker processes, snapshots, and the process-wide activation lease.
  • Standardize the public surface as initialize and validate across Rust, Python, Node.js, Go, and C; both operations accept the same programmatic configuration and optional explicit configuration path.
  • Remove the former dynamic activation-spec loaders, parallel initialization variants, global clear/report functions, and compatibility aliases.
  • Keep plugin install/remove and managed Python-environment attestation in the CLI.
  • Update binding declarations, examples, documentation, and cross-language tests for the breaking API.

Validation completed:

  • just test-rust
  • just test-python
  • just test-node
  • just test-go
  • just test-python-plugin
  • just docs
  • uv run pre-commit run --all-files

Where should the reviewer start?

Start with crates/core/src/plugin.rs for the unified API and activation ownership model, then review crates/core/src/plugin/dynamic/configuration.rs for configuration discovery and precedence and crates/core/src/plugin/dynamic/trust.rs for artifact attestation. Binding projections are implemented in crates/python/src/py_plugin.rs, crates/node/src/api/mod.rs, crates/ffi/src/api/plugin.rs, and go/nemo_relay/plugin.go.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:XXL PR is very large Improvement improvement to existing functionality lang:go PR changes/introduces Go code lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code labels Aug 28, 2026
@github-actions

Copy link
Copy Markdown

License Diff

Compared against origin/main.

Lockfile license changes

Lockfile License Changes

Rust

Added

  • None

Removed

  • None

Updated/Changed

  • None

Node

Added

  • None

Removed

  • None

Updated/Changed

  • None

Python

Added

  • None

Removed

  • None

Updated/Changed

  • None
Status output
[license-diff] selected languages: rust, node, python
[license-diff] generating current inventory
[license-diff] current: generating Rust inventory
[license-diff] current: Rust inventory complete (446 packages)
[license-diff] current: generating Node inventory
[license-diff] current: Node inventory complete (367 packages)
[license-diff] current: generating Python inventory
[license-diff] current: Python inventory complete (105 packages)
[license-diff] current inventory complete
[license-diff] checking out base ref origin/main into a temporary worktree
[license-diff] base: generating Rust inventory
[license-diff] base: Rust inventory complete (446 packages)
[license-diff] base: generating Node inventory
[license-diff] base: Node inventory complete (367 packages)
[license-diff] base: generating Python inventory
[license-diff] base: Python inventory complete (105 packages)
[license-diff] base inventory complete
[license-diff] removing temporary base worktree
[license-diff] comparing inventories
[license-diff] rendering Markdown output
[license-diff] done

@willkill07 willkill07 self-assigned this Aug 28, 2026
@willkill07 willkill07 added this to the 0.9 milestone Aug 28, 2026
@willkill07 willkill07 changed the title refactor: centralize dynamic plugin validation and host APIs refactor!: centralize dynamic plugin validation and host APIs Aug 28, 2026
@github-actions github-actions Bot added the breaking PR introduces a breaking change label Aug 28, 2026
@github-actions

Copy link
Copy Markdown

Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07
willkill07 force-pushed the refactor/core-dynamic-plugin-validation branch from 1240812 to 226cd64 Compare August 28, 2026 20:09
Signed-off-by: Will Killian <wkillian@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking PR introduces a breaking change Improvement improvement to existing functionality lang:go PR changes/introduces Go code lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code size:XXL PR is very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Initialize discovered [[plugins.dynamic]] without caller-built specs in Python

1 participant