Skip to content

fix(plugin-wasm): reorder namespaced_kind checks and disable relaxed-simd when simd off#513

Open
staging-devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1779719243-fix-wasm-plugin-issues
Open

fix(plugin-wasm): reorder namespaced_kind checks and disable relaxed-simd when simd off#513
staging-devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1779719243-fix-wasm-plugin-issues

Conversation

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor

@staging-devin-ai-integration staging-devin-ai-integration Bot commented May 25, 2026

Summary

Closes #470
Closes #469

Review & Validation

  • Verify namespaced_kind("core::audio") now returns the reserved-prefix error, not the generic namespace-separator error.
  • Verify PluginRuntime::new succeeds with enable_simd: false for both enable_threads values.

Link to Devin session: https://staging.itsdev.in/sessions/1a4ac010110d4e81bc6d1d4e21a96321
Requested by: @streamer45


Devin Review

Status Commit
🟢 Reviewed 64cd26e
Open in Devin Review (Staging)

…simd when simd off

- Reorder checks in namespaced_kind so starts_with("core::") runs
  before contains("::"), making the core-prefix error reachable.
- Disable relaxed-simd when enable_simd=false to prevent wasmtime
  config conflict.
- Update pinning tests to assert the corrected behavior.

Closes #470
Closes #469

Signed-off-by: streamkit-devin <devin@streamkit.dev>
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Copy link
Copy Markdown
Contributor Author

@staging-devin-ai-integration staging-devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review (Staging)
Debug

Playground

Comment on lines +301 to 313
if kind.starts_with(RESERVED_PREFIX) {
return Err(format!(
"Plugin kind '{kind}' contains '::' which is reserved for namespace prefixes. \
Plugin kinds must be simple names like 'gain', 'reverb', etc."
"Plugin kind '{kind}' uses reserved prefix '{RESERVED_PREFIX}'. \
This prefix is reserved for built-in core nodes."
));
}

// Validate: reject if uses reserved prefix
if kind.starts_with(RESERVED_PREFIX) {
if kind.contains("::") {
return Err(format!(
"Plugin kind '{kind}' uses reserved prefix '{RESERVED_PREFIX}'. \
This prefix is reserved for built-in core nodes."
"Plugin kind '{kind}' contains '::' which is reserved for namespace prefixes. \
Plugin kinds must be simple names like 'gain', 'reverb', etc."
));
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: core:: kinds now fail with the reserved-prefix error before the generic namespace check

The guard order in namespaced_kind now checks kind.starts_with("core::") before the broader kind.contains("::"), so core::audio remains rejected but receives the more specific reserved-prefix message. This is a behavior change only for diagnostics/logging from register_plugins; current registration behavior still skips the plugin either way, so I did not classify it as a bug.

Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Comment on lines 76 to 80
engine_config.wasm_simd(config.enable_simd);
if !config.enable_simd {
engine_config.wasm_relaxed_simd(false);
}
engine_config.wasm_threads(config.enable_threads);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Disabled SIMD now also disables relaxed SIMD while preserving the default feature set

The Wasmtime config still leaves relaxed SIMD at Wasmtime's default when enable_simd=true, but explicitly disables relaxed SIMD when base SIMD is disabled. That matches the exposed PluginRuntimeConfig::enable_simd contract and avoids changing default plugin compatibility for runtimes that still allow SIMD.

Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.39%. Comparing base (b2d01c2) to head (64cd26e).

Files with missing lines Patch % Lines
crates/plugin-wasm/src/lib.rs 92.30% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #513   +/-   ##
=======================================
  Coverage   79.39%   79.39%           
=======================================
  Files         232      232           
  Lines       66904    66906    +2     
  Branches     1909     1909           
=======================================
+ Hits        53117    53123    +6     
+ Misses      13781    13777    -4     
  Partials        6        6           
Flag Coverage Δ
backend 79.12% <92.30%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 85.27% <ø> (ø)
engine 83.59% <ø> (-0.10%) ⬇️
api 89.98% <ø> (ø)
nodes 75.33% <ø> (ø)
server 80.27% <ø> (+0.01%) ⬆️
plugin-native 83.47% <ø> (ø)
plugin-wasm 92.20% <92.30%> (+0.30%) ⬆️
ui-services 84.67% <ø> (ø)
ui-components 60.49% <ø> (ø)
Files with missing lines Coverage Δ
crates/plugin-wasm/src/lib.rs 88.44% <92.30%> (+0.81%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants