Skip to content

feat(core): #1662 车道 A Git 流程下沉(GIT-24/25/28/29) - #1753

Merged
1lck merged 7 commits into
previewfrom
feat/issue-1662-a-git-flow
Nov 5, 2026
Merged

1lck merged 7 commits into
previewfrom
feat/issue-1662-a-git-flow

Conversation

@1lck

@1lck 1lck commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Refs #1662(车道 A:Git 流程)。按条目拆成独立提交,每项两端都已切到 Core 并删除旧实现,不留 fallback。

GIT-28 git.normalizeChangeTargets

Core 去掉“已选未跟踪目录摘要 + 其下已列出子文件”的重复目标。macOS(Shelf/删除/回滚/提交/worktree 变更)与 Windows(暂存、删除、右键删除可用性)改走 Core;删除 Swift coveringUntrackedDirectoryContents、TS resolveGitStatusDeletionPaths。Core 拒绝时 macOS 提示新文案、Windows toast,不再对未归一化的集合继续。

GIT-29 git.referenceTree

Core 决定 / 分组与同级排序(引用先于纯分组,收藏优先,自然序)。Windows loadGitReferenceTree/useGitReferenceTrees 与 macOS GitReferenceTreeNode.plan 只负责展开、缩进和行 id。删除两端旧分组排序;行为变化:两端树结构与顺序一致。

GIT-24 git.rebasePlanPreview

校验码、每步消息、start steps、输出提交数全部来自 Core(与启动时同一套 planned_messages)。Windows useGitRebasePlanPreview、macOS GitRebasePlanDraft 只保留顺序/动作/用户覆盖文本。行为变化:默认 squash 统一裁掉前一条末尾换行;Core 未应答前 Start 不可用;macOS 校验文案新增 4 条中英 i18n。

GIT-25 执行日志

Core 事件新增 requestStarted.retention(统一预算,单条 32768)、finished.state、requestFinished.unconfirmedInvocations/failureRecord;两端 journal 只存储与按预算裁剪,不再各自推导状态,也不再对事件文本二次脱敏(GitConsoleEntry 对非 Core 来源条目的脱敏保留)。Core 补全 query 凭据脱敏名单。console-lifecycle-v1.json、execution-events-v1.json 已更新。

已撤出,留给后续

GIT-14 git.updatePlan、GIT-15 git.historyWindow:UI 接入过大,且没有消费方的 API 不应合入;其 Core 命令、fixture、测试已从本 PR 撤掉,后续连同两端接入一起做。

新 API

git.normalizeChangeTargets、git.referenceTree、git.rebasePlanPreview(纯规划器,不启动 Git);GIT-25 的新增事件字段。功能矩阵 git-multi-repository-references、git-rebase-stash、git-history 已追加说明。

验证

通过:cargo test --lib git::(223)、verify-rust-core-comments、verify-shared-contracts、verify-windows-boundaries、verify-platform-feature-matrix(244)、i18n --check 与 app-language、Windows tsc、macOS test-macos.sh(GitModuleTests/GitExecution/GitInteractiveRebase/GitReferenceRows/GitConsole 共 261 项)。Windows bun test src/features/git 整目录 55 个既有失败(跨文件 mock 泄漏),与基线逐项相同、无新增,涉及文件单独运行全过。
未通过(非本 PR):verify-core.sh、verify-service-boundaries.sh 报 AppModel+CodeNavigation.swift 627 行,是 preview 上已有问题,将另开 PR 修。verify-rust-core.sh 的 cargo fmt --check 报既有文件(lithe-agent-host 等)格式问题,未改。未执行:cargo check --bin lithe-windows。

补充修复

git-workspace-status-panel.test.tsx 有 7 个用例(含 changing workspace cancels pending commit preparation...)失败并拖到套件超时:GIT-28 让提交/暂存流程先调用 git.normalizeChangeTargets,测试的 invoke 替身没覆盖该命令而落到真实 Tauri。已在测试替身中按共享 fixture 规则补上该命令,未放宽断言或超时。

风险点

  1. GIT-24:Core 应答前 Start 按钮不可用(编辑后会有短暂等待)。
  2. GIT-25:journal 在收到第一个 requestStarted(携带预算)之前不裁剪。
  3. macOS GitModuleTests 里 normalizeChangeTargets 的测试替身是手写的,真实规则只由 Core 测试与共享 fixture 保证。

🤖 Generated with Claude Code

@ghfind-review ghfind-review Bot added the review: high ghfind author score; see https://ghfind.com label Nov 5, 2026
@1lck
1lck force-pushed the feat/issue-1662-a-git-flow branch from a78d643 to ca7f9a4 Compare November 5, 2026 06:46
@1lck 1lck changed the title feat(core): #1662 车道 A Git 流程下沉(GIT-14/15/24/25/28/29) feat(core): #1662 车道 A Git 流程下沉(GIT-24/25/28/29) Nov 5, 2026
1lck and others added 7 commits November 5, 2026 01:27
…28 两端接入)

- 新增 Core 命令 git.normalizeChangeTargets / git.rebasePlanPreview / git.referenceTree / git.updatePlan / git.historyWindow,附共享 fixture 与测试
- 执行日志归约与统一保留预算进入 execution_events(GIT-25 Core 部分)
- GIT-28:macOS 与 Windows 的 Shelf、删除、回滚、提交目标去重改走 Core,删除两端旧实现
- 新增文案 git.changeTargets.prepareFailed(中英)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…续 PR 连同两端接入一起做

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view,删除两端旧推导

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…关用例失败与套件超时

提交/暂存流程现在先经 Core 归一化目标;测试里该命令落到真实 Tauri invoke 而失败。替身按共享 fixture 的规则返回索引,断言与超时均未放宽。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1lck

1lck commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

本地验证(代替 GitHub macOS / Windows CI)

本 PR 与 #1760、#1755、#1753、#1759、#1756、#1758、#1757 一起,在本地集成分支 integration/issue-1662-round1 上按合并顺序集成后,按 ci-macos.yml / ci-windows.yml 的步骤在维护者的 Mac 和 Windows 机器上完整验证,未使用 GitHub 的 macOS / Windows runner。

macOS(本机,macOS 26.6 arm64)

Windows(lithe-dev,Windows Server)

  • 通过:依赖安装、verify-windows-boundaries.ps1、共享编辑器测试、PHP 插件构建与隔离验证、ci-windows.yml 中各组 bun 测试、dist 验证、Rust 测试(shared、shared-hosts、MCP stdio、agent-host、git-host、ide-host、project、terminal、windows)。
  • 发现并已修复的回归(均为测试替身未跟上新的 Core 契约,生产代码无回归):bun run typecheck 3 个 TS 错误与 3 个 agent 测试文件(feat(core): #1662 车道 F Agent/AI 下沉(AGT-03/04/07~09/11~13/18) #1757)、git-workspace-status-panel.test.tsx(feat(core): #1662 车道 A Git 流程下沉(GIT-24/25/28/29) #1753)。
  • lithe-windows memory::platform::tests::current_process_private_working_set_is_available 失败,干净 preview 基线同样失败,属于该 Windows Server 环境的既有问题。
  • 跳过:real-jdt(机器无 JDK 21/25 与 Maven)、需要 GPU 或交互桌面的 GUI 验证、GitHub 专属的缓存/上传/gate 步骤。

合并前每个 PR 已 rebase 到最新 preview,并重新执行编译、i18n、verify-core、verify-shared-contracts 等快速检查。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: high ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant