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

PrimitivePurpose
WorkersCompute, routing, ingress
D1Structured relational state
KVDerived, reconstructable views
R2Immutable large binaries
QueuesAsync processing and retry
Durable ObjectsReal-time consistency and session state

3. Communication Hierarchy

  1. In-process function call
  2. Repository — D1/KV/R2/DO
  3. Service binding — same-account Worker
  4. Queue — async propagation
  5. External HTTP — browser/SaaS boundary only

Anti-pattern: Worker-to-Worker HTTP on the same account.


4. Naming Separation

Product BrandRuntime ContractInfrastructure Binding
IW-Continuity-BridgeContext GatewayCloudflare Workers Ingress
TwinTwin Runtime EngineDurable Object Interaction Loop
Action CenterCapability Execution InterfaceWorker Async Queue Routing
Automated Delivery EngineExecution PlatformHermes 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_id even 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

  1. External HTTP is allowed only at browser/SaaS boundary.
  2. Internal state flows through repositories or service bindings.
  3. Runtime identity never leaks into product branding.
  4. Infrastructure choices are replaceable without changing product contracts.