RFC-20 Phase 2: Tag/Label + 查询 #22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User Story
作为用户,我能给 variable 打 tag/label,用
:name语义删除,按 scope/tag/label 组合筛选 variables。前置条件
Phase 1 已完成,有可用的
var create/get命令。测试步骤
准备
Tag 操作
Step 1: 添加 tag
预期: tags 包含
status:active,workflow:solve-issue,priority:highStep 2: tag 同 key 覆盖
预期: tags 中 status 变为
completed(替换 active)Step 3: 删除 tag
预期: tags 中无 status key
Label 操作
Step 4: 添加 label
预期: labels 包含
archivedStep 5: 删除 label
预期: labels 中无
archivedTag/Label 同名互斥
Step 6: label 与已有 tag key 冲突
预期: error JSON,提示
workflow已作为 tag key 存在Step 7: tag 与已有 label 冲突
预期: error JSON,提示
pinned已作为 label 存在查询
Step 8: scope 精确匹配
预期: 返回 VAR_1, VAR_2(不含 VAR_3)
Step 9: scope 前缀匹配
预期: 返回 VAR_1, VAR_2, VAR_3
Step 10: tag 过滤
预期: 返回 VAR_1(Step 2 已改为 completed)和 VAR_2
Step 11: label 过滤
预期: 返回 VAR_3
Step 12: 组合查询
预期: 仅返回 scope=uwf/thread/ 且 status=completed 的 variables
Step 13: list 输出格式
预期:
{ "type": "<variable-list-schema-hash>", "value": [...] }批量 tag
验证完成标准
✅ 所有 checkbox 打勾
✅
bun test通过✅
bun run check无 lint 错误Ref: #20, #19