feat(kap-server): expose session deletion with serialized cleanup - #3630
Merged
Conversation
🦋 Changeset detectedLatest commit: 63000cc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Collaborator
Author
|
@codex review |
commit: |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
This was referenced Sep 7, 2026
Merged
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.
Related Issue
Resolves #3543. Replaces the deletion API portion of #3544; indexed-search visibility is handled independently in #3631, which can merge first.
Problem
The core and SDK support deleting sessions, but GUI clients have no REST delete action or deletion notification. Simply exposing the core operation leaves the broadcaster's cached transcript and event journal available, and detached journal retries can delete a newly created session that reuses the same ID.
What changed
POST /api/v1/sessions/{id}:delete, its response/OpenAPI schemas,event.session.deletedfan-out, and the Kimi Inspect activity handler. Missing sessions return40401.This PR does not add a search deletion ledger or promise synchronous removal of every derived copy. Search-index visibility is handled separately. The existing core deletion operation's later persistence failures retain their existing error behavior; retryability here specifically covers journal cleanup before core deletion.
Validation
Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. No CLI invocation or CLI user guide changes; the REST operation is covered by the OpenAPI projection.