hybrid-cloud-test-gen

Installation
SKILL.md

Hybrid Cloud Test Generation

This skill generates tests for Sentry's hybrid cloud architecture. It covers RPC services, API gateway proxying, outbox patterns, and endpoint silo decorators.

Critical Constraints

ALWAYS use factory methods (self.create_user(), self.create_organization()) — never Model.objects.create().

NEVER wrap factory method calls in assume_test_silo_mode or assume_test_silo_mode_of. Factories are silo-aware and handle silo mode internally. Only use silo mode context managers for direct ORM queries (Model.objects.get/filter/count/exists/delete).

ALWAYS use pytest-style assertions (assert x == y) — never self.assertEqual().

ALWAYS add tests to existing test files rather than creating new ones, unless no file exists for that module.

For cross-silo ORM access: use assume_test_silo_mode_of(Model) when accessing a single model (auto-detects silo). Use assume_test_silo_mode(SiloMode.X) when the block covers multiple models or non-model operations.

Use TestCase for most tests, including those using outbox_runner(). Only use TransactionTestCase when tests need real committed transactions (threading, concurrency, multi-process scenarios).

NEVER use from __future__ import annotations in test files that deal with RPC models.

Related skills
Installs
45
GitHub Stars
43.8K
First Seen
Feb 24, 2026