Resource Isolation Audit Report
Date: 2026-07-30
Audit Tool: scripts/audit-resource-isolation.ts
Status: ๐จ DEPLOYMENT BLOCKED
Executive Summary
The automated resource isolation guard revealed 468 total violations across the entire platform:
- 45 Critical: Shared resource IDs between environments (test/prod sharing same resources)
- 423 Errors: Empty or placeholder resource IDs
- 0 Warnings: None
This represents a systemic violation of CLAUDE.md's hardest rule: "test and prod must never share KV namespaces, Queues, or D1 databases."
Critical Shared Resource Violations
Shared D1 Databases (6 unique IDs shared)
| Database ID | Shared By Services | Environments |
|---|---|---|
ed1f534a-df1e-4783-8a74-8d6d70d067ff | agent-registry, connector, connector-sync, continuity, folder-watcher, gateway, intelligence, iw-agent-runtime, knowledge, loader, mcp-connector, pipeline, spine, telemetry, tenants, twin-orchestrator, workflow | dev, test, prod |
6a8b5b3c-18c7-4d0e-aa10-20d0b71a1abc | spine | dev, test, prod |
b829f7b0-7889-43d5-ba65-5ff31a2be8d6 | workflow | dev, test, prod |
signal-db-prod | signals | dev, test, prod |
placeholder-marketplace-installation-db | marketplace-installation | dev, test, prod |
Shared KV Namespaces (14 unique IDs shared)
| Namespace ID | Shared By Services | Environments |
|---|---|---|
8f61d841d2574061ac1d547187d72a58 | gateway, hermes, workflow | dev, test, prod |
f7a3d773ff2841f7954d3cfeae82594f | connector, connector-sync, gateway, tenants, webhook-ingress | dev, test, prod |
16510bf2287a45d8b24163ddafd3d302 | connector, loader, mcp-connector | dev, test, prod |
18aa20dfeb304f0ba592d9070964dd31 | iw-agent-runtime, pipeline, twin-orchestrator | dev, test, prod |
747166a3165444d1a9c9c8c54abbd93a | gateway, pipeline | dev, test, prod |
e80ee409f5be4bf8a9556c0917c113e2 | gateway, pipeline | dev, test, prod |
d610b2da55bf437ba90444f93077e1c6 | gateway, tenants | dev, test, prod |
d546c00b8ee84d0497e4a4b3ac661db8 | knowledge | dev, test, prod |
194227e14a9844b896cebe6564af3ec1 | hermes | dev, test, prod |
5f0718b2fb7048cf97a077f9787651ee | billing | dev, test, prod |
39608aa63c5340bf953575dec34416ed | workflow | dev, test, prod |
Service-by-Service Violation Summary
| Service | Critical | Errors | Total | Status |
|---|---|---|---|---|
| agent-registry | 1 | 6 | 7 | ๐จ CRITICAL |
| billing | 1 | 6 | 7 | ๐จ CRITICAL |
| connector | 2 | 18 | 20 | ๐จ CRITICAL |
| connector-sync | 2 | 8 | 10 | ๐จ CRITICAL |
| continuity | 1 | 6 | 7 | ๐จ CRITICAL |
| folder-watcher | 1 | 6 | 7 | ๐จ CRITICAL |
| gateway | 6 | 27 | 33 | ๐จ CRITICAL |
| hermes | 2 | 6 | 8 | ๐จ CRITICAL |
| intelligence | 1 | 6 | 7 | ๐จ CRITICAL |
| iw-agent-runtime | 2 | 8 | 10 | ๐จ CRITICAL |
| knowledge | 2 | 18 | 20 | ๐จ CRITICAL |
| loader | 2 | 6 | 8 | ๐จ CRITICAL |
| marketplace-installation | 1 | 6 | 7 | ๐จ CRITICAL |
| mcp-connector | 2 | 8 | 10 | ๐จ CRITICAL |
| pipeline | 3 | 21 | 24 | ๐จ CRITICAL |
| schema-ai | 0 | 15 | 15 | โ ERROR |
| signals | 1 | 3 | 4 | ๐จ CRITICAL |
| spine | 1 | 3 | 4 | ๐จ CRITICAL |
| store | 0 | 6 | 6 | โ ERROR |
| task-management | 0 | 6 | 6 | โ ERROR |
| telemetry | 1 | 3 | 4 | ๐จ CRITICAL |
| tenants | 3 | 9 | 12 | ๐จ CRITICAL |
| twin-orchestrator | 2 | 12 | 14 | ๐จ CRITICAL |
| webhook-ingress | 1 | 3 | 4 | ๐จ CRITICAL |
| workflow | 4 | 12 | 16 | ๐จ CRITICAL |
Immediate Action Required
1. Fix Critical Shared Resource Violations
Priority 1: Create isolated D1 databases for each environment
- Create new D1 databases for test and prod environments
- Update wrangler.toml files with unique database IDs per environment
- Migrate data from shared databases to isolated ones
Priority 2: Create isolated KV namespaces for each environment
- Create new KV namespaces for test and prod environments
- Update wrangler.toml files with unique namespace IDs per environment
- Migrate data from shared namespaces to isolated ones
2. Fix Empty/Placeholder Resource IDs
Priority 3: Create missing resources
- Create all D1 databases referenced but not provisioned
- Create all KV namespaces referenced but not provisioned
- Create all Vectorize indexes referenced but not provisioned
Priority 4: Fix placeholder IDs
- Replace
placeholder-marketplace-installation-dbwith real D1 database ID - Replace any other placeholder IDs with real resource IDs
Most Critical Services (by violation count)
- gateway (33 violations) - Critical infrastructure, most violations
- pipeline (24 violations) - Core pipeline service
- connector (20 violations) - Connector management
- knowledge (20 violations) - Knowledge management
- workflow (16 violations) - Workflow orchestration
Deployment Impact
Current State: ๐จ DEPLOYMENT BLOCKED
- No deployments to test or prod environments can proceed
- Existing deployments are using shared resources (major security/data isolation risk)
- Resource conflicts will cause unpredictable behavior in multi-tenant scenarios
Required Before Any Deployment:
- Create all missing isolated resources
- Update all wrangler.toml files with correct resource IDs
- Run resource isolation audit again
- Get zero violations across all services
- Perform data migration from shared to isolated resources
- Test in development environment first
Root Cause Analysis
This situation represents a systemic process failure:
- Missing Resource Provisioning Process: No automated resource creation process
- Weak Resource Governance: No pre-deployment validation of resource isolation
- Manual Resource Management: Manual wrangler.toml editing without validation
- No Resource Inventory: No centralized tracking of resource allocation
Needed Process Improvements:
- โ Automated resource isolation guard (now exists)
- โณ Automated resource provisioning script
- โณ Resource inventory tracking system
- โณ Pre-deployment resource validation in CI/CD
- โณ Resource isolation policy enforcement
Next Steps
- Immediate: Implement resource provisioning script
- Short-term: Fix critical shared resource violations
- Medium-term: Implement comprehensive resource governance
- Long-term: Automated resource lifecycle management
Generated by: scripts/audit-resource-isolation.ts
Audit Date: 2026-07-30
Status: ๐จ DEPLOYMENT BLOCKED