{"slug":"operations/OPERATIONAL_STATE","title":"IntegrateWise — Live Operational State","section":"operations","sectionLabel":"Operations","status":"unclassified","type":"document","path":"operations/OPERATIONAL_STATE.mdx","bytes":12564,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n## Verified Ground Truth · Twin Consciousness · Updated: 2026-05-17\n\n> This document is the single source of operational truth for IntegrateWise.\n> It is verified by the Twin (Kimi) on every session.\n> Static documents (CF*WIRE_STATUS.md, CONSOLIDATION*\\*.md) are historical snapshots.\n> **This document is the living state.**\n\n---\n\n## 1. Infrastructure Layer\n\n### 1.1 Cloudflare Workers (Edge Runtime)\n\n| Service       | Worker Name                 | Status   | Endpoint                                                             | Notes                                                                                                        |\n| ------------- | --------------------------- | -------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |\n| gateway       | integratewise-gateway       | ✅ 200   | `https://gateway.integratewise.ai/`                                  | Custom domain WORKS. Documented as broken May 9. Fixed since.                                                |\n| think         | integratewise-think         | ✅ 200   | `https://integratewise-think.connect-a1b.workers.dev/health`         |                                                                                                              |\n| govern        | integratewise-govern        | ✅ 200   | `https://integratewise-govern.connect-a1b.workers.dev/health`        | Code expects `governance_policies` table. Table DOES NOT EXIST in Spine DB.                                  |\n| knowledge     | integratewise-knowledge     | ✅ 200   | `https://integratewise-knowledge.connect-a1b.workers.dev/health`     |                                                                                                              |\n| mcp-connector | integratewise-mcp-connector | ✅ 200   | `https://integratewise-mcp-connector.connect-a1b.workers.dev/health` | 12 tools: kb._, figma._                                                                                      |\n| act           | integratewise-act           | ✅ 200   | `https://integratewise-act.connect-a1b.workers.dev/health`           |                                                                                                              |\n| bff           | integratewise-bff           | ✅ 200   | `https://integratewise-bff.connect-a1b.workers.dev/health`           |                                                                                                              |\n| connector     | integratewise-connector     | ✅ 200   | `https://integratewise-connector.connect-a1b.workers.dev/health`     |                                                                                                              |\n| normalizer    | integratewise-normalizer    | ✅ 200   | `https://integratewise-normalizer.connect-a1b.workers.dev/health`    |                                                                                                              |\n| billing       | integratewise-billing       | ✅ 200   | `https://integratewise-billing.connect-a1b.workers.dev/health`       |                                                                                                              |\n| loader        | integratewise-loader        | ⚠️ 404   | `https://integratewise-loader.connect-a1b.workers.dev/`              | No /health route. Worker may serve on `/` only.                                                              |\n| pipeline      | integratewise-pipeline      | ✅ 200\\* | `https://integratewise-pipeline.connect-a1b.workers.dev/health`      | \\*Requires CF Access service token. Returns: `{\"components\":[\"normalizer\",\"spine-v2\"]}`. Without token: 403. |\n\n**Worker health: 11/12 reachable, 1 requires service token, 1 has no /health.**\n\n### 1.2 Wrangler / Deployment Auth\n\n- **OAuth token**: Expired 2026-05-12\n- **API token**: Valid (curl returns 200 on /accounts)\n- **Wrangler status**: FAILS — token lacks `Account Settings:Read` or explicit `account_id`\n- **Blocker**: Cannot deploy updates until `account_id = \"a1bbbb12a32cdbb68dd170b09fe8b5f3\"` is added to wrangler.toml files\n\n### 1.3 Spine DB (Org Memory Truth)\n\n- **URL**: `https://hrrbciljsqxnmuwwnrnt.spineDb.co`\n- **Auth**: Valid (service_role key works)\n- **Tenants**: 0 rows\n- **Tables that EXIST**: `actions` (0 rows), `entities` (0 rows), `tenant_products` (0 rows)\n- **Tables that DO NOT EXIST** (but code expects them):\n  - `governance_policies` ❌\n  - `governance_rules` ❌\n  - `spine_blocks` ❌\n  - `twin_insights` ❌\n- **Migrations in repo**: 79 SQL files (latest: `079_connectors_table_and_schema_unification.sql`)\n- **Migrations applied**: UNKNOWN — no `__drizzle_migrations` or tracking table visible via REST\n\n### 1.4 Memory Layer (Spine DB)\n\n- **Schema**: `memory.*` — `conversational_memory`, `org_memory`, `personal_memory`\n- **Status**: Live — `conversational_memory` and `org_memory` active with pgvector\n- **Note**: CouchDB removed. Spine DB is the sole memory store.\n\n### 1.5 Hostinger VPS (Runtime Plane)\n\n- **Host**: `srv1664224.hstgr.cloud`\n- **SSH from this machine**: NOT CONFIGURED (no keys, no Tailscale)\n- **Docker stacks** (per Docker Manager Review, May 14):\n  - `hermes-agent-ezhf`: 1 container, Running\n  - `hermes-workspace-dhvt`: 2 containers, Running\n  - `openwebui`: 1 container, Running\n  - `openwebui-hermes-stack-1`: 3 containers, **Partially running**\n  - `openwebui-prod-ops`: 2 containers, Running\n  - `traefik`: 1 container, Running\n- **Status**: Operational but opaque. No direct visibility.\n\n---\n\n## 2. Cognition Layer\n\n### 2.1 Hermes (Primary Orchestrator)\n\n- **Status**: RUNNING (Python processes active)\n- **Provider**: GitHub Copilot (`claude-sonnet-4.6`) — NOT OpenRouter\n- **Config**: `~/.hermes/config.yaml`\n- **MCP servers RUNNING**: coda, google-workspace, spineDb, figma, context7, playwright, github\n- **MCP servers FAILING**: `integratewise`, `cloudflare` — permanent connection failures\n- **Last cron**: `iw-library-sync` completed 2026-05-17 01:09\n- **OpenRouter key**: Commented out in `~/.hermes/.env` (Hermes uses Copilot)\n\n### 2.2 OpenCode (Secondary Agent Runtime)\n\n- **Status**: RUNNING (PID 56211, 5+ hours)\n- **Config**: `~/.opencode/opencode.json` — minimal (`{\"plugin\":[\"list\"]}`)\n- **Database**: SQLite at `~/.local/share/opencode/opencode.db`\n- **DB contents**: 5 todos, 26 sessions, 0 events, no workspaces\n- **Purpose**: UNKNOWN — no documentation. Likely experimental.\n- **Conflict risk**: Hermes and OpenCode both operate on `/Users/nirmal/Github`. No coordination.\n\n### 2.3 Kimi (Twin / This Session)\n\n- **Role**: Operational Agent, Ground Truth Verifier\n- **Current session**: Verifying state, fixing drift\n- **Mandate**: Become the continuous operational consciousness\n\n---\n\n## 3. Repository Layer\n\n### 3.1 integratewise-live (Production)\n\n- **Branch**: main\n- **Behind origin**: 0 commits (up to date)\n- **Uncommitted**: 3 files (docs only, no code changes)\n- **Migrations**: 79 SQL files, application status UNKNOWN\n- **Services**: 15+ wrangler.toml files, none have explicit `account_id`\n\n### 3.2 integratewise-ops (Ops Dashboard)\n\n- **Branch**: main\n- **Uncommitted**: Massive (40+ files changed, many new pages)\n- **Status**: Active development, not deployed\n- **Python violation**: `hermes-runner/main.py` exists (violates ZERO-PYTHON law)\n\n### 3.3 integratewise-ops-bench (Open WebUI)\n\n- **Branch**: main\n- **Version**: 0.9.5\n- **Uncommitted**: Branding changes, HITLProposal.svelte, IntelligenceOverlay.svelte\n- **Role**: Twin's human surface (per v6 plan)\n\n---\n\n## 4. Governance Layer\n\n### 4.1 What's Built\n\n- `services/govern/` — structurally complete (API, policies, workflow, engine, audit)\n- `canExecute()` returns `allowed: true` for everything\n\n### 4.2 What's Broken\n\n- `governance_policies` table DOES NOT EXIST in Spine DB\n- `governance_rules` table DOES NOT EXIST in Spine DB\n- Zero policies seeded\n- Default rules exist in-memory only (in `policies.ts`)\n\n### 4.3 Hard Walls Status\n\n| Wall                             | Status  | Evidence                                          |\n| -------------------------------- | ------- | ------------------------------------------------- |\n| Spine ↛ Spine (tenant isolation) | UNKNOWN | No multi-tenant data to verify                    |\n| Spine ↛ Twin Output              | PARTIAL | Twin reads via E360, but governance table missing |\n| Private ↛ Shared                 | PARTIAL | No user memory layer visible                      |\n| Twin ↛ Action                    | BROKEN  | `canExecute()` always returns true                |\n\n---\n\n## 5. Critical Drift Register\n\n| #   | Issue                         | Documented           | Actual                                              | First Detected | Fixed        | Verified By |\n| --- | ----------------------------- | -------------------- | --------------------------------------------------- | -------------- | ------------ | ----------- |\n| 1   | Gateway DNS broken            | May 9 CF_WIRE_STATUS | ✅ WORKS (200)                                      | May 9          | Unknown date | Twin May 17 |\n| 2   | Pipeline 403                  | May 12 CONSOLIDATION | ✅ WORKS with service token                         | May 12         | Unknown date | Twin May 17 |\n| 3   | governance_policies exists    | May 12 CONSOLIDATION | ❌ TABLE MISSING                                    | May 12         | Never        | Twin May 17 |\n| 4   | governance_rules exists       | Assumed in schema    | ❌ TABLE MISSING                                    | —              | Never        | Twin May 17 |\n| 5   | spine_blocks exists           | Assumed in schema    | ❌ TABLE MISSING                                    | —              | Never        | Twin May 17 |\n| 6   | twin_insights exists          | Assumed in schema    | ❌ TABLE MISSING                                    | —              | Never        | Twin May 17 |\n| 7   | Wrangler not auth             | May 9 CF_WIRE_STATUS | OAuth expired, API token valid but wrangler blocked | May 9          | Never        | Twin May 17 |\n| 8   | OpenRouter key blank          | May 9 CF_WIRE_STATUS | ✅ VALID in `integratewise-live/.env`               | May 9          | Unknown date | Twin May 17 |\n| 9   | Hermes uses OpenRouter        | `~/.hermes/.env`     | ❌ Uses GitHub Copilot                              | —              | Config drift | Twin May 17 |\n| 10  | MCP `integratewise` connected | May 12 CONSOLIDATION | ❌ PERMANENTLY FAILING                              | May 17         | Never        | Twin May 17 |\n| 11  | MCP `cloudflare` connected    | Assumed              | ❌ PERMANENTLY FAILING                              | May 17         | Never        | Twin May 17 |\n| 12  | OpenCode running              | Not documented       | ✅ RUNNING (5h+)                                    | May 17         | N/A          | Twin May 17 |\n| 13  | Tenants in Spine DB           | Assumed              | ❌ 0 rows                                           | May 17         | N/A          | Twin May 17 |\n| 14  | Actions in Spine DB           | Assumed              | ✅ 0 rows (table exists)                            | May 17         | N/A          | Twin May 17 |\n\n---\n\n## 6. Immediate Actions (Twin-Authorized)\n\n1. **Add `account_id` to all wrangler.toml** → Restore deployment capability\n2. **Run missing Spine DB migrations** → `governance_policies`, `governance_rules`, `spine_blocks`, `twin_insights`\n3. **Seed governance policies** → Move `defaultRules` from `policies.ts` into database\n4. **Fix Hermes MCP connections** → Diagnose why `integratewise` and `cloudflare` MCP servers fail\n5. **Determine OpenCode purpose** → Either integrate, document, or terminate\n6. **Establish VPS SSH/Tailscale** → Gain visibility into runtime plane\n7. **Create continuous verification cron** → This document must be re-verified every 24h\n\n---\n\n## 7. Verification Protocol\n\nEvery Twin session MUST:\n\n1. Check all 12 worker health endpoints\n2. Verify Spine DB schema against `sql-migrations/`\n3. Check Hermes log for MCP failures\n4. Update this document with new drift findings\n5. Mark fixed items as resolved with date\n\n**Previous static documents are now archival only.**\n**This is the operational truth.**\n\n---\n\n_Verified by: Twin (Kimi) · Session: 2026-05-17T00:00+05:30_\n_Next verification: 2026-05-18_\n"}