Repository navigation
Conversation
…se-label-space-assignment # Conflicts: # apps/api/app/db/crud/bad_case_catalog_sync.py # apps/api/tests/m6-16-bad-case-catalog-sync/test_migration.py # docs/architecture.i18n.yaml
…se-label-space-assignment # Conflicts: # docs/architecture.i18n.yaml
- open the SQLite transaction before nested savepoints so a failed catalog page rolls back fact and cursor together - declare catalog_label/catalog_synced in the external contract and accept MySQL TINYINT(1) for booleans - backfill legacy associations in fixtures, corpus seeds and e2e helpers - refresh the OpenAPI path list and the workspace admin e2e tab count - mark bugfix-58 in-progress and close bugfix-56 in the flow tree
- analysis_progress matches probe reports by the requesting workspaces instead of the legacy case owner - migration 0033 projects existing catalog labels, marks them synced, and maps report/catalog origins to direct_ingest/legacy_owner idempotently - mirror the origin-aware backfill in fixtures and cover the data migration - take the SQLite write lock during label replacement - require items on the label replacement request and regenerate contracts - add the structured review record with dispositions
…se-label-space-assignment # Conflicts: # .agents/flow/issues/bugfix-explicit-skill-conclusion.i18n.yaml
- start the SQLite transaction inside commit_page with a no-op UPDATE so begin_nested cannot commit the page unit, without making every transaction eagerly hold a read snapshot - renumber the new label and sync-type-title issues to bugfix-60/61 to avoid ids introduced on main - mark the portable backend issue done after #604 closed - refresh the review record's issue references
…se-label-space-assignment
…se-label-space-assignment
…se-label-space-assignment
…se-label-space-assignment # Conflicts: # .agents/flow/issues/bugfix-bad-case-sync-type-title.i18n.yaml
This branch has not been deployed
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.
公共 badcase 按 label 划分工作空间 (#582)
让每个工作空间配置其接受的公共 badcase label,公共目录同步按 label 把一条公共 badcase 多对多分配到所有匹配空间,并让列表、Session、统计与自进化统一走同一空间边界。
变更概览
feat(db)workspace_bad_case_labels、workspace_bad_cases关联表与bad_cases.catalog_label投影列;迁移 0033 按origin回填direct_ingest/legacy_owner,并把存量 catalog 标签投影到catalog_labelfeat(api)GET/PUT /api/workspaces/{wid}/bad-case-labels:单事务锁定空间、全量替换规则、删除本空间catalog_label关联并按索引列重建历史feat(sync)catalog_synced列与 assigned/unassigned/invalid 计数fix(ingest)direct_ingest关联、收敛 legacy、额度与used改按关联去重计数refactor(api)WorkspaceReadScope.case_condition()统一读边界,10 处读路径从bad_cases.workspace_id切到关联feat(web)docstest(api)fix(ci)fix(review)PUT的items必填设计要点
bad_cases保留单份公共事实(全局bad_case_id主键),可见性由workspace_bad_cases(workspace_id, bad_case_id, assignment_source)关联决定。assignment_source三态:legacy_owner(迁移回填)/direct_ingest(凭据上报)/catalog_label(label 命中)。同空间同 case 可同时有直接上报与 label 两种关联,读取DISTINCT去重。bad_cases.catalog_label是meta_data.label验证后的查询投影,非第二事实源;统计与重建只查列、不在 SQL 解析 JSON。WorkspaceReadScope.case_condition();bad_cases.workspace_id仅保留直接上报归属。已持久化候选/报告/运行快照不反查实时关联。检视
验证
pnpm contract:check通过;类型/文档/流程门禁(typecheck/typecheck:web/lint:docs/verify:flow)通过。tests/workspaces、tests/m6-16-bad-case-catalog-sync、tests/m8-02-session-latest-ten、tests/m8-03-workspace-overview、tests/ingest全绿。vitest(Badcase 类型页签 + 管理页导航)。关联
plans/fullstack-design/17-workspace-bad-case-label-routing.mdplans/superpowers/plans/2026-11-24-issue-582-badcase-label-routing.md.agents/notes/implemented/feature/2026-11-24-workspace-bad-case-label-routing.md冒烟与视觉对比(2026-11-25)
在 PR head
94c018b9(之后的检视修复未改动 UI 代码,最终 headbf7f0912视觉一致)的本地 SQLite demo corpus 上运行真实浏览器冒烟:独立Smoke Labels空间 + 两条catalog_label公共 badcase(code-review/tool-use),headless Chrome 1440×960,11 个场景全部通过,未发现需要修复的产品缺陷。证据 release:pr-597-smoke-evidence-20261125(截图、smoke-report.html、report-data.json、zip;不提交代码仓)。Before · main
744f4f57工作空间管理只有 5 个页签,没有「Badcase 类型」。
After · PR head
94c018b9(UI 与最终 headbf7f0912相同)新增「Badcase 类型」页签;保存规则后提示「历史数据已重新划分」,历史公共 badcase 立即回填(已关联 1 条)。
与 V2 原型 HTML 同场景对照
同 viewport、同数据(
code-review/ 已关联 1 条)下,页签顺序、面板层级、标题与说明、chip 样式、保存按钮与计数文案一致;差异仅来自原型外壳的品牌/演示账号。场景矩阵
tool-use后仅保留code-review可见端到端可见性证据:保存两个 label 后概览两条用例;移除
tool-use后仅剩code-review;只读成员视图。