Unclassified
Runtime Constitution
Status: SUPERSEDED / ABSORBED — historical subsystem constitution. Current authority: INTEGRATEWISE_ARCHITECTURE.md v2.2.
Scope: Cloudflare runtime substrate, service primitives, communication hierarchy, and decommissioned infrastructure.
Canonical Owner: IntegrateWise Platform
Last Verified: 2026-07-20
1. Purpose
This document defines the runtime layer for IntegrateWise.
All Workers, storage, queues, and inter-service routing must follow this contract.
2. Primitives
| Primitive | Purpose |
|---|---|
| Workers | Compute, routing, ingress |
| D1 | Structured relational state |
| KV | Derived, reconstructable views |
| R2 | Immutable large binaries |
| Queues | Async processing and retry |
| Durable Objects | Real-time consistency and session state |
3. Communication Hierarchy
- In-process function call
- Repository — D1/KV/R2/DO
- Service binding — same-account Worker
- Queue — async propagation
- External HTTP — browser/SaaS boundary only
Anti-pattern: Worker-to-Worker HTTP on the same account.
4. Naming Separation
| Product Brand | Runtime Contract | Infrastructure Binding |
|---|---|---|
| IW-Continuity-Bridge | Context Gateway | Cloudflare Workers Ingress |
| Twin | Twin Runtime Engine | Durable Object Interaction Loop |
| Action Center | Capability Execution Interface | Worker Async Queue Routing |
| Automated Delivery Engine | Execution Platform | Hermes Queue Processing Loop |
5. Tenant Isolation
- Each tenant receives an isolated D1 database via Workers for Platforms dispatch.
- Cross-tenant SQL access is eliminated because each tenant runtime is bound to a
different D1 database resource (independent database-resource isolation with
separate D1 namespaces, independent lifecycle controls, and encryption at rest). - Authorization remains necessary for user and workspace isolation within a tenant.
- Every durable D1 business record carries
tenant_ideven in a per-tenant database
(defense in depth, portable exports, forensic inspection). - Row-level partition verification is mandatory in Workspace Activation.
6. Decommissioned Infrastructure
- Supabase
- OpenWebUI
- n8n
- Python runtime services
- CouchDB
7. Invariants
- External HTTP is allowed only at browser/SaaS boundary.
- Internal state flows through repositories or service bindings.
- Runtime identity never leaks into product branding.
- Infrastructure choices are replaceable without changing product contracts.