{"slug":"architecture/004-loader-runtime-only-canonical-writer","title":"ADR-004: Loader Runtime is the Only Canonical Writer","section":"architecture","sectionLabel":"Architecture","status":"unclassified","type":"document","path":"architecture/004-loader-runtime-only-canonical-writer.mdx","bytes":1181,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n**Status:** Accepted  \n**Date:** 2026-07-21  \n**Deciders:** Nirmal (Founder)\n\n---\n\n## Context\n\nThe Adaptive Spine is the canonical operational store. If multiple services write to it directly, data consistency and audit trails become impossible to maintain.\n\n## Decision\n\nThe **Loader Runtime** (connector → connector-sync → pipeline) is the **only path** for writing canonical operational entities to the Adaptive Spine. No other service, agent, or package may write directly to Spine tables.\n\nWrite path:\n\n```\nExternal System → Webhook/Polling → Connector → Pipeline → Spine (append-only)\n```\n\n## Consequences\n\n- **Positive:** Single write path enables consistent audit trails, conflict resolution, and data lineage.\n- **Negative:** All data ingestion must go through the Loader. Cannot write directly for quick fixes.\n- **Mitigation:** Loader supports batch operations and priority queues for urgent writes.\n\n## Evidence\n\n- `services/connector/` — OAuth, API key, webhook adapters\n- `services/connector-sync/` — Sync scheduling\n- `services/pipeline/src/canonical/canonical-writer.ts` — sole Spine writer\n"}