fix(projects): B-6 卫生切片——删孤儿 mapper、修错注释、openapi 枚举对齐 0074(语义裁决 ADR-034) - #2316
Merged
Conversation
…ale coverage exclude(语义裁决见 ADR-034) round-74 普查(lane-artifacts/round-74/b6-vocabulary-survey.md,526 行)+ 主机独立 复核确认的事实:Hub 的 workspace/project **没有 status 事实**(model/service/ handler/openapi/migration/live DB 六处逐字一致,live 表仅 6 列),而 UI 的 status filter 100% 前端内存过滤、三个同名 mapper 产 5 个与 Hub 交集为 ∅ 的词。 因此「让筛选对真实 Hub 数据成立」在没有 L3 事实源之前不可达——语义部分交 operator 裁决(ADR-034,DEFERRED 带触发条件),本批只做不需要裁决的四件事: 1. 删 app/workbench/src/hubDataMapping.ts 的 workspaceProjectToProjectInfo: 它把每个 Hub 项目硬编码成 status:'Active'(Hub 侧不存在的词)。#2291 删掉它 唯一调用者后成为 0 非测试消费者孤儿;desktop 只 import 编排函数 (resolveHubProjects 等)并传自己的本地 mapper,web 用自己的副本——主机已逐 import 复核。连带删除仅被它使用的 formatProjectDate。 2. 修 hubDataMapping.test.ts 的错误注释:它宣称「Desktop 用 resolveHubProjects + workspaceProjectToProjectInfo」,正是这句错注释让孤儿活了下来;resolveHubProjects 是纯编排器,测试改用 stub mapper(−4 例)。 3. openapi 枚举对齐 0074 的真实取值域:team run status 补 pending_review(×2)、 assignment type 补 compete(×3),与 model 常量及 0074 CHECK 逐字一致。漂移根因 登记进 ADR-034:现有 3 个 verifier 只比路由形状与「2xx 有没有 schema」,不比字段 集/enum(openapi-schema-baseline.json 逐字 [])。 4. 清 app/workbench/vitest.config.ts coverage 对 src/workbenchProjectsPort.ts 的 stale exclude——该文件已被 #2291 删除。 验收:workbench typecheck 绿 + 25/25;三包全量 workbench 1712 / web 270 / desktop 4975 全绿;本地复跑 checks.yml validate job 62 条命令 PASS=62 FAIL=0。 Refs #2274 (B-6) Co-authored-by: Cursor <cursor@vectorcontrol.tech>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
修什么(#2274 B-6 的「不需要裁决」部分;语义裁决见 ADR-034)
round-74 普查(
lane-artifacts/round-74/b6-vocabulary-survey.md,526 行)+ 主机独立复核确认:Hub 的 workspace/project 没有 status 事实(model/service/handler/openapi/migration/live DB 六处逐字一致,live 表仅 6 列),GET /web/projects也不接受 status 查询;而 UI 的 status filter 100% 前端内存过滤,三个同名workspaceProjectToProjectInfo产 5 个与 Hub 交集为 ∅ 的词,匹配规则还有三套互相矛盾的实现。因此「让筛选对真实 Hub 数据成立」在没有 L3 事实源之前不可达——语义部分交 operator 裁决(ADR-034,DEFERRED 带可证伪触发条件)。本 PR 只做不需要裁决的四件事:
hubDataMapping.workspaceProjectToProjectInfo:它把每个 Hub 项目硬编码成status:'Active'(Hub 侧不存在的词)。refactor(frontend): 消融 #1546 projects port 死面(净 −880 行/31 文件)——portProjectsEnabled = Boolean(port) && !projects 在两个 shell 的所有可达状态恒为 false(shell 只在 hubReady 注入 port,而此时 projects 必为数组),故端口取数/游标分页/load-more 重试/端口建改与 ProjectNav sentinel UI 全部结构性不可达;按 S2 要求另开 #2290 登记 live 路径分页缺口 #2291 删掉它唯一调用者后成为孤儿;主机逐 import 复核:desktop 只 import 编排函数(resolveHubProjects等)并传自己的本地 mapper,web 用webWorkbenchProjects.ts副本。连带删除仅被它使用的formatProjectDate。hubDataMapping.test.ts的错误注释:它宣称「Desktop 用resolveHubProjects+workspaceProjectToProjectInfo」——正是这句错注释让孤儿活了下来(普查 N2)。resolveHubProjects是纯编排器,测试改用 stub mapper(−4 例)。pending_review(×2)、assignment type 补compete(×3),与model常量及 0074 CHECK 逐字一致。漂移根因登记进 ADR-034:现有 verifier 只比路由形状与「2xx 有没有 schema」,不比字段集/enum。app/workbench/vitest.config.ts仍排除已被 refactor(frontend): 消融 #1546 projects port 死面(净 −880 行/31 文件)——portProjectsEnabled = Boolean(port) && !projects 在两个 shell 的所有可达状态恒为 false(shell 只在 hubReady 注入 port,而此时 projects 必为数组),故端口取数/游标分页/load-more 重试/端口建改与 ProjectNav sentinel UI 全部结构性不可达;按 S2 要求另开 #2290 登记 live 路径分页缺口 #2291 删除的src/workbenchProjectsPort.ts。验收
hubDataMapping.test.ts25/25;validatejob 全 62 条命令:PASS=62 FAIL=0。明确不做(ADR-034)
不在没有 L3 事实源的前提下发明 vocabulary;不隐藏 filter chips(产品可见变更,属 operator 裁决面)。收敛路径已登记:L3 Hub 真 lifecycle 事实 → L2 唯一映射 → L1 类型分离(
statusLabelvslifecycle: bucket|'unknown',unknown 时 chips 不渲染)。Refs #2274 (B-6)