Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .server-changes/run-ops-split-webapp-foundation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
area: webapp
type: feature
---
Add the run-ops database split webapp foundation — DB topology/flag wiring, split-mode gating, distinct-DB and native-realtime boot interlocks, and a cache-first control-plane resolver with cache invalidation on env/org writes — all inert until the split is enabled.
4 changes: 2 additions & 2 deletions apps/webapp/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ const signal = getRequestAbortSignal();
Access via `env` export from `app/env.server.ts`. **Never use `process.env` directly.**

For testable code, **never import env.server.ts** in test files. Pass configuration as options instead:
- `realtimeClient.server.ts` (testable service, takes config as constructor arg)
- `realtimeClientGlobal.server.ts` (creates singleton with env config)
- `realtime/nativeRealtimeClient.server.ts` (testable service, takes config as constructor arg)
- `realtime/nativeRealtimeClientInstance.server.ts` (creates singleton with env config)

## Run Engine 2.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { prisma } from "~/db.server";
import { env } from "~/env.server";
import { logger } from "~/services/logger.server";
import { type Duration } from "~/services/rateLimiter.server";
import { controlPlaneResolver } from "~/v3/runOpsMigration/controlPlaneResolver.server";
import { API_RATE_LIMIT_INTENT } from "./ApiRateLimitSection";
import {
handleRateLimitAction,
Expand Down Expand Up @@ -31,6 +32,8 @@ export const apiRateLimitDomain: RateLimitDomain = {
where: { id: orgId },
data: { apiRateLimiterConfig: next as any },
});
// apiRateLimiterConfig is embedded in every env of the org; drop all its cached env rows.
controlPlaneResolver.invalidateOrganization(orgId);
logger.info("admin.backOffice.apiRateLimit", {
adminUserId,
orgId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { prisma } from "~/db.server";
import { env } from "~/env.server";
import { logger } from "~/services/logger.server";
import { type Duration } from "~/services/rateLimiter.server";
import { controlPlaneResolver } from "~/v3/runOpsMigration/controlPlaneResolver.server";
import { BATCH_RATE_LIMIT_INTENT } from "./BatchRateLimitSection";
import {
handleRateLimitAction,
Expand Down Expand Up @@ -31,6 +32,8 @@ export const batchRateLimitDomain: RateLimitDomain = {
where: { id: orgId },
data: { batchRateLimitConfig: next as any },
});
// batchRateLimitConfig is embedded in every env of the org; drop all its cached env rows.
controlPlaneResolver.invalidateOrganization(orgId);
logger.info("admin.backOffice.batchRateLimit", {
adminUserId,
orgId,
Expand Down
Loading
Loading