Bugfix: Why was GitLab empty despite generated modules being created...

Documentation for Sessions

🐛 Bugfix: Why was GitLab empty despite generated modules being created...

Date: 2026-03-09
Time: 19:37:26 UTC
Session: gspace1-191.3
Agent: backend
Confidence: 97%
Status: ✅ Documented


📋 Decision Context

Question:

Why was GitLab empty despite generated modules being created successfully?

Task: Not specified


🎯 Decision Made

Chosen:

Import StudioModule into ModuleGenerationModule so UniverseGitService gets injected. Change code storage to GitLab-first with local disk opt-in via SAVE_GENERATED_LOCALLY env var.

Options Considered:

  1. Add UniverseGitService directly to ModuleGenerationModule providers
  2. Import StudioModule which exports UniverseGitService (chosen)
  3. Make GitLab a hard requirement and fail if not configured

💭 Reasoning

Root cause: UniverseGitService was @Optional() injected in ModuleGenPhaseExecutor, but StudioModule (which provides it) was never imported by ModuleGenerationModule. NestJS injected undefined, so if (this.universeGit) always failed → fell to local disk fallback. GitLab credentials existed in .env.local but were never used. The storage logic was also inverted: local was default, GitLab was optional. For cloud users who have no filesystem, this means generated code would be lost entirely. Fix: (1) import StudioModule, (2) flip logic to GitLab-first + local opt-in.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation