Skip to content

[Plugin] Decouple visibility plugin from server modules - #15678

Merged
KomachiSion merged 1 commit into
alibaba:developfrom
KomachiSion:codex/visibility-plugin-decouple-sys
Aug 10, 2026
Merged

KomachiSion merged 1 commit into
alibaba:developfrom
KomachiSion:codex/visibility-plugin-decouple-sys

Conversation

@KomachiSion

Copy link
Copy Markdown
Collaborator

What is the purpose of the change

The independently published nacos-visibility-plugin artifact should expose only the contracts required by external plugin implementations. Its server-side runtime currently depends on nacos-sys, which couples plugin developers to Nacos server internals.

Brief changelog

  • move VisibilityPluginManager, VisibilityPluginProvider, and VisibilityPluginTypePolicy into nacos-core
  • move their ServiceLoader registrations and unit tests with the server runtime
  • reduce nacos-visibility-plugin to a provided dependency on nacos-api
  • preserve the deprecated VisibilityService#init(Properties) compatibility path for existing implementations
  • update server-side AI visibility consumers to use the core manager

Verifying this change

  • mvn -B -pl plugin/visibility,core,ai -am spotless:apply spotless:check clean test -Dtest=VisibilityPluginManagerTest,VisibilityPluginProviderTest,VisibilityPluginTypePolicyTest,VisibilityHelperTest,PromptOperationServiceImplTest,SkillListFilterTest,SkillOperationServiceImplTest,AiResourceManagerTest,AgentSpecListFilterTest,AgentSpecOperationServiceImplTest,ValidationResultTest -Dsurefire.failIfNoSpecifiedTests=false -DtrimStackTrace=false
  • mvn -B -pl plugin/visibility,core,ai -am compile apache-rat:check checkstyle:check spotbugs:check spotless:check -DskipTests
  • verified 100% line coverage for the moved manager, provider, and type policy classes
  • verified nacos-visibility-plugin compile dependency tree contains only nacos-api and no server module

Checklist

  • Make sure there is a Github issue filed for the change.
  • The pull request addresses one focused change.
  • Unit tests cover the moved server runtime and ServiceLoader registrations.
  • Spotless, RAT, Checkstyle, SpotBugs, compilation, and affected tests pass locally.

@github-actions

Copy link
Copy Markdown

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API、新增配置参数、修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@KomachiSion KomachiSion added this to the 3.3.0 milestone Aug 10, 2026
@KomachiSion
KomachiSion merged commit 6074e9b into alibaba:develop Aug 10, 2026
7 checks passed
@KomachiSion
KomachiSion deleted the codex/visibility-plugin-decouple-sys branch August 10, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants