Skip to content

revert: remove default workspace session creation - #4293

Closed
wbxl2000 wants to merge 1 commit into
mainfrom
qer/revert-default-workspace
Closed

wbxl2000 wants to merge 1 commit into
mainfrom
qer/revert-default-workspace

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Requirement or Bug

按发版会议决定撤回默认工作区聊天能力,回退 #4277 和 #4224。

Bug Reproduction Steps

N/A,功能撤回。

Root Cause

N/A。

Code Changes

 POST /api/v1/sessions
- default_workspace: true → 自动创建默认目录并创建会话
+ 必须提供 workspace_id 或 metadata.cwd

删除默认工作区服务、配置段、is_default 字段、40930 错误和相应测试;同步撤回中英文配置及接口文档。保留进程启动 timeout 修复、会话占用锁和其他后续改动。错误处理已跟随当前主线的 sessionErrors.ts 清理。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
无项目创建会话 default_workspace=true 可创建 缺少 workspace_id / metadata.cwd 返回 40001 main 开发版 desktop / web 与调用新接口的脚本 选择已有目录,提供 workspace_id 或 metadata.cwd;客户端配套回退
工作区返回值 含 is_default 删除该字段 使用该标记的客户端 将已有目录作为普通工作区
default_workspace.path 配置 决定默认目录位置 不再作为已注册配置生效 使用默认工作区的开发版用户 显式打开原目录;不改用户配置文件
默认目录错误 返回 40930 和原因 删除专用错误 使用默认工作区接口的客户端 使用普通目录创建流程及其错误处理
已有目录及会话 可继续访问 保留文件与会话,按普通工作区访问 已创建默认工作区内容的用户 无需迁移或删除数据

验证:核心 workspace/config/hostProcess 相关测试 206 项通过;agent-core-v2 和 kap-server 类型检查通过;根 lint 通过(有既有 warning)。Node 24 下服务端全量 1483 项通过、1 项跳过,1 项搜索并发测试失败;随后单独重跑整个 searchService.test.ts,118 项全部通过。未宣称全量一次通过。

运行 gen-changesets 规则检查:未新增 CLI changeset,本次撤回尚未进入正式 CLI 的服务端功能,现有 CLI/TUI 与随包 Web 不使用该入口;客户端回退另有 app changeset。中英文文档已同步审阅;gen-docs 提及的旧 docs/scripts/sync-changelog.mjs 在当前仓库不存在,本次未改 changelog。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (N/A: release-meeting rollback; original PRs linked above).
  • I have added tests that prove my feature works. (Restored existing session/workspace tests; no new feature.)
  • The behavior-change table above is complete; removal was explicitly requested for this release and explicit workspace selection remains available.
  • Ran gen-changesets skill; no CLI changeset needed for this unreleased server-only feature.
  • Ran gen-docs rules and synchronized both locales; unavailable legacy changelog helper noted above.

@changeset-bot

changeset-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ccbd2df

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T10:20:16.550248Z ccbd2df PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@ccbd2df
npx https://pkg.pr.new/@moonshot-ai/kimi-code@ccbd2df

commit: ccbd2df

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant