Architecture: Should the deploy CLI merge deploy branches back into the se...

Documentation for Sessions

🏗️ Architecture: Should the deploy CLI merge deploy branches back into the se...

Date: 2026-01-23
Time: 15:21:24 UTC
Session: editor2-63.4
Agent: documentation
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

Should the deploy CLI merge deploy branches back into the session branch after deployment?

Task: Smart Railway deployment CLI architecture


🎯 Decision Made

Chosen:

One-way merge only (session INTO deploy) - no merge back by default

Options Considered:

  1. Merge back to session (bi-directional sync)
  2. One-way merge only (session INTO deploy)
  3. Optional flag for merge-back
  4. Always sync all branches

💭 Reasoning

Each deploy branch (deploy/api, deploy/ai-api, deploy/docs-api) has a DIFFERENT railway.toml configuration. Merging any deploy branch back into session would bring that specific config, causing conflicts when deploying other APIs. The session branch is the source of truth for development code. Deploy branches are supersets containing session code PLUS deploy-specific configs. The 'behind by 1 commit' appearance after deployment is expected and correct - it's just the merge commit, not missing code.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation