fix(platform): stable block chat ids, held-listing sync status, session cleanup on account deletion - #7755
Merged
waleedlatif1 merged 3 commits intoSep 11, 2026
Conversation
The Sim block passed its Conversation ID input straight through as the copilot chat id. Builders use stable strings such as `customer-456` there, but every chat column in Sim is a uuid, so each read keyed by the id failed, and the copilot service keys conversations by id alone, so two workspaces choosing the same string shared one thread. Every conversation id is now mapped to a UUID v5 of `workspaceId:id` under a fixed namespace. The same value keeps the same thread, workspaces never collide, a block can only reach a chat it derived, and the literal value never leaves the executor. An omitted id mints a token that the block exposes so a chained block continues the thread. The fork feature's UUID v5 helper moves to a shared module.
Since #7477 `completeSuccessfulSync` folded `checkpoint.unsafe` into the same predicate as an unfinished listing and a failed source read, so every connector whose provider cannot promise a stable listing (Fireflies and Notion always, Gmail and Slack at their caps) was recorded as `partial` with a frozen `last_sync_at` even when every document listed. `unsafe` only ever meant "do not infer deletions from this listing", and the deletion hold in `reconcileCompletedListing` still honors it. One `isContentPassIncomplete` predicate now drives the sync-log status, the watermark advance, and the task outcome, and it excludes `unsafe`, restoring the pre-#7477 behavior at all four sites.
…wner Deleting an account removes the user and session rows, but the signed cookie cache keeps authenticating that browser for up to five minutes. The settings page then clears the query cache concurrently with signing out, every mounted query refetches, and the workspace list finds nothing and tries to create a default workspace for a user who no longer exists. The insert fails on the `workspace` -> `user` foreign key and surfaces as an unhandled 500 on roughly half of all deletions. The deletion response now clears the session cookies itself, so no later request from that browser carries them. The route builder keeps each cleared cookie on its own header line. Workspace creation classifies a user foreign key violation as `WorkspaceOwnerMissingError`, which both workspace routes answer with 401 instead of a logged fault.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
waleedlatif1
deleted the
fix/connector-status-chat-ids-deletion-session
branch
September 11, 2026 01:59
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.
Summary
workspaceId:id. Builder strings likecustomer-456no longer fail every uuid-keyed read, two workspaces using the same id no longer share a thread in the copilot store, and a block can only continue a chat it derived. The block still exposes the builder's own id so chaining keeps the thread. The fork feature's UUID v5 helper moves to a shared module.checkpoint.unsafe(provider cannot promise a stable listing) is back to gating only deletion reconciliation. Since feat(search): add organization search and private assistant #7477 it also marked the runpartialand frozelast_sync_at, so stable-but-unsafe providers (Fireflies, Notion search, capped Gmail/Slack) showed stale "last synced" and Partial rows on every run. OneisContentPassIncompletepredicate now drives status, watermark, and task outcome. Restores pre-feat(search): add organization search and private assistant #7477 behavior: KB sync history rows go back to Completed and the org Search overview stops flagging these sources as needing attention. Affected connectors self-correct on their next run.workspace→userFK violation on create is nowWorkspaceOwnerMissingError, answered 401 by both workspace routes instead of a logged 500.Rollout note
Type of Change
Testing
isContentPassIncompleteover all flag combinations, held pass completes with advanced watermark, classifier wiring, set-cookie append, deletion finalizer (success and swallowed failure), FK → typed error (plus negative case), GET auto-create → 401vitestover every touched area: 204 files / 2,981 tests passingbun run type-check,bun run lint,check:api-validation,check:audits(46/46),docs-manifest:checkall passingChecklist