You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clean, well-scoped change. The Rust-side refactor (extracting convert_inspector_tabs and reusing it for the native-plugin factory) is a nice simplification, and mirroring validate() on the plugin path before the actor starts is the right call (fail fast, matches the regular factory path).
Test coverage gap: the only new coverage is a pure unit test of convert_inspector_tabs (Rust) and a baseline no-tabs assertion. The actual wiring this PR adds, buildRegistryWithRuntime resolving definition.config.inspector and threading it through nativeFactoryBuilder(runtime, opts) (native.ts:4861-4867), has no coverage. The updated fixture (tests/fixtures/native-plugin-runtime-server.ts) plumbs opts?.inspectorTabs through, but nativePluginActor in that fixture has no inspector.tabs configured, so buildInspectorTabs returns undefined there and the tabs-actually-get-forwarded-and-appear path is never exercised end-to-end (e.g. via the inspector HTTP endpoint). Worth adding at least one fixture actor with a real inspector.tabs entry and asserting the tab surfaces for a native-plugin-backed actor, per the real-infra testing convention in CLAUDE.md.
Minor/non-blocking observations:
from_native_plugin only calls actor_config.validate() when options.inspector_tabs is Some(...) (actor_factory.rs:384-390), whereas the regular factory constructor always validates (actor_factory.rs:357-360). Harmless today since validate() only checks inspector tabs and the plugin defaults are hardcoded/trusted, but it's a latent inconsistency if validate() grows other checks later.
The pre-existing panic! on missing label/source in convert_inspector_tabs (now shared) is reachable from both call sites; since it asserts a TS-to-NAPI encoding invariant rather than user input, that's consistent with existing behavior and not a new issue introduced here.
No correctness, security, or performance concerns found. Rust conventions (hard tabs, anyhow usage, doc comments) and TS conventions (RuntimeInspectorTabEntry reuse, CoreRuntime.kind dispatch) look correctly followed.
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
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.
No description provided.