Governed execution infrastructure.
Operational readiness gated by typed substrate. Refusal as a first-class outcome. Honest unknowns rendered as their own state.
Section 1 · Runtime readiness
Nine ordered blocker layers. Each typed, owned, and visible.
Orchestrate's readiness substrate is not a single status. It is nine canonical layers — billing, sending_domain, mailbox, provider_health, governance, continuity_window, pacing, campaign, data — each typed, each owned (client, orchestrate, or operator), each rendering its substrate facts in mono enum form.
The CanonicalBlockerLayer enum is the canonical substrate. Each layer maps to a typed ReadinessBucket: ready_to_execute, executing, recovering, degraded, orchestrate_working, client_action_required, or orchestrate_blocked_internal. Seven buckets, derived deterministically from thirteen finer ManagedExecutionState values via stateToBucket().
An operator looking at a tenant sees the substrate state at every layer at once. A degraded reputation reads as DEGRADED on the pacing layer. A missing import reads as CLIENT_ACTION_REQUIRED on the data layer. The substrate doesn't average across layers; each layer answers honestly.
- billingSubscription + payment method state
- sending_domainSPF / DKIM / DMARC verification
- mailboxOAuth scope + capability + identity class
- provider_healthAI provider reachability + latency
- governanceMode resolution + sector + tenant preference
- continuity_windowExecution window + run cadence
- pacingReputation + cooldown + throttle
- campaignCampaign state + template health + source bindings
- dataLead queue + import recency + import due
orchestrate_backend/src/runtime-truth/runtime-truth.types.ts + operational-readiness/operational-readiness.types.ts
Section 2 · Diagnostics visibility
Honest unknowns. Verification has three states, not two.
Most operational systems collapse verification into pass-or-fail and call partial knowledge an error. Our substrate treats unknown as a legitimate state — the substrate doesn't yet know, and the right behavior is to say so.
The triad
- PASSVerified — substrate-confirmed
- FAILExplicitly failed
- UNKNOWNSubstrate cannot yet evaluate — not failure, not pass
When the substrate doesn't know, it says so. A coerced pass on an unverified gate is a lie that compounds downstream.
Why this matters
An optimistic pass on DMARC sends mail before the domain is actually verified, damaging reputation when the eventual evaluation returns fail. An honest unknown holds the send until the substrate has substantively confirmed the state.
The substrate's CanonicalDnsCheck = 'pass' | 'fail' | 'unknown' triad applies to every verification surface in Orchestrate. Audit reconstructions show what the substrate honestly believed at each moment. Operator cognition stays accurate. Procurement reviewers see substrate honesty in the type itself.
orchestrate_backend/src/runtime-truth/runtime-truth.types.ts + deliverability/sending-identity.service.ts
Section 3 · Enforcement governance
Eight questions. Seven outcomes. Five do not send.
Before any outbound send proceeds, the dispatch governance service answers eight rationale questions and tests ten hardest-gate-first blockers. Seven typed dispatch decisions are possible. Only two of them dispatch.
The eight rationale questions
- whyProspectWhy this lead
- whyNowWhy this moment
- whyMailboxWhy this sender
- whyCtaWhy this ask
- whyConfidenceWhy this evidence supports it
- whyToneWhy this voice
- whyDispatchSafeWhy safe to send
- whySilenceNotSaferWhy silence isn't the better choice
The seven dispatch decisions
APPROVE DEGRADE_AND_APPROVE
HOLD_FOR_CONTEXT HOLD_FOR_REPUTATION HOLD_FOR_REPLY_RISK HOLD_FOR_HUMAN_REVIEW
BLOCK
A held send is never silent. The rationale, blockers, operational status, and timestamp persist on every decision — approved, held, or blocked.
orchestrate_backend/src/governance/dispatch-governance.service.ts + governance-mode.ts
Section 4 · Execution continuity
Continuity is a window state, not a metric.
Orchestrate's continuity_window layer answers a substrate question, not a dashboard question: is the execution window open right now, when did the last run complete, when does the next run fire? The substrate is the truth.
Execution continuity isn't measured in "uptime percentage." It is rendered as substrate state. The continuity layer holds window.open as a typed boolean, lastRun as a UTC timestamp, nextRun as a scheduled UTC timestamp. Operators see this state directly; the substrate doesn't compute it into a vanity metric.
Recovery is a posture, not a transition. When pacing degrades, the substrate transitions to the recovering bucket and stays there until conditions substantively improve. There is no animation pretending recovery is faster than it is.
Run cadence
- window.openBoolean — is execution currently permitted
- lastRunUTC timestamp of last execution cycle
- nextRunUTC timestamp of next scheduled cycle
- windowReasonWhy open or closed — typed
orchestrate_backend/src/runtime-state/operational-status.ts
Section 5 · Operational trust
Risk can only escalate the governance mode. Never relax it.
Tenants choose a governance mode at install: autonomous, supervised, approval_required, or draft_only. Risk evaluation can move the mode toward more restrictive. It cannot move toward less restrictive. The substrate enforces this asymmetry at the type system.
The four modes
- autonomousRuntime decides and dispatches
- supervisedDispatches but flags for review
- approval_requiredHuman must approve before dispatch
- draft_onlyDrafts; never dispatches
Compounding
Two or more high risks compounding escalates the substrate to draft_only — the runtime drafts but does not dispatch. The substrate refuses to compromise this floor under any circumstance.
Tenant preference establishes the floor. Risk can only escalate above it. The runtime never relaxes the tenant's choice.
orchestrate_backend/src/governance/governance-mode.ts
Section 6 · Operator cognition
Holds route to operator workspace. Audit is metadata only.
When dispatch holds for human review or substantive intervention, the substrate routes the typed outcome to a dedicated operator workspace. The audit log captures every decision — and only metadata.
Audit log doctrine: metadata only — never credentials, never message bodies. The substrate persists what decided, when, why, with what blockers, in what governance mode — at no point does the audit log capture the substantive content of an outbound message or any authentication material.
This isn't a privacy feature retrofitted onto the audit log. It is the audit log's substrate doctrine. The schema enforces it. The procurement reviewer who reads this section verifies it by grepping the codebase.
Operator surface
The operator workspace renders the substrate state at three resolutions: per-tenant, per-source, per-decision. The same nine readiness layers visible to clients are visible to operators. The same seven dispatch decisions and the eight-question rationale persist for substantive operator review.
Operator intervention is itself substrate — typed audit edges flow from the operator's resolution back into the dispatch record. The operator does not act invisibly.
orchestrate_app/lib/features/operator_workspace/governance/audit_timeline_screen.dart
Section 7 · Runtime truth
Exactly one operational truth object. Deterministically fingerprinted.
CanonicalRuntimeTruth is the single canonical object that answers what is currently true. Constructed deterministically, fingerprinted for change detection, refreshed on a ~30-second cadence, and explicitly carrying the substrate's honest unknowns.
Most operational systems accumulate competing truth sources — caches, denormalized read models, snapshot tables. Each becomes its own claim, eventually inconsistent with the others. We resolved this at the architectural level: one truth object, one fingerprint, one source.
Every diagnostic surface, every operator decision, every customer-facing readiness display derives from this one object. Read models and caches exist for performance — they are derived from the truth, not parallel to it.
There must be exactly one operational truth object. The fingerprint changes only when something substantively changes. Honest unknowns are first-class state.
The fingerprint enables O(1) change detection across the system. Consumers ask did the truth I care about change? If yes, recompute. If no, the previous result is still valid. The fingerprint is the substrate's epoch counter.
orchestrate_backend/src/runtime-truth/runtime-truth.types.ts
Architecture canon
Read the substrate.
Every claim on this page traces to real backend code. The architecture canon is the substrate, documented openly. Procurement reviewers, substantive engineers, sectoral peers — read substantively.