Module Activation Status (SSOT)

Last Updated: 2026-02-19 Scope: analytics-platform/ (NestJS) module activation state (DI reachability)

Purpose

This document is the single source of truth for:

  • Which NestJS modules are implemented and active in runtime (reachable from AppModule)
  • Which modules are implemented but not active (unreachable / “orphaned”)
  • What “activation” means and how to do it safely

This avoids the recurring failure mode where documentation claims a subsystem exists, but it is not wired into the DI tree and cannot run in production.

Definitions

  • ROOT / ACTIVE: Imported directly by AppModule (analytics-platform/src/app.module.ts)
  • NESTED: Not imported by AppModule, but transitively imported by an ACTIVE module (reachable in DI)
  • ORPHANED: Implemented in code (has a *.module.ts) but unreachable from the DI root

Current Snapshot (As Of main)

ROOT / ACTIVE Modules (Imported By AppModule)

File: analytics-platform/src/app.module.ts

  • JorvisConfigModule
  • JorvisDatabaseModule
  • ResilienceModule
  • AuthModule
  • DataModule
  • AiModule
  • QuestionModule
  • ConversationModule
  • VisualizationModule
  • McpModule
  • MonitoringModule
  • VoiceModule
  • InternalModule
  • HealthModule
  • WikidataModule
  • GoogleSheetsModule
  • OpenMeteoModule
  • SportsDbModule
  • TmdbModule
  • ExcelModule

Notable NESTED Modules (Reachable In DI)

These modules are reachable (transitively imported) and should be treated as “live” from an activation perspective:

  • GraphModule (imported by AiModule)
  • ToolsModule (imported by AiModule)
  • TransparencyModule (imported by AiModule)
  • ModelRegistryModule (imported by AiModule)
  • DocumentModule (imported by AiModule)
  • ConfigCacheModule (imported by AiModule)
  • QueryExamplesModule (imported by AiModule)
  • EmbeddingModule (imported by QueryExamplesModule)
  • MetricsModule (imported by AiModule)
  • SecurityModule (imported by AiModule)
  • AutonomyModule (imported by AiModule)
  • SchemaModule (imported by DataModule)
  • GlossaryModule (imported by AiModule at ai.module.ts:129) — business terminology RAG, feature-flagged (default OFF). Phase 5 (2026-02-17): NO-GO — 0 measurable impact on SQL correctness. Root cause: column hallucination, not terminology. Activation deferred pending schema-aware SQL generation (column grounding). See docs/agent_ops/OUTBOX/task_glossary_comparison_phase5_20260217.md.

ORPHANED Modules (Implemented But Unreachable)

The authoritative list + rationale is maintained as evidence:

  • Audit (original): docs/agent_ops/OUTBOX/audit_hidden_modules_20260211.md
  • Audit (refreshed 2026-02-15): docs/agent_ops/OUTBOX/task_module_reachability_audit_20260215.md
  • Decision matrix (ACTIVATE / ARCHIVE / DELETE): docs/agent_ops/OUTBOX/task_orphaned_modules_decision_sweep_20260211.md

This SSOT intentionally does not duplicate the full orphan list here; it links to the maintained audit + decision sweep.

Module Sweep M2 (2026-02-16 — COMPLETE)

All 13 orphaned modules have been processed. See evidence:

  • docs/agent_ops/OUTBOX/task_module_sweep_discovery_20260216.md
  • docs/agent_ops/OUTBOX/task_module_sweep_plan_20260216.md
  • docs/agent_ops/OUTBOX/task_module_sweep_m2_b1_20260216.md (PRs #94)
  • docs/agent_ops/OUTBOX/task_module_sweep_m2_b2_20260216.md (PR #95)

Post-sweep orphaned count: 0

Correction (2026-02-19, ant2): GlossaryModule was previously listed as orphaned. It is in fact DI-reachable via AiModule (ai.module.ts:129). Reclassified to NESTED. Confirmed by code inspection.

Removed modules (PRs #94, #95)

Batch 1 — Independent orphans (PR #94):

  • TracingModule — deleted src/tracing/
  • MemoryModule — deleted src/memory/
  • TenancyModule — deleted src/tenancy/
  • EncryptionModule — deleted src/security/encryption/
  • SystemAuditModule — deleted src/audit/
  • RedisModule — deleted src/infrastructure/redis/
  • Throttler — deleted src/security/throttler/ (internal dep of Redis)
  • DialectsModule — deleted src/data/dialects/
  • FederationModule — deleted src/data/federation/
  • SqlGuardModule — deleted module file only; SqlGuardService preserved in AiModule
  • ToolChainingModule — deleted module file only; active tools/ services preserved in AiModule

Batch 2 — Knowledge ecosystem (PR #95):

  • FeedbackModule — deleted src/ai/knowledge/feedback/
  • GraphLinkerModule — deleted src/ai/knowledge/graph-linker/
  • SchemaEnrichmentModule — deleted src/ai/knowledge/schema-enrichment/

Execution policy

Any module state change (activation/deletion) must include:

  • wiring diff, tests, release-gate evidence, and rollback notes.

What Counts As “Activated”

A module is “activated” only when all of the following are true:

  • It is reachable from AppModule (ROOT or NESTED).
  • Any required feature flags are explicitly documented (default value + prod value).
  • Any required migrations are present and have a safe prod rollout step.
  • There is evidence for:
    • tests passing
    • release gate passing
    • prod deploy (if runtime behavior changes)

Activation Checklist (Executor Standard)

When activating an ORPHANED module:

  1. DI wiring:
    • Add module import to the correct parent (usually AiModule or AppModule).
  2. Configuration:
    • Feature-flag the behavior unless it is purely internal/observability.
  3. Data/migrations:
    • Add migrations for Postgres as required.
    • If production data is touched: take a backup checkpoint.
  4. Verification:
    • npm --prefix analytics-platform test -- --runInBand
    • npm --prefix analytics-platform run lint
    • bash scripts/release-gate.sh
  5. Evidence:
    • Add an OUTBOX evidence file describing what changed and how it was verified.

How To Update This SSOT

This file should only change when the activation state changes (DI wiring changes).

Suggested mechanical checks:

# Module census (includes AppModule)
find analytics-platform/src -name '*module.ts' | wc -l

# Root imports (what is actually active)
sed -n '1,220p' analytics-platform/src/app.module.ts

For a full DI reachability audit and orphaned decision updates, follow:

  • docs/agent_ops/OUTBOX/audit_hidden_modules_20260211.md
  • docs/agent_ops/OUTBOX/task_orphaned_modules_decision_sweep_20260211.md