{"slug":"documentation/CANONICAL_RUNTIME_RESTORATION_PLAN","title":"Canonical Runtime Restoration Plan","section":"documentation","sectionLabel":"Documentation","status":"unclassified","type":"document","path":"documentation/CANONICAL_RUNTIME_RESTORATION_PLAN.mdx","bytes":4955,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n> **Status: PROPOSED**\n>\n> **Approved: NO**\n>\n> **Execution Authority: NONE**\n>\n> **Evidence Authority: `POST_STOP_FORENSIC_RECONCILIATION.md`**\n>\n> Historical annotation: the original status below claimed execution. No execution authority was granted, and this document must not be used as an operational instruction.\n\n**Original Status Claim**: Executing Recommendation D from Active Runtime Topology Audit — **NOT APPROVED / NOT AUTHORITATIVE**  \n**Target**: 18-Worker canonical architecture  \n**Original Action Claim**: Deploy only canonical services; document migration path for historical traffic — **PROPOSAL ONLY**\n\n---\n\n## Canonical 18-Worker Target\n\n```\n1.  gateway                    - API entry, routing, TLS, rate limiting\n2.  loader                     - Package loading, capability caching\n3.  normalizer                 - Data normalization, canonical ID resolution\n4.  schema-synthesis           - Schema inference, AI-driven generation\n5.  spine-writer               - Operational Spine write path, entity mutations\n6.  continuity                 - Continuity records, recovery, audit\n7.  governance                 - Approval chains, policy evaluation\n8.  hermes                     - Intelligent agent execution, decisions\n9.  knowledge                  - Knowledge graph, reasoning queries\n10. store                      - Data persistence, eventual consistency\n11. workflow                   - Automation orchestration, triggers\n12. webhook-ingress            - Inbound webhooks, routing, queuing\n13. mcp-connector              - MCP protocol bridge, tool invocation\n14. telemetry                  - Metrics, tracing, observability\n15. admin                      - Administrative operations, tenant mgmt\n16. tenants                    - Multi-tenancy context, isolation\n17. billing                    - Usage metering, subscription\n18. huggingface-inference      - Inference endpoint, model calls\n```\n\n---\n\n## Deployment Status\n\n### Already Deployed (Canonical)\n\n- continuity → `integratewise-continuity` ✓\n- hermes → `integratewise-hermes` ✓\n- knowledge → `integratewise-knowledge` ✓\n- store → `integratewise-store` ✓\n- workflow → `integratewise-workflow` ✓\n- webhook-ingress → `integratewise-webhook-ingress` ✓\n- mcp-connector → `integratewise-mcp-connector` ✓\n- admin → `integratewise-admin` ✓\n- tenants → `integratewise-tenants` ✓\n- billing → `integratewise-billing` ✓\n- normalizer → `integratewise-normalizer` ✓\n- loader → `integratewise-loader` ✓\n\n### Missing or Incorrectly Named (Must Deploy)\n\n- gateway → Deploy `integratewise-gateway` (canonical naming)\n- telemetry → Deploy production telemetry service (currently only staging exists)\n- spine-writer → **CRITICAL** - Not deployed; `integratewise-pipeline` exists but is legacy\n- schema-synthesis → **CRITICAL** - Not deployed; unknown implementation\n- governance → **CRITICAL** - Not deployed; `integratewise-govern` exists (wrong name)\n- huggingface-inference → **CRITICAL** - Not deployed; inference endpoint missing\n\n---\n\n## Migration Strategy\n\n### Phase 1: Canonicalize Naming (No Traffic Change)\n\nRedirect legacy bare names to canonical `integratewise-*` variants using service bindings or routes:\n\n- `gateway` → `integratewise-gateway`\n- `pipeline` → (route to `integratewise-pipeline` if needed, or mark for decommission)\n- `workflow` → `integratewise-workflow`\n- `knowledge` → `integratewise-knowledge`\n- `continuity` → `integratewise-continuity`\n\n### Phase 2: Deploy Missing Canonical Services\n\n1. Deploy `integratewise-gateway` if not already active\n2. Deploy `schema-synthesis` (new service)\n3. Deploy `governance` (replacing misnamed `govern`)\n4. Deploy production `telemetry` service\n5. Deploy `huggingface-inference` endpoint\n\n### Phase 3: Migrate Traffic (Observed)\n\n1. Inspect routes on legacy Workers to identify active endpoints\n2. Migrate routes from historical to canonical variants\n3. Update service bindings in canonical Workers to point to canonical targets\n4. Monitor logs for errors during migration\n\n### Phase 4: Decommission Historical Workers\n\n1. Confirm no active bindings depend on historical Workers\n2. Delete staging-only variants (`*-staging`, `*-test`)\n3. Delete developer instances (`misty-brook-99b1d`, `orange-*`, etc.)\n4. Delete duplicate legacy names (`gateway`, `pipeline`, `workflow` bare names)\n\n### Phase 5: Verify Canonical Topology\n\n1. List all remaining deployed Workers (should be ~18)\n2. Verify all canonical service bindings point to canonical targets\n3. Verify no active external traffic to historical Workers\n4. Confirm telemetry and observability working on canonical services\n\n---\n\n## Implementation\n\n**Current Status**: Awaiting execution  \n**Estimated Duration**: 2–4 hours (depending on route inspection effort)  \n**Risk**: LOW if historical Workers have no active bindings; HIGH if traffic is unknown\n"}