Store Access Pattern Map — IntegrateWise Services
Generated 2026-07-31. Covers: spine, pipeline, knowledge, intelligence, mcp-connector, continuity, workflow.
D1 Database Inventory
| Database Name | Binding Name | DB ID | Used By |
|---|---|---|---|
| integratewise-spine-staging | DB | 6a8b5b3c... | spine (dev/test) |
| integratewise-spine-prod | DB | 08d9f306... | spine (prod) |
| integratewise-spine-cache | DB/CACHE_DB/D1 | ed1f534a... | pipeline, knowledge, intelligence, mcp-connector, continuity, workflow |
| integratewise-canonical-spine | CANONICAL_SPINE_DB | PLACEHOLDER | pipeline (not yet created) |
| integratewise-analytics | ANALYTICS_DB | b829f7b0... | workflow |
Per-Service Store Map
SPINE (services/spine/)
| Service | Store Type | Table/Namespace | R/W | Status |
|---|---|---|---|---|
| spine | D1 (DB → integratewise-spine-staging/prod) | connections | R/W | wired |
| spine | D1 (DB) | connectors | R/W | wired |
| spine | D1 (DB) | sync-jobs | R/W | wired |
| spine | D1 (DB) | webhooks | R/W | wired |
| spine | D1 (DB) | schemas | R/W | wired |
| spine | D1 (DB) | capabilities | R/W | wired |
| spine | D1 (DB) | timeline-events | R/W | wired |
| spine | Neon (FORTRESS_DATABASE_URL) | product.workbench_overview | R | wired |
| spine | Neon | product.workbench_definitions | R | wired |
| spine | Neon | spine.activities | R/W | wired |
| spine | Neon | spine.current_entities | R | wired |
| spine | Neon | knowledge.documents | R | wired (cross-schema read) |
| spine | Neon | continuity.memories | R | wired (cross-schema read) |
| spine | Neon | spine_connector_catalog | R | placeholder (test only) |
| spine | Neon | spine_connector_installations | R | placeholder (test only) |
| spine | Neon | governance_proposals | R | placeholder (test only) |
| spine | Neon | marketplace_packages | R | placeholder (test only) |
| spine | Neon | marketplace_package_versions | R | placeholder (test only) |
| spine | Neon | marketplace_installations | R | placeholder (test only) |
Service Bindings: None
PIPELINE (services/pipeline/)
| Service | Store Type | Table/Namespace | R/W | Status |
|---|---|---|---|---|
| pipeline | D1 (CACHE_DB → spine-cache) | tenants | R | wired |
| pipeline | D1 (CANONICAL_SPINE_DB → canonical-spine) | spine_entities | R/W | placeholder (DB ID not created) |
| pipeline | D1 | spine_timeline | W | placeholder |
| pipeline | D1 | spine_relationships | W | placeholder |
| pipeline | D1 (DB — NO TOML BINDING) | entity_cache | R/W | broken (env.DB not bound in wrangler.toml) |
| pipeline | D1 | signal_cache | R/W | broken |
| pipeline | D1 | cross_data | R | broken |
| pipeline | D1 | decide_data | R | broken |
| pipeline | D1 | governance_data | R/W | broken |
| pipeline | D1 | merge_candidates | R/W | broken |
| pipeline | D1 | entity_signatures | R | broken |
| pipeline | D1 | agent_memory | R/W | broken |
| pipeline | D1 | signals | R/W | broken |
| pipeline | D1 | approval_queue | R/W | broken |
| pipeline | D1 | audit_log | W | broken |
| pipeline | D1 | spine_schema_registry | W | broken |
| pipeline | D1 | spine_vault | R/W | broken |
| pipeline | D1 | entities | R | broken |
| pipeline | Neon (FORTRESS_DATABASE_URL via Supabase REST) | entities | R | wired |
| pipeline | Neon | entity_merges | W | wired |
| pipeline | Neon | normalization_errors | W | wired |
| pipeline | KV (CACHE) | entity:{tid}:{source}:{id} | R/W | wired |
| pipeline | KV (CACHE) | agent:memory:* | R/W | wired |
| pipeline | KV (SIGNAL_CACHE) | signal:* | W | wired |
| pipeline | KV (METRICS) | last_pipeline | W | wired |
| pipeline | KV (SCHEMA_CACHE) | — | — | wired (same ns as CACHE) |
| pipeline | Queue | pipeline-process | Produce+Consume | wired |
| pipeline | Queue | knowledge-ingest | Produce | wired |
| pipeline | Queue | accelerator-trigger | Produce+Consume | wired |
| pipeline | Queue | intelligence-events | Produce | wired |
| pipeline | Queue | ops-dlq | Produce | wired |
| pipeline | Queue | signals | Produce | wired |
| pipeline | Queue | memory-promote | Produce+Consume | wired |
| pipeline | Workers AI (AI) | — | — | wired |
Service Bindings: KNOWLEDGE, MCP (mcp-connector), INTELLIGENCE, SPINE (self in test/prod), BFF (workflow)
KNOWLEDGE (services/knowledge/)
| Service | Store Type | Table/Namespace | R/W | Status |
|---|---|---|---|---|
| knowledge | D1 (DB → spine-cache) | document_chunks | R/W | wired |
| knowledge | D1 (DB) | search_history | W | wired |
| knowledge | D1 (DB) | consolidated_memories | R/W | wired |
| knowledge | D1 (DB) | embeddings | R/W | wired |
| knowledge | D1 (DB) | ai_sessions | R/W | wired |
| knowledge | D1 (DB) | ai_session_memories | R/W | wired |
| knowledge | D1 (DB) | ai_conversations | R/W | wired |
| knowledge | D1 (DB) | ai_messages | R/W | wired |
| knowledge | D1 (DB) | ai_memories | R/W | wired |
| knowledge | D1 (DB) | org_memory | R | wired |
| knowledge | D1 (DB) | personal_memory | R | wired |
| knowledge | D1 (DB) | conversational_memory | R | wired |
| knowledge | D1 (DB) | triage_results | W | wired |
| knowledge | D1 (DB) | tenant_spine_config | R | wired |
| knowledge | R2 (FILES → integratewise-files-prod) | file blobs | R/W | wired |
| knowledge | KV (STATE → d546c00b...) | consolidator state | R/W | wired |
| knowledge | AI Search (VECTORIZE_INDEX → integratewise-knowledge) | vector index | R/W | wired |
| knowledge | Workers AI (AI) | embeddings | — | wired |
| knowledge | Queue | knowledge-ingest | Consume | wired |
| knowledge | Queue | memory-consolidation-tasks | Consume+Produce | wired |
| knowledge | DO (CONSOLIDATOR — MemoryConsolidator) | coordination | R/W | wired |
Service Bindings: PIPELINE, THINK (intelligence), IQ_HUB (self)
INTELLIGENCE (services/intelligence/)
| Service | Store Type | Table/Namespace | R/W | Status |
|---|---|---|---|---|
| intelligence | D1 (D1 → spine-cache) | cross_data | R | wired |
| intelligence | D1 | governance_data | R/W | wired |
| intelligence | D1 | continuity_loop | R/W | wired |
| intelligence | D1 | agent_decisions | W | wired |
| intelligence | D1 | audit_logs | W | wired |
| intelligence | D1 | dlq_entries | W | wired |
| intelligence | D1 | conversational_memory | R/W | wired |
| intelligence | D1 | personal_memory | R | wired |
| intelligence | D1 | signal_rules | R | wired |
| intelligence | D1 | situation_escalation_rules | R | wired |
| intelligence | D1 | ai_insights_buffer | R | wired |
| intelligence | D1 | evidence_refs | W | wired |
| intelligence | D1 | signals | R/W | wired |
| intelligence | D1 | spine_metrics | R | wired |
| intelligence | D1 | events | R | wired |
| intelligence | D1 | artifact_links | R | wired |
| intelligence | D1 | emails | R | wired |
| intelligence | D1 | drive_files | R | wired |
| intelligence | D1 | brainstorm_sessions | R | wired |
| intelligence | D1 | brainstorm_insights | R | wired |
| intelligence | D1 | situations | W | wired |
| intelligence | D1 | action_proposals | W | wired |
| intelligence | D1 | decision_memory | R/W | wired |
| intelligence | D1 | decision_patterns | R | wired |
| intelligence | D1 | source_reliability | R/W | wired |
| intelligence | D1 | trust_scores | R | wired |
| intelligence | D1 | autonomy_overrides | R/W | wired |
| intelligence | D1 | ai_session_memories | R | wired |
| intelligence | D1 | document_chunks | R | wired |
| intelligence | D1 | ai_sessions | R | wired |
| intelligence | D1 | session_entity_links | W | wired |
| intelligence | Neon (DATABASE_URL via @neondatabase/serverless) | governance_policies | R/W | wired |
| intelligence | Neon | actions | R/W | wired |
| intelligence | Neon (FORTRESS_DATABASE_URL via Supabase REST) | tenant_spine_config | R | wired |
| intelligence | Supabase REST | audit_log | W | wired |
| intelligence | Supabase REST | ai_config | R/W | wired |
| intelligence | Supabase REST | decision_memory | W | wired |
| intelligence | Supabase REST | rule_effectiveness | R/W | wired |
| intelligence | Supabase REST | drift_events | W | wired |
| intelligence | R2 (FILES → integratewise-files-prod) | memory content | R/W | wired |
| intelligence | AI Search (AI_SEARCH → integratewise-intelligence) | semantic index | R/W | wired |
| intelligence | Workers AI (AI) | inference | — | wired |
| intelligence | Queue | pipeline-process | Produce | wired |
| intelligence | Queue | intelligence-act | Produce+Consume | wired |
| intelligence | Queue | ops-dlq | Produce+Consume | wired |
| intelligence | Queue | signals | Consume | wired |
| intelligence | Queue | memory-promote | Produce | wired |
| intelligence | DO (HANDOFF_TIMEOUT — HandoffTimeoutDO) | timeout tracking | R/W | wired |
| intelligence | Workflow (TRIAGE_WORKFLOW) | TriageWorkflow | — | wired |
| intelligence | Workflow (AGENT_COLONY) | BulkCleanupSwarm | — | wired |
Service Bindings: CONNECTOR, WORKFLOW, KNOWLEDGE, PIPELINE
MCP-CONNECTOR (services/mcp-connector/)
| Service | Store Type | Table/Namespace | R/W | Status |
|---|---|---|---|---|
| mcp-connector | D1 (DB → spine-cache) | users | R | wired |
| mcp-connector | D1 (DB) | tenant_spine_config | R/W | wired |
| mcp-connector | D1 (DB) | agent_registry | R/W | wired |
| mcp-connector | D1 (DB) | connector_catalog | R | wired |
| mcp-connector | D1 (DB) | context_boundaries | W | wired |
| mcp-connector | D1 (DB) | context_exchange_log | W | wired |
| mcp-connector | D1 (DB) | active_work_context | R/W | wired |
| mcp-connector | D1 (DB) | agent_communication_log | R/W | wired |
| mcp-connector | D1 (DB) | handoff_packages | W | wired |
| mcp-connector | D1 (DB) | handoff_state_log | W | wired |
| mcp-connector | D1 (DB) | proposals | R/W | wired |
| mcp-connector | D1 (DB) | oauth_refresh_tokens | R/W | wired |
| mcp-connector | D1 (DB) | oauth_clients | R/W | wired |
| mcp-connector | D1 (DB) | spine_entities | R | wired |
| mcp-connector | D1 (DB) | signals | R | wired |
| mcp-connector | D1 (DB) | kb_artifacts | R | wired |
| mcp-connector | D1 (DB) | kb_topic_policies | R/W | wired |
| mcp-connector | D1 (DB) | spine_events | W | wired |
| mcp-connector | D1 (DB) | ai_sessions | R/W | wired |
| mcp-connector | D1 (DB) | ai_session_memories | W | wired |
| mcp-connector | D1 (DB) | session_entity_links | W | wired |
| mcp-connector | KV (MCP_IDEMPOTENCY → 16510bf2...) | idempotency keys | R/W | wired |
| mcp-connector | Queue | knowledge-ingest | Produce | wired |
| mcp-connector | Queue | pipeline-process | Produce | wired |
| mcp-connector | Neon (FORTRESS_DATABASE_URL) | auth/v1/jwks (JWT verification) | R | wired |
Service Bindings: KNOWLEDGE, CONTINUITY, PIPELINE, INTELLIGENCE, AGENT_RUNTIME
CONTINUITY (services/continuity/)
| Service | Store Type | Table/Namespace | R/W | Status |
|---|---|---|---|---|
| continuity | D1 (DB → spine-cache) | tenant_spine_config | R | wired |
| continuity | D1 (DB) | org_memory | R | wired |
| continuity | D1 (DB) | personal_memory | R | wired |
| continuity | R2 (FILES → integratewise-files-prod) | backup blobs | R/W | placeholder (D1→R2 export pending migration) |
| continuity | Queue (continuity-triage) | TASKS_QUEUE | Produce+Consume | wired |
Service Bindings: KNOWLEDGE, PIPELINE
WORKFLOW (services/workflow/)
| Service | Store Type | Table/Namespace | R/W | Status |
|---|---|---|---|---|
| workflow | D1 (DB → spine-cache) | tenant_spine_config | R/W | wired |
| workflow | D1 (DB) | spine_schema_registry | R | wired |
| workflow | D1 (DB) | connectors | R | wired |
| workflow | D1 (DB) | actions | R | wired |
| workflow | D1 (DB) | approval_queue | R/W | wired |
| workflow | D1 (DB) | audit_log | R/W | wired |
| workflow | D1 (DB) | tenant_onboarding_state | R/W | wired |
| workflow | D1 (DB) | sync_jobs | R | wired |
| workflow | D1 (DB) | entities | R | wired |
| workflow | D1 (DB) | decide_data | R | wired |
| workflow | D1 (DB) | bi_department_health | R | wired |
| workflow | D1 (DB) | bi_executive_metrics | R | wired |
| workflow | D1 (DB) | bi_founder_dashboard | R | wired |
| workflow | D1 (DB) | bi_cross_department_signals | R/W | wired |
| workflow | D1 (DB) | bi_strategic_decisions | R | wired |
| workflow | D1 (ANALYTICS_DB → integratewise-analytics) | conversion_events | R/W | wired |
| workflow | D1 (ANALYTICS_DB) | performance_metrics | R/W | wired |
| workflow | D1 (ANALYTICS_DB) | daily_aggregates | R/W | wired |
| workflow | D1 (ANALYTICS_DB) | funnel_sessions | R | wired |
| workflow | D1 (ANALYTICS_DB) | ab_test_assignments | R | wired |
| workflow | KV (CONNECTION_META → 39608aa6...) | WebSocket metadata | R/W | wired |
| workflow | KV (RATE_LIMIT → 8f61d841...) | rate limiting | R/W | wired |
| workflow | KV (VIEW_CACHE — NOT IN WRANGLER.TOML) | view cache | R/W | broken (binding missing) |
| workflow | DO (HITL_GATE) | HITL approval state | R/W | wired |
| workflow | DO (SIGNAL_STREAM) | real-time signals | R/W | wired |
| workflow | DO (PRESENCE) | user presence | R/W | wired |
| workflow | DO (ROOM) | room state | R/W | wired |
| workflow | Neon (FORTRESS_DATABASE_URL) | Supabase auth/v1/user | R | wired |
| workflow | Queue | intelligence-act | Produce | wired |
Service Bindings: SPINE (→ pipeline), CONNECTOR, CONNECTOR_SYNC, KNOWLEDGE, THINK (→ intelligence), ACT (→ intelligence)
Cross-Service D1 Table Ownership
| D1 Table | Writers | Readers | Notes |
|---|---|---|---|
| spine-cache.tenant_spine_config | pipeline, workflow, mcp-connector | continuity, knowledge, intelligence | Multi-writer conflict risk |
| spine-cache.entities | pipeline | workflow | |
| spine-cache.signals | pipeline, intelligence | mcp-connector, pipeline | |
| spine-cache.approval_queue | pipeline, intelligence | workflow, mcp-connector | |
| spine-cache.audit_log | pipeline, intelligence, workflow | workflow | |
| spine-cache.governance_data | pipeline, intelligence | workflow, mcp-connector | |
| spine-cache.cross_data | pipeline | intelligence | |
| spine-cache.decide_data | pipeline | intelligence, workflow | |
| spine-cache.document_chunks | knowledge | intelligence | |
| spine-cache.ai_sessions | knowledge, mcp-connector | intelligence, knowledge | |
| spine-cache.ai_session_memories | knowledge, mcp-connector | intelligence, knowledge | |
| spine-cache.conversational_memory | intelligence | knowledge | |
| spine-cache.personal_memory | — (placeholder?) | continuity, intelligence | No active writer found |
| spine-cache.org_memory | — (placeholder?) | continuity, knowledge | No active writer found |
| spine-cache.agent_registry | mcp-connector | mcp-connector | |
| spine-cache.connector_catalog | — (placeholder?) | workflow, mcp-connector | No active writer found |
| spine-cache.context_boundaries | mcp-connector | mcp-connector | |
| spine-cache.kb_artifacts | — (placeholder?) | mcp-connector | No active writer found |
| spine-cache.kb_topic_policies | mcp-connector | mcp-connector | |
| spine-cache.oauth_clients | mcp-connector | mcp-connector | |
| spine-cache.oauth_refresh_tokens | mcp-connector | mcp-connector | |
| spine-cache.spine_events | mcp-connector | mcp-connector | |
| spine-cache.spine_entities | pipeline (canonical) | mcp-connector | |
| spine-cache.spine_schema_registry | pipeline | workflow | |
| spine-cache.merge_candidates | pipeline | pipeline | |
| spine-cache.entity_signatures | pipeline | pipeline | |
| spine-cache.entity_cache | pipeline | pipeline | |
| spine-cache.signal_cache | pipeline | pipeline, intelligence | |
| spine-cache.agent_memory | pipeline | pipeline | |
| spine-cache.spine_vault | pipeline | pipeline | |
| spine-cache.actions | intelligence (govern) | workflow, intelligence | |
| spine-cache.evidence_refs | intelligence | intelligence | |
| spine-cache.situations | intelligence | intelligence | |
| spine-cache.action_proposals | intelligence | intelligence | |
| spine-cache.agent_decisions | intelligence | intelligence | |
| spine-cache.continuity_loop | intelligence | intelligence | |
| spine-cache.decision_memory | intelligence | intelligence | |
| spine-cache.source_reliability | intelligence | intelligence | |
| spine-cache.trust_scores | intelligence | intelligence | |
| spine-cache.autonomy_overrides | intelligence | intelligence | |
| spine-cache.signal_rules | intelligence | intelligence | |
| spine-cache.situation_escalation_rules | intelligence | intelligence | |
| spine-cache.ai_insights_buffer | intelligence | intelligence | |
| spine-cache.dlq_entries | intelligence | intelligence | |
| spine-cache.spine_metrics | — (placeholder?) | intelligence | No active writer found |
| spine-cache.events | — (placeholder?) | intelligence | No active writer found |
| spine-cache.artifact_links | — (placeholder?) | intelligence | No active writer found |
| spine-cache.emails | — (placeholder?) | intelligence | No active writer found |
| spine-cache.drive_files | — (placeholder?) | intelligence | No active writer found |
| spine-cache.brainstorm_sessions | — (placeholder?) | intelligence | No active writer found |
| spine-cache.brainstorm_insights | — (placeholder?) | intelligence | No active writer found |
| spine-cache.session_entity_links | mcp-connector, intelligence | — | |
| spine-cache.tenant_onboarding_state | workflow | workflow | |
| spine-cache.sync_jobs | — (placeholder?) | workflow | No active writer found |
| spine-cache.bi_department_health | — (placeholder?) | workflow | No active writer found |
| spine-cache.bi_executive_metrics | — (placeholder?) | workflow | No active writer found |
| spine-cache.bi_founder_dashboard | — (placeholder?) | workflow | No active writer found |
| spine-cache.bi_cross_department_signals | — (placeholder?) | workflow | No active writer found |
| spine-cache.bi_strategic_decisions | — (placeholder?) | workflow | No active writer found |
| spine-cache.document_chunks | knowledge | knowledge, intelligence | |
| spine-cache.search_history | knowledge | knowledge | |
| spine-cache.consolidated_memories | knowledge | knowledge | |
| spine-cache.embeddings | knowledge | knowledge | |
| spine-cache.ai_conversations | knowledge | knowledge | |
| spine-cache.ai_messages | knowledge | knowledge | |
| spine-cache.ai_memories | knowledge | knowledge | |
| spine-cache.triage_results | knowledge | knowledge | |
| canonical-spine.spine_entities | pipeline | pipeline | PLACEHOLDER — DB not created |
| canonical-spine.spine_timeline | pipeline | pipeline | PLACEHOLDER |
| canonical-spine.spine_relationships | pipeline | pipeline | PLACEHOLDER |
| spine.productions.connections | spine | spine | |
| spine.productions.connectors | spine | spine | |
| spine.productions.sync-jobs | spine | spine | |
| spine.productions.webhooks | spine | spine | |
| spine.productions.schemas | spine | spine | |
| spine.productions.capabilities | spine | spine | |
| spine.productions.timeline-events | spine | spine | |
| analytics.conversion_events | workflow | workflow | |
| analytics.performance_metrics | workflow | workflow | |
| analytics.daily_aggregates | workflow | workflow | |
| analytics.funnel_sessions | — (placeholder?) | workflow | No active writer found |
| analytics.ab_test_assignments | — (placeholder?) | workflow | No active writer found |
| Neon.governance_policies | intelligence | intelligence | |
| Neon.actions | intelligence | intelligence |
Issues Found
-
PIPELINE
env.DB— BROKEN BINDING: pipeline/src/spine/index.ts and entity360-assembler.ts referenceenv.DBbut wrangler.toml only definesCACHE_DBandCANONICAL_SPINE_DB. TheDBbinding for D1 is missing → entity_cache, signal_cache, cross_data, and 10+ other tables are inaccessible. -
PIPELINE CANONICAL_SPINE_DB — PLACEHOLDER: database_id = "YOUR_D1_DATABASE_ID_HERE" — the canonical spine D1 was never created.
-
WORKFLOW
VIEW_CACHE— BROKEN BINDING: views.ts usesenv.VIEW_CACHE.get/putbut wrangler.toml has no VIEW_CACHE KV binding. -
MULTI-WRITER CONFLICT on
tenant_spine_config: pipeline, workflow, and mcp-connector all write to the same D1 table. No locking or conflict resolution strategy visible. -
ORPHAN TABLE READERS: Multiple tables have readers but no visible writers (spinemetrics, events, artifact_links, emails, drive_files, brainstorm_, bi__, sync_jobs, funnel_sessions, ab_test_assignments, org_memory, personal_memory, connector_catalog, kb_artifacts). These are either populated by external processes, migrations not yet run, or are dead code.
-
CONTINUITY R2 — PLACEHOLDER: The R2 backup export is commented as "pending AI Search migration" (line 735 of continuity/src/index.ts).
-
SHARED D1 DATABASE: 6 of 7 services share the same
integratewise-spine-cacheD1 database, creating contention and making table ownership unclear.