Repository navigation
fix(desktop): 固定 Core 94408ca,取消凭据询问后不再询问是否重试 (#2231) - #2254
Merged
Merged
Conversation
Core #142 在用户取消或放过凭据询问后直接返回认证失败。桌面端测试改为要求只出现一次用户名询问,Git 执行笔记补充取消即拒绝的规则。
xiaoyumuxi
marked this pull request as ready for review
November 20, 2026 23:22
1 task done
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
#2253 已经让 Git 在 Lithe 窗口里询问用户名、密码和口令。但用户在用户名或密码询问时点“取消”(或者放着不答直到询问过期)之后,Core 还会接着弹出“是否在 Lithe 中重新输入”。用户刚刚已经拒绝过,这次询问是多余的。Core 在 Lithe-IDEA/Lithe-core-rust#142 里修正了这一点,本 PR 让桌面端固定到包含该修正的 Core,并收紧对应的测试。
改动 / Changes
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION从4ab420e升到 Core main94408ca。两者之间只有 Core Fix/issue 130 macos run path picker #142 一个提交。desktop/internal/core/gitauth_test.go:TestGitAuthenticationCancelledQuestionSendsNothing原来只要求第一条询问是用户名,并用t.Logf打印后面的询问。现在要求只出现一次用户名询问,删掉t.Logf,注释写明 Core 不再询问是否重试。shared/platform-feature-matrix/features/git-authentication-prompts.json:验证动作补上“在用户名或密码询问时直接取消(或询问过期),操作以认证失败结束,不再询问是否重试”。两端验证状态仍为pending。.agents/notes/implemented/architecture/2026-09-12-git-execution-and-project-console.md:“认证由原生会话持有”一节补一句:取消或放过凭据询问视为已经拒绝,Core 直接返回认证失败。不在本 PR 范围内 / Out of scope
类型专属:fix
复现与根因
检查项
desktop/internal/core/gitauth_test.go的TestGitAuthenticationCancelledQuestionSendsNothing。在旧固定版本4ab420e上,原测试记录到的询问序列是["user" "retry"],新的断言len(kinds) != 1会因此失败;固定到94408ca后序列是["user"],测试通过。git_auth_test.go测的是“密码被拒后重试”,仍然成立。.agents/notes/implemented/bug-fix/记录:规则补在已有的 Git 执行笔记(architecture/2026-09-12-git-execution-and-project-console.md)里,没有单独新建 bug-fix 笔记,避免同一规则写两份。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/<id>.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持pending。改的是git-authentication-prompts.json的验证动作。./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh;改了平台实现路径的,还运行了./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD.artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/;插件的构建步骤、资源路径和补丁没有写进docs/ci-builds.md、Agent Note 或 SkillUI 验证 / UI evidence
N/A:桌面端界面没有变化,只是 Core 不再发出那次多余的重试询问,窗口里少弹一个已有的对话框。
统一日志系统 / Structured logging
N/A:没有新增或改动日志事件。少掉的那次询问在 Core 侧也就不会记录对应的
git.authentication.retry动作,事件目录不变。界面文案 / i18n
N/A:没有新增或修改用户可见文字。
逻辑归属 / Logic placement
性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存或依赖。
设置 / Settings
N/A:没有改设置。
插件契约 / Plugin contract
N/A:Core #142 不改插件契约、能力版本或插件函数协议。固定版本升级只是为了带上 Git 认证修正。
发行包与资源 / Bundle and resources
N/A:没有新增或修改运行时资源。
无用代码与重构 / Dead code and refactoring
t.Logf已删除。refactor标签的 Issue:没有发现。验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/core -run TestGitAuthentication -count=1 -v(固定 Core94408ca,未设LITHE_CORE_RUST_DIR)scripts/desktop/desktop-go.sh test ./internal/workbench -run 'TestCloneAsksForCredentialsInTheWindow|TestGitAuth' -count=1 -v./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD./scripts/agent-notes/verify-agent-notes.shdevelop-lithe第三节插件归属自查命令未能执行的检查和原因:
提交前确认 / Final checks
main创建;目标分支:main.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图