Skip to content

[comp] Production Deploy#3105

Merged
tofikwest merged 3 commits into
releasefrom
main
Jun 11, 2026
Merged

[comp] Production Deploy#3105
tofikwest merged 3 commits into
releasefrom
main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Scope Assistant Chat to a membership-verified organization to prevent cross-tenant history mix-ups and ensure tools run in the org the user is viewing. Adds a server resolver and updates the client to send X-Organization-Id on every call.

  • Bug Fixes
    • Introduced resolveAssistantChatContext to read X-Organization-Id; when it differs from the session org, re-verify active membership and app:read, else 403; falls back to the session org when absent.
    • Routed completions and history (GET/PUT/DELETE) through the resolver; added logging when requested org differs.
    • Set Cache-Control: no-store on GET history to prevent caching.
    • Client now sends X-Organization-Id per request; history saves/flushes are keyed by the snapshot’s own org to avoid cross-tenant writes.
    • Added unit tests covering header parsing, membership checks, permission checks, and fallback behavior.

Written for commit 29bdd6e. Summary will update on new commits.

Review in cubic

github-actions Bot and others added 3 commits June 11, 2026 00:50
The Ask AI assistant scoped its (per-org, per-user) Redis storage by the
session's ambient activeOrganizationId. The chat lives in the persistent
app shell while the client tracks the URL org, so for multi-org users the
two could diverge — letting one org's chat be read or written under
another org's key (cross-tenant history exposure).

Scope every chat op by an explicit, membership-verified org instead:

- Add resolveAssistantChatContext: reads X-Organization-Id; when it
  differs from the session active org, re-verifies active membership +
  app:read before scoping (else 403); falls back to the active org when
  absent (backward compatible).
- Route completions + GET/PUT/DELETE history through it; add
  Cache-Control: no-store to GET history; log when orgs diverge.
- chat.tsx sends the org on every call — the flush PUT keys by the
  snapshot's own org (the contamination fix) and completions uses a
  ref-based header so the AI's tools scope to the viewed org.
- Add 8 unit tests for the resolver.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s-tenant

fix(assistant-chat): scope chat to membership-verified org (cross-tenant history leak)
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Jun 11, 2026 5:45pm
comp-framework-editor (staging) Ready Ready Preview, Comment Jun 11, 2026 5:45pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Jun 11, 2026 5:45pm

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@tofikwest tofikwest merged commit b52434e into release Jun 11, 2026
14 checks passed
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.78.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants