Repository navigation
chore: sync release/2026-10-23 (2.3.1) back to main - #4361
Conversation
…#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>
|
Codex Review SummaryThis 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: |
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 👍 / 👎.
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:
c569babfix: decouple workspace trust from runtime initialization (fix: decouple workspace trust from runtime initialization #4348)0e3980efeat: show session lock holder client names (feat: show session lock holder client names #4356)c445caechore: sync web dist from code-app (chore: sync web dist from code-app #4357)684bae9ci: release packages (ci: release packages #4353) — version bump to 2.3.1 + CHANGELOG, consuming the 5 changesets carried by fix: decouple workspace trust from runtime initialization #4348/feat: show session lock holder client names #4356All applied cleanly. Notes:
apps/kimi-code/package.jsonkeeps main's removal of thenode-ptyoptionalDependency (refactor: remove unused session terminal service #4333); only the version field comes from the release branch.Checklist
gen-changesetsskill, or this PR needs no changeset. (No changeset — consumed ones must not return)gen-docsskill, or this PR needs no doc update. (Docs changelog rides in the separate sync PR)