Repository navigation
test(e2e-browser): core-clis Gemini 跑道加 shell 环境快照与 mock 可观测性 - #2619
Merged
Merged
Conversation
真机 core-clis 中 Gemini 连续两班(0.65/0.66)稳定失败、其余 5 CLI 全绿,
且失败形态有两种:0.65 三个请求完整但无 ACK、0.66 零上游请求。本地探针
只能证「GITHUB_SHA 为空时 gemini shell 保留会话变量」,无法证明真机
tmux 路径上 GITHUB_SHA 确实是空串。补三项纯测试设施可观测性:
- mock gemini 的 functionCall 命令前置一段 env 快照(${VAR+x} 区分
set-empty/unset/value),追加到 CLI cwd 的 .e2e-gemini-shell-env.log,
workflow 在跑道后 cat 进日志——真机 GITHUB_SHA 三态由产物直接回答。
- handleGemini verbose 打印分支(router/text/functionCall)、toolResult
判定与声明的工具名,钉死每次请求到底回了什么。
- 同 marker 路由判定请求超过 2 次告警,捕捉「router JSON 被拒反复重试、
主模型一次不调」的静默打转。
纯测试设施,src/ 零改动。快照构造抽成纯函数并配双引擎单测(变异咬红)。
Co-Authored-By: Claude Code <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 30, 2026 15:11
复审 P2/P3:
- 快照值用 ${VAR-} 而非裸 ${VAR},unset 变量在 set -u(或 BASH_ENV/rcfile
打开 nounset)下不再中断整行——否则诊断不写、botmux send 也不执行,
现象与「CLI 没提交」无法区分;三态判定仍只靠 ${VAR+x}。
- 每行加 epoch + marker,区分两次 attempt/并发 gemini bot。
- 补 router 打转告警的单测(第 3 次才告警)与 set -u 单测,均变异咬红。
- .e2e-gemini-shell-env.log 加入 .gitignore(本地 e2e 不留脏文件)。
Co-Authored-By: Claude Code <[email protected]>
This was referenced Oct 30, 2026
This was referenced Oct 30, 2026
Owner
Author
|
双审 P2(gemini router 告警按累计计数、无 marker 请求共用兜底桶导致误报)的跟进修复已提:#2630。含 3 条真实 MockLlmServer 回归用例、变异验证,以及 marker 字符集断言的 P3。其余 P3(诊断值完整进公开 CI 日志、单测共享 /tmp、helpers 不在 bun test 腿)不阻断,按需再处理。 |
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 1f1ddf8…313e01661(4 个提交),同批合入的还有 #2568 #2473 #2585,失败不一定由本 PR 引起。
|
This was referenced Oct 30, 2026
deepcoldy
pushed a commit
that referenced
this pull request
Oct 31, 2026
同步最新 master(#2585 回复页脚控制台入口、#2605 TraeX 额度池顺序续跑、 #2630、#2619、#2473、#2568 共 6 提交)。与本 PR 仅在四个 i18n/页面文件 交集(bot-defaults-page.tsx、dashboard/web/i18n.ts、i18n zh/en),均为 各自新增不同键的同段并存,git 自动合并无冲突:本 PR 的 sharedSandbox* / sandbox_advice.* 全套与 master 的 replyFooter / autoModelQuota* 键共存。 Co-Authored-By: Claude Code <[email protected]>
This was referenced Oct 31, 2026
|
🚀 Released in v3.56.0 |
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.
背景
#2562 的 core-clis 跑道合并后,真机连续两班 仅 Gemini 稳定失败(OpenCode/Pi/OhMyPi/Kimi/Grok 全绿),且是两种不同形态:
GITHUB_SHA: ''):gemini 发出 3 个请求(路由 + 主模型两轮),工具轮回来,但飞书无 ACK 气泡。本地 npm pack 纯函数四案 + 裸
gemini --yoloPTY 探针只证明了「若 GITHUB_SHA 为空,shell 保留会话变量」,不能证明真机 tmux 路径上 GITHUB_SHA 确实是空串。本 PR 加可观测性,让下一次真机 run 的产物直接回答三个未知,不改任何判定行为。改动(纯测试设施,src/ 零改动)
run_shell_command命令前置printf '…${VAR+x}:${VAR}…' >> .e2e-gemini-shell-env.log。${VAR+x}区分三态:GITHUB_SHA={x:}= set 但空(修复生效,严格脱敏应关闭)GITHUB_SHA={:}= unsetGITHUB_SHA={x:abc}= runner 真值泄漏(tmux pane 注入没成功)同时记录 BOTMUX_SESSION_ID/BOTMUX_IDENTITY_BIN/BASH_ENV/__OWNER_OPEN_ID 是否存活。workflow 在跑道后加一步
cat进 job 日志。branch=router/text/functionCall、toolResult、声明的工具名,钉死 mock 到底回了什么。快照构造抽成纯函数
test/helpers/mock-llm-server/gemini-shell-env.ts,配双引擎单测(vitest + bun);变异(去掉${VAR+x}存在判定)精确咬红。bun build/tsc 通过,mock 全套 22 测试绿。不做的事
验证计划
合入后(或本 PR 分支)
workflow_dispatch一次feishu_cases=core-clis,从 job 日志读.e2e-gemini-shell-env.log与 gemini verbose:GITHUB_SHA={x:}但 SID 等仍{:}→ 空串没关掉 0.66 脱敏,查上游判定;GITHUB_SHA={x:abc...}→ tmux pane 空值注入在真实链路丢了,查桥接;🤖 Generated with Claude Code