044 provider runtime completion (pre-staged workstream): capacity/operator stores, provider ops/protocol/reconciler/dispatch revalidation, exploration sandbox runtime, alembic 0014-0016, live canary evidence (browser provider 6/6 against the live stand). 050 Phases 0-2: RBAC FastMCP server with a 45-tool explicit catalog, OAuth/DCR transport guards with bounded bodies, per-call provenance (McpToolInvocationRecord), durable ActionApprovalGate + CAS decide + leased/fenced poller, authoring workspace ops, bounded-response discipline, hidden-vs-gated matrices. Parity domains (T012-T014): gated git/deploy/migration/backup/llm tools with reviewed dispatch adapters in explicit poll chains; Superset reads/writes with a dedicated plugin:superset_sql risk class (terminal PROD denial via the canonical execution-policy criterion, hardened danger-SQL guard covering INTO/CALL/SET/REFRESH/file primitives/multi-statement); baseline 037 tools over the shared REST-surface services. Evidence (T016/T023/T028): REST-vs-MCP field parity on shared 037 fixtures; vertical E2E from tools/list through registry revision activation with real scenario:EDIT RBAC; sandbox-to-revision promotion E2E with unsafe-payload and caller-digest rejection; dispatcher soak (three poll cycles, exactly-once). Orthogonal QA+security audit hardening: enforced response_limit fail-closed envelope, poisoned-exploration fail-closed (EXPLORATION_TARGET_UNRESOLVED), sha256 exploration evidence digests, actor-UUID task ownership, is_active guard on baseline consume, 038 resolver description=None selector fix. Phase 3/4 decommission: HandoffSurface behind the MCP_DECOMMISSION flag, then unconditional removal — agent/ service tree, chat components/models/ stores/types, gradio proxies (vite + nginx), agent service in run.sh, docker-compose profiles, build.sh bundles; /agent renders the handoff only. Docs: AGENTS.md/INSTALL.md two-service rewrite; 036-047 drift amendments marked done; WORKSTATE checkpoints with all evidence. Suites: backend 11199 passed / 240 skipped / 1 xpassed; frontend 3454 passed (197 files), lint 0 errors, build OK; browser E2E login+handoff 6/6 twice on the isolated compose stack (no 7860); ruff/compileall clean. Misc: gitignore hardening (tmp/, tool model cache); E2E selector repairs (nav strict-mode, invalid-credentials passthrough detail).
4.8 KiB
4.8 KiB
@{ Doc.Adr.ADR0003 [C:1] [TYPE ADR]
@STATUS ACCEPTED
@BRIEF Definitively establish superset-tools as a standalone orchestrator service operating above Apache Superset environments rather than integrating into them. This is a repo‑shaping architectural decision that governs deployment topology, security boundary, release cycle independence, and technology stack freedom.
@RELATION DEPENDS_ON -> [Doc.Adr.ADR0001]
@RELATION CALLS -> [Doc.Adr.ADR0016]
@RELATION CALLS -> [Doc.Adr.ADR0005]
@RATIONALE The core value proposition of superset-tools is multi‑environment orchestration: moving dashboards, datasets, and configurations between independent Superset instances (Dev → Stage → Prod). Embedding this logic inside any single Superset instance would immediately create a "master controller" dependency — if that instance fails, all environment management is lost. An external orchestrator treats all Superset instances as equal endpoints.
@RATIONALE Technology stack mismatch is irreversible: Superset uses Flask + React, superset-tools uses FastAPI + SvelteKit. Integration would require rewriting the entire Svelte frontend into React components and refactoring FastAPI dependency injection into Flask-AppBuilder patterns — a multi‑month effort with zero business value and high regression risk.
@RATIONALE Release cycle independence is non‑negotiable: Superset has a slow, complex release cadence. superset-tools must ship LLM plugins, Git integrations, and backup features on its own schedule without waiting for upstream Superset releases or maintaining a fork with perpetual merge conflicts.
@RATIONALE Security isolation: superset-tools manages DevOps privileges (deployment, backup, migration) while Superset manages BI privileges (data viewing, chart creation). Mixing these in one system expands the blast radius of any security incident.
@REJECTED Integration as a Superset plugin/extension — rejected for the four reasons above (orchestrator topology break, 100% frontend rewrite, Superset release cycle coupling, privilege boundary collapse).
@REJECTED Superset fork with superset-tools baked in — rejected because maintaining a fork requires rebase on every Superset release, creating perpetual merge conflicts and making security patch adoption dangerously slow.
@REJECTED Shared database with Superset — rejected because it couples superset-tools migrations to Superset's Alembic migration chain, preventing independent schema evolution and creating a single point of failure for both systems.
Decision
superset-tools operates as a standalone orchestrator microservice with these defined boundaries:
Deployment Topology
┌─────────────┐
│ superset-tools │ ← FastAPI + SvelteKit
│ PostgreSQL │ ← Own database
└──────┬──────┘
│ REST API calls
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│Superset │ │Superset │ │Superset │
│ (Dev) │ │ (Stage) │ │ (Prod) │
└──────────┘ └──────────┘ └──────────┘
Key Architectural Properties
| Property | Decision |
|---|---|
| Topology | External orchestrator above all Superset instances |
| Communication | Superset REST API (bearer token auth per environment) |
| Database | Dedicated PostgreSQL 16 instance (not Superset metadata DB) |
| Frontend | SvelteKit SPA (not integrated into Superset UI) |
| Release cadence | Independent Docker image releases |
| Auth | Own RBAC system with optional ADFS SSO (see ADR-0005) |
| Plugins | Own plugin lifecycle (see ADR-0016) |
Consequences
- Positive: Fast independent development, modern stack, no Superset coupling, clear security boundary.
- Negative: Users have two separate UIs (Superset for BI, superset-tools for DevOps). Mitigated by consistent UX design and cross‑linking.
- Risk: API compatibility if Superset changes its REST API. Mitigated by versioned API client with automated compatibility tests.
Migration from Existing Document
This ADR supersedes and formalizes docs/architecture_decision_superset_migration.md. The original document contained the same recommendation and rationale but lacked the legacy DEF contract anchor, making it invisible to the semantic index and decision‑memory audit chain.