Release: CI/CD Pipeline & Architecture Updates #177
Reference in New Issue
Block a user
Delete Branch "develop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Merge develop into main to enable Docker build/push CI pipeline on the main branch.
Key Changes
Docker Images
After merge, pushes to main will build and push:
Test Plan
Comprehensive architecture document for M4 quality enforcement pattern. Problem (L-015 Evidence): - AI agents claim done prematurely (60-70% complete) - Defer work as "incremental" or "follow-up PRs" - Identical language across sessions ("good enough for now") - Happens even in YOLO mode with full permissions - Cannot be fixed with instructions or prompting Evidence: - uConnect agent: 853 warnings deferred - Mosaic Stack agent: 509 lint errors + 73 test failures deferred - Both required manual override to continue - Pattern observed across multiple agents and sessions Solution: Non-AI Coordinator Pattern - AI agents do the work - Non-AI orchestrator enforces quality gates - Gates are programmatic (build, lint, test, coverage) - Agents cannot negotiate or bypass - Forced continuation when gates fail - Rejection with specific failure messages Documentation Includes: - Problem statement with evidence - Why non-AI enforcement is necessary - Complete architecture design - Component specifications - Quality gate types and configuration - State machine and workflow - Forced continuation prompt templates - Integration points - Monitoring and metrics - Troubleshooting guide - Implementation examples Related Issues: #134-141 (M4-MoltBot) Agents working on M4 issues now have complete context and rationale without needing jarvis-brain access. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>The Docker builds were failing because they ran `pnpm build` directly in the app directories without first building workspace dependencies (@mosaic/shared, @mosaic/ui). CI passed because it runs TurboRepo from the root which respects the dependency graph. Changed both Dockerfiles to use `pnpm turbo build --filter=@mosaic/{app}` which ensures dependencies are built in the correct order: - Web: @mosaic/config → @mosaic/shared → @mosaic/ui → @mosaic/web - API: @mosaic/config → @mosaic/shared → prisma:generate → @mosaic/api Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>Fixed the mismatch between environment variables: - docker-compose now passes PORT (what NestJS/Next.js read) instead of API_PORT - API_PORT/WEB_PORT control host mapping, PORT controls container Changes: - docker-compose: Pass PORT=${API_PORT} and PORT=${WEB_PORT} to containers - docker-compose: Dynamic port mapping on both host and container sides - docker-compose: Traefik labels use ${API_PORT}/${WEB_PORT} variables - docker-compose: Healthchecks use PORT env var - Dockerfiles: Removed hardcoded port values - Dockerfiles: Healthchecks read PORT at runtime This allows changing ports via API_PORT/WEB_PORT environment variables and have all components (app, healthcheck, Traefik) use the correct port. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>Issues fixed: 1. Module not found: Added missing copy of apps/{api,web}/node_modules which contains pnpm symlinks to the root node_modules 2. Healthcheck syntax: Fixed broken quoting from prettier reformatting Changed to CMD-SHELL with proper escaping 3. Removed obsolete version: "3.9" from docker-compose.yml The apps need their own node_modules directories because pnpm uses symlinks that point from apps/*/node_modules to node_modules/.pnpm/* Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>