Implementation: How to prevent railway.toml cross-contamination after git me...
Documentation for Sessions
⚙️ Implementation: How to prevent railway.toml cross-contamination after git me...
Date: 2026-02-09
Time: 18:09:34 UTC
Session: gspace1-101.4
Agent: angular
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How to prevent railway.toml cross-contamination after git merge into deploy branches?
Task: Add railway.toml safety net to deploy CLI
🎯 Decision Made
Chosen:
Integrated into deploy CLI: ensureCorrectRailwayToml() runs after every merge, copies canonical config from deployment/{service}/, validates Dockerfile path + start command + health check match the target, aborts push if validation fails.
Options Considered:
- Manual verification before push
- Pre-push git hook
- Integrated validation in deploy CLI after merge
💭 Reasoning
Git hooks are fragile and easy to bypass. Manual verification is error-prone. Integrating directly into the deploy CLI means the safety net runs automatically every time, with clear error messages, and the CLI can abort gracefully while still processing other targets.
📁 Files Involved
tools/scripts/deployment/lib/branch-manager.jstools/scripts/deployment/lib/deployment-config.jstools/scripts/deployment/railway-deploy-cli.js
🔗 Related
- Decision ID:
dev_1770660574100_zi8qv1p - Session: 101
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation