Repository navigation
test(e2e): cover the TUI workspace trust prompt - #5389
Conversation
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
Port the testkit half of MoonshotAI#5380: UNIT_TEST_SWITCHES names the defaults that exist only to speed unit tests, TEST_ENV_DEFAULTS spreads them, and the fixtures test pins that setting each name to undefined restores product defaults while telemetry isolation stays on. Ledger: MoonshotAI#5373, MoonshotAI#5389, MoonshotAI#5431 and MoonshotAI#5423 are not-applicable because the tests/e2e Playwright suite and its workflow do not exist here. MoonshotAI#5380 is partial (testkit half landed), and MoonshotAI#5385 is partial: its ACP fake-model migration remains for the testkit wave while the legacy-e2e freeze does not apply.
Requirement or Bug
新 E2E 的启动环境预先信任工作区,首次打开陌生目录时的信任提示没有端到端覆盖。这个 PR 补上 024 的信任场景。会话读模型和搜索 worker 的默认配置由 #5380 处理。
Bug Reproduction Steps
kimiCliEnv()启动一个干净工作区的 TUI。KIMI_CODE_TRUST_WORKSPACE为1。真实终端直接显示输入框,Trust this folder?没有出现。Root Cause
通用 CLI 测试夹具让常规场景可以直接输入。信任提示需要一个保持产品默认信任判断的隔离启动方式。
Code Changes
workspaceTrust: 'trust'或workspaceTrust: 'exit'启用首次启动的信任提示。驱动读到真实菜单后,用终端按键选择继续或返回 shell。Behavior Changes and Affected Users
workspaceTrust: 'trust'workspaceTrust: 'exit'macOS 上使用本地构建的 CLI 验证。临时恢复自动信任时,两条新用例都因看不到提示而失败。还原后,两条用例各重复 15 次,共 30 次通过。TUI 全套 164 条通过,7 条按适用范围跳过。E2E 类型检查、87 条仓库守卫测试、
pnpm lint和重复代码检查均通过。Checklist