fix(search): include permitted skills in clawhub explore#258
Open
fix(search): include permitted skills in clawhub explore#258
Conversation
Collaborator
Author
|
已验证 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
概述
修复 #242,使
clawhub explore能返回公开技能以及当前用户有权限查看的技能,而不是错误地只收敛到 global 视角。变更内容
后端实现
SUPER_ADMIN折算为搜索可见性里的平台宽读标记PUBLIC、成员可见技能、管理员可见私有技能和 archived namespace 的可见性按当前用户权限统一生效hidden和非ACTIVE技能不会出现在 discover/explore 列表里make generate-api前端实现
测试覆盖
SkillSearchAppServiceTest,覆盖成员空间可见性和SUPER_ADMIN平台宽读场景PostgresFullTextQueryServiceTest,覆盖平台宽读对应的 SQL 可见性过滤质量门禁
make typecheck-web通过(未涉及前端,本次未执行)make lint-web通过(未涉及前端,本次未执行)make test-frontend通过(未涉及前端,本次未执行)make test-backend-app通过web/e2e)关键路径通过(无 UI 交互改动,不适用)make generate-api已执行且schema.d.ts已提交(无 Controller 变更,不适用)安全考虑
SUPER_ADMIN,未把SKILL_ADMIN放大为全局私有技能可读ACTIVE、hidden=false和既有 visibility 规则约束相关 Issue
Closes #242
测试说明
本地验证步骤
make dev-all启动本地环境SUPER_ADMIN分别创建 API token,并准备global与团队空间技能数据clawhub login --token <token>后运行clawhub explore,验证普通用户可见PUBLIC + 自己有权限的 skills,SUPER_ADMIN可见跨空间可读 skillscurl -H "Authorization: Bearer <token>" http://localhost:8080/api/v1/skills验证兼容层返回结果回归测试范围
clawhub explore/ compat 列表接口/api/v1/skillsPUBLIC、NAMESPACE_ONLY、PRIVATE、archived namespace截图/录屏(如有 UI 变更)
本次无 UI 变更