Skip to content

fix: harden multi-tenant isolation after PR #291 merge review - #292

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/overall-code-stability-d141
Draft

fix: harden multi-tenant isolation after PR #291 merge review#292
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/overall-code-stability-d141

Conversation

@cursor

@cursor cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Post-merge stability review of PR #291 (multi-tenant SaaS isolation) found several tenant scoping gaps. This PR closes them without changing public API shapes.

Type

  • fix — bug fix

Changes

  • Move rate limiting after auth middleware so tier quotas use auth-resolved tenant, not spoofable X-Tenant-ID headers
  • Scope analytics, chains, and reviews handlers to effectiveTenantID(r)
  • Enforce tenant ownership checks on skill/chain/review get/update/delete/execute paths
  • Use requestContextWithTenant(r) for memory update, history, version restore (fixes broken updates for non-default tenants)
  • Add X-Tenant-ID to CORS allowlist (api.go + session.go)
  • Propagate TenantID on types.Review for review isolation checks

Testing

go build ./...
go test -short ./...
go vet ./...
  • Built locally
  • All Go tests pass (including new tenant isolation tests)
  • Dashboard + landing builds pass
  • Node SDK typecheck/build pass
  • Python SDK ruff + pytest pass (17 passed)
  • Mintlify docs validate

Deploy impact

  • API (api.hystersis.com)
  • Landing
  • Docs
  • Dashboard

Agent notes

Cloud Agent PR on cursor/* — auto-merge when CI Success passes.

Open in Web View Automation 

Move rate limiting after auth so tier quotas use resolved tenant, not
spoofable X-Tenant-ID headers. Scope analytics, chains, and reviews to
effectiveTenantID; enforce tenant checks on skill/chain/review CRUD;
use requestContextWithTenant for memory update/history/restore paths;
add X-Tenant-ID to CORS allowlist; propagate TenantID on Review type.

Co-authored-by: Himan <Himan-D@users.noreply.github.com>
@ecc-tools

ecc-tools Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
agent-memorydash a0d8b4b Jul 17 2026, 05:53 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
hystersis-app a0d8b4b Jul 17 2026, 05:58 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
hystersis-docs a0d8b4b Jul 17 2026, 06:01 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
agent-memory a0d8b4b Jul 17 2026, 06:04 PM

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.

1 participant