Skip to content

chore: sync release/2026-10-23 (2.3.1) back to main - #4361

Merged
liruifengv merged 4 commits into
MoonshotAI:mainfrom
kimi-agent-bot:sync/2.3.1-to-main
Oct 23, 2026
Merged

liruifengv merged 4 commits into
MoonshotAI:mainfrom
kimi-agent-bot:sync/2.3.1-to-main

Conversation

@kimi-agent-bot

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — post-release branch maintenance

Problem

The 2.3.1 patch release shipped from release/2026-10-23; main needs the version bump, CHANGELOG, and release-only fixes back so the next cycle's changesets baseline does not drift from the published release.

What changed

Cherry-picked the four release-branch commits not on main, oldest first:

All applied cleanly. Notes:

  • The 5 changeset files arrive with the fix commits and are deleted again by the version commit — net zero, they must not be re-consumed on main.
  • apps/kimi-code/package.json keeps main's removal of the node-pty optionalDependency (refactor: remove unused session terminal service #4333); only the version field comes from the release branch.
  • Do not merge until the release broadcast is done — back-sync merges last in the release checklist, same day.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. (N/A — release back-sync)
  • Ran gen-changesets skill, or this PR needs no changeset. (No changeset — consumed ones must not return)
  • Ran gen-docs skill, or this PR needs no doc update. (Docs changelog rides in the separate sync PR)

liruifengv and others added 4 commits October 23, 2026 15:26
…#4348)

* fix(kap-server): decouple workspace trust from runtime initialization

* fix: preserve workspace trust errors

* fix: emit workspace trust recovery changes

* fix: complete workspace trust recovery

* fix(agent-core-v2): reclaim session locks from zombie processes (MoonshotAI#4320)

(cherry picked from commit 0a90e2e)

* feat: let users take over a session lock left by an exited process (MoonshotAI#4328)

* feat: let users take over a session lock left by an exited process

Session locks judged alive by mistake (a different hostname, pid reuse, or a failed process-state probe) blocked the session with no way out. Add a takeover path: the lock service evicts another process's lock, the SDK exposes Session.takeOverLock(), kap-server adds POST /api/v1/sessions/{id}:takeover, and the TUI offers Take over once a retry is still occupied. KIMI_CODE_SESSION_LOCK=0 turns the lock off for a process.

* fix(agent-core-v2): evict the lock directly on takeover

Takeover went through the reclaim marker, so a stale marker left by a crashed reclaimer on another host made takeover a silent no-op while the API reported success. Unlink the lock file directly instead.

* fix(agent-core-v2): surface takeover failures when the lock cannot be removed

Takeover swallowed unlink errors, so a lock file another user owns in a shared sticky directory was reported as taken over while the next retry stayed occupied. Ignore only ENOENT and let other errors reach the caller. Also fix the run gate test bootstrap stub typing.

* fix(tui): simplify the session takeover copy

* fix(tui): tie the takeover warning to the takeover action

* fix(tui): drop the holder line from the takeover dialog

* refactor(tui): move the session occupancy dialogs into a controller

(cherry picked from commit e7f1a99)

* chore: sync web dist from code-app

code-app: 76483646b7c46a61bff868f1473535e0a32b473d

---------

Co-authored-by: 7Sageer <[email protected]>
code-app: 7be8bf55306625ade7b5dbead86bc789d22d0159

Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: aed0133

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 23, 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-23T08:00:37.107023Z aed0133 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 23, 2026

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

commit: aed0133

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aed01338b0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

return true;
}
}
const [variant] = await findLegacyTrustRecords(docs, root);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not revive deleted trust from another spelling

When upgrading on Windows where older releases wrote separate case/slash legacy markers, a root can have A and B records. If the user untrusted A on the base version, its delete removed only the canonical/A keys and reads of A then returned false, while B could remain. This new fallback finds and migrates B, silently trusting the workspace again and enabling its project MCP configuration. Because there is no revocation tombstone to distinguish B from stale state, require the user to re-trust rather than letting a non-current variant override the missing canonical/current marker.

AGENTS.md reference: AGENTS.md:L110-L112

Useful? React with 👍 / 👎.

forRoot(root: string): IWorkspaceTrustEntry {
const key = canonicalWorkspaceRoot(root);
const existing = this.entries.get(key);
if (existing !== undefined) return existing;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Revalidate cached trust when reopening a workspace

In a long-lived server after forRoot has resolved once, every later open returns the app-lifetime cached entry without touching persisted state. If another CLI or Desktop process revokes the same workspace, closing and reopening or rematerializing it here now keeps trusted=true; the base per-generation service reread the marker, but the new instance instead loads project MCP configuration until the full process restarts. Revalidate or evict the entry at a reopen boundary, or observe trust-store changes.

AGENTS.md reference: AGENTS.md:L110-L112

Useful? React with 👍 / 👎.

@liruifengv
liruifengv merged commit f8925ab into MoonshotAI:main Oct 23, 2026
17 checks passed
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.

3 participants