diff --git a/.agents/notes/implemented/architecture/2026-09-12-git-execution-and-project-console.md b/.agents/notes/implemented/architecture/2026-09-12-git-execution-and-project-console.md index a89e10c6a..d38c564c6 100644 --- a/.agents/notes/implemented/architecture/2026-09-12-git-execution-and-project-console.md +++ b/.agents/notes/implemented/architecture/2026-09-12-git-execution-and-project-console.md @@ -44,7 +44,7 @@ Fetch 选项依次采用单次选择、仓库 `lithe.fetch.*` 覆盖、应用默 凭据助手默认启用,让系统既有凭据先回答。交互操作安装临时 AskPass 会话,HTTP 与 SSH 都经应用的早期认证入口处理,不能初始化第二个窗口或触发单实例转发。 -会话通过带随机令牌校验的本机回环连接传递有限长度消息。事件只带提示和不透明请求标识,答案不进入控制台,也不由 Lithe 持久化。连接、回答、并发请求和重复挑战都有上限,取消或执行结束即清理监听器和未完成回答。确认认证失败后,用户可以明确重试;重试仅为本次操作绕过助手,最多三次,每次保留独立命令和退出结果。没有事件接收者时不能等待不可见的交互提示。 +会话通过带随机令牌校验的本机回环连接传递有限长度消息。事件只带提示和不透明请求标识,答案不进入控制台,也不由 Lithe 持久化。连接、回答、并发请求和重复挑战都有上限,取消或执行结束即清理监听器和未完成回答。确认认证失败后,用户可以明确重试;重试仅为本次操作绕过助手,最多三次,每次保留独立命令和退出结果。用户取消或放过凭据询问(询问过期未答)视为已经拒绝,Core 直接返回认证失败,不再询问是否重试。没有事件接收者时不能等待不可见的交互提示。 ### Fetch 保留各远程的真实结果 diff --git a/desktop/internal/core/gitauth_test.go b/desktop/internal/core/gitauth_test.go index 201385727..60034ff00 100644 --- a/desktop/internal/core/gitauth_test.go +++ b/desktop/internal/core/gitauth_test.go @@ -168,7 +168,8 @@ func TestGitAuthenticationRelaysQuestionsAndAnswers(t *testing.T) { } } -// Cancelling Git's question fails authentication without sending anything to the remote. +// Cancelling Git's question fails authentication without sending anything to the remote, and +// Core does not ask again whether to retry: the user has just declined. func TestGitAuthenticationCancelledQuestionSendsNothing(t *testing.T) { requireGit(t) remote := newAuthenticationRemote(t) @@ -181,9 +182,8 @@ func TestGitAuthenticationCancelledQuestionSendsNothing(t *testing.T) { for _, challenge := range challenges { kinds = append(kinds, challengeKind(challenge)) } - t.Logf("challenges after a cancelled question: %q", kinds) - if len(kinds) == 0 || kinds[0] != "user" { - t.Fatalf("challenges = %q, want Git's user name question first", kinds) + if len(kinds) != 1 || kinds[0] != "user" { + t.Fatalf("challenges = %q, want only Git's user name question", kinds) } if got := remote.received(); len(got) != 0 { t.Fatalf("remote received %q, want no credentials", got) diff --git a/scripts/desktop/build-desktop-core.sh b/scripts/desktop/build-desktop-core.sh index a10a6706d..31254b130 100755 --- a/scripts/desktop/build-desktop-core.sh +++ b/scripts/desktop/build-desktop-core.sh @@ -304,7 +304,9 @@ PINNED_CORE_REPOSITORY="https://github.com/Lithe-IDEA/Lithe-core-rust.git" # Lithe-core-rust main at 4ab420e: #140 records remote workspace trust by target and host real # path (S01/S02/S04); #141 starts no Git, language server, build provider or VCS that runs project # code for a workspace the user has not trusted (#2208). -PINNED_CORE_REVISION="4ab420e312dbfe26c14ba1c6e64b059fd4775c70" +# Lithe-core-rust main at 94408ca: #142 returns Git's authentication failure without asking to +# retry once a credential question was cancelled or expired unanswered (#2231). +PINNED_CORE_REVISION="94408ca269b3c56d2c66a805d224609151c8a781" PROFILE="debug" CHECKOUT_ONLY="no" while [[ $# -gt 0 ]]; do diff --git a/shared/platform-feature-matrix/features/git-authentication-prompts.json b/shared/platform-feature-matrix/features/git-authentication-prompts.json index 5b2172ce3..98f3bf2a8 100644 --- a/shared/platform-feature-matrix/features/git-authentication-prompts.json +++ b/shared/platform-feature-matrix/features/git-authentication-prompts.json @@ -24,6 +24,6 @@ ] }, "owner": "Git", - "verification": "对一个要求 HTTPS Basic 认证、且没有凭据助手可用的远程仓库分别执行克隆、拉取、推送、删除远程分支和提交并推送:窗口依次询问用户名和密码,密码输入以圆点显示,答案到达远程;凭据被拒后询问是否在 Lithe 中重新输入,取消后操作以失败结束且不留下克隆目录。对带口令的 SSH 私钥执行拉取,确认口令同样在窗口中询问。两个操作同时询问时按顺序逐个显示;操作结束后它的问题自动消失。日志中只有 git.authentication.answer/retry/cancel 动作,不含提示原文、用户名、主机或答案。", + "verification": "对一个要求 HTTPS Basic 认证、且没有凭据助手可用的远程仓库分别执行克隆、拉取、推送、删除远程分支和提交并推送:窗口依次询问用户名和密码,密码输入以圆点显示,答案到达远程;凭据被拒后询问是否在 Lithe 中重新输入,取消后操作以失败结束且不留下克隆目录;在用户名或密码询问时直接取消(或放着不答直到询问过期),操作同样以认证失败结束,不再弹出是否重试的询问。对带口令的 SSH 私钥执行拉取,确认口令同样在窗口中询问。两个操作同时询问时按顺序逐个显示;操作结束后它的问题自动消失。日志中只有 git.authentication.answer/retry/cancel 动作,不含提示原文、用户名、主机或答案。", "notes": "Viva:Git 由 Core 以 GIT_ASKPASS/SSH_ASKPASS 指向 lithe 可执行文件的助手模式运行,助手经 Core 的本地连接取回答案;只有用户在窗口中发起的 Git 操作(克隆、拉取/推送/同步、删除远程分支、提交并推送、GitHub 新建仓库和检出 PR)会询问,后台刷新不询问。macOS 用真实 Core 与 Git 对拒绝认证的 HTTP 远程端到端测试通过;Windows 上助手是 GUI 子系统程序,Git 读取其标准输出仍待实机验证。插件 VCS 提供者的认证提示不在本能力范围。" }