Skip to content

fix(session-ingest): repair v2 session deletion query#3662

Merged
eshurakov merged 2 commits into
mainfrom
axiomatic-stock
Jun 2, 2026
Merged

fix(session-ingest): repair v2 session deletion query#3662
eshurakov merged 2 commits into
mainfrom
axiomatic-stock

Conversation

@eshurakov
Copy link
Copy Markdown
Contributor

@eshurakov eshurakov commented Jun 2, 2026

Summary

  • Fix v2 CLI session deletion failures by replacing malformed raw Drizzle ANY(...) interpolation in the pre-delete event-row lookup with inArray(), while preserving authenticated-user scoping.
  • Keep recursive descendant discovery, child-first transactional deletion, cache eviction, ingest Durable Object cleanup, and session.deleted emission unchanged. No architectural changes are introduced.
  • Add SQL-shape regression coverage for parent-and-child deletion plus the existing cleanup and event propagation behavior.

Comment thread services/session-ingest/src/routes/api.test.ts
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Jun 2, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

All previously flagged issues are resolved: api.ts now correctly builds a Map keyed by session_id and iterates orderedSessionIds for session.deleted event emission (child-first), and the test has been updated to properly validate that ordering against a deliberately out-of-order mock SELECT result.

Files Reviewed (2 files)
  • services/session-ingest/src/routes/api.ts — ✅ fixed (event emission now uses orderedSessionIds via Map lookup)
  • services/session-ingest/src/routes/api.test.ts — ✅ fixed (mock rows returned in non-ordered form; assertions verify child-first event order)

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 312,304 tokens

Review guidance: REVIEW.md from base branch main

@eshurakov eshurakov merged commit 695bfe7 into main Jun 2, 2026
13 checks passed
@eshurakov eshurakov deleted the axiomatic-stock branch June 2, 2026 11:52
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.

2 participants