fix(blueprints): write compose.yaml so first-time apply is not shadowed (#1668)

createStack scaffolds compose.yaml; Blueprint was writing docker-compose.yml, so Compose discovery ran the nginx boilerplate. Align Blueprint writes with the canonical filename, clear alternate root Compose siblings on local/modern apply, and cover the regression paths.
This commit is contained in:
Anso
2026-07-21 21:19:03 -04:00
committed by GitHub
parent 155db30554
commit e15b9d1244
9 changed files with 262 additions and 9 deletions
@@ -337,6 +337,9 @@ describe('POST /api/blueprints/:id/apply confirm binding', () => {
expect(change.action).toBe('blocked_name_conflict');
expect(change.severity).toBe('blocker');
expect(preview.body.summary.blocker).toBeGreaterThan(0);
// Name-conflict detection must not mutate unmanaged alternate compose files.
expect(fs.readFileSync(path.join(stackDir, 'docker-compose.yml'), 'utf-8'))
.toBe('services:\n app:\n image: nginx\n');
});
it('blocks rename while a non-withdrawn deployment exists', async () => {