fix(cli): validate static components before dynamic plugins - #812
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (13)
🧰 Additional context used📓 Path-based instructions (15)**/*.rs📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)
Files:
**/*.{rs,py,js,mjs,ts,go,c,h}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{rs,py}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{rs,py,js,mjs,ts}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{rs,py,go,js,ts,html,md,mdx,toml}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{rs,c,h}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{rs,py,go,js,ts}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{rs,toml}📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Files:
**/*.{rs,py,pyi,go,js,ts}📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Files:
{crates,python}/**/*.{rs,py}📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)
Files:
**/*.{md,mdx,rs,py,go,js,ts}📄 CodeRabbit inference engine (.agents/skills/maintain-observability/SKILL.md)
Files:
**/*.{py,rs,go,js,jsx,ts,tsx}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
**/*.{rs,h,c,cc,cpp}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
WalkthroughThe plugin activation flow now validates static configuration before adding dynamic plugin components. Tests cover legacy ChangesPlugin validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change validates static components before synthesizing dynamic plugin specifications, preserving legacy rejection while allowing dynamic plugins to activate correctly; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Follow-up: add regression coverage for the dynamic-plugin validation ordering regression, including dynamic activation of the Switchyard plugin while preserving rejection of legacy static |
License DiffCompared against Lockfile license changesLockfile License ChangesRustAdded
Removed
Updated/Changed
NodeAdded
Removed
Updated/Changed
PythonAdded
Removed
Updated/Changed
Status output |
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
d66d94c to
aeba7c6
Compare
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
|
/merge |
Overview
Validate user-authored static components before the CLI synthesizes component specs for dynamic plugins. This prevents a dynamic plugin whose
plugin_idisswitchyardfrom being rejected as the removed legacy static Switchyard component.This follow-up was rebased onto
mainafter #811 merged and now contains only the isolated ordering fix.Details
PluginConfig.[[components]] kind = "switchyard"entries, with direct regression coverage for both states.plugin_id = "switchyard"reaches dynamic activation and receives its dynamic manifest diagnostic instead of the legacy migration error.Validation completed successfully:
cargo test -p nemo-relay-cli --lib server::tests::register_and_validate_plugin_components_rejects_legacy_switchyard_components -- --exact(1 passed)cargo test -p nemo-relay-cli --lib server::tests::plugin_activation_covers_empty_invalid_and_missing_manifest_paths -- --exact(1 passed after rebase)cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningsjust build-test-plugin-fixturesjust test-python-plugin(140 passed)just test-rustuv run pre-commit run --all-filesBreaking changes: none. Dynamic plugins continue to validate and activate through their registered plugin kinds; the change only prevents them from being mistaken for user-authored legacy static components.
Where should the reviewer start?
Start with the validation ordering in
crates/cli/src/server/mod.rs, followed by the static and dynamic Switchyard regressions incrates/cli/tests/coverage/shared/server_tests.rs.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
Bug Fixes
Tests