From e298e7444f7678f707c9969d19f2dfd830c1cd97 Mon Sep 17 00:00:00 2001 From: "A. F. Dudley" Date: Wed, 18 Mar 2026 18:24:27 +0000 Subject: [PATCH] fix: add auto-generated header to config.env config.env is regenerated from spec.yml on every deploy create and restart, silently overwriting manual edits. Add a header comment explaining this so operators know to edit spec.yml instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- stack_orchestrator/deploy/deployment_create.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index 95026350..df1eb684 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -675,6 +675,15 @@ def _write_config_file( # Write non-secret config to config.env (exclude $generate:...$ tokens) with open(config_env_file, "w") as output_file: + output_file.write( + "# AUTO-GENERATED by laconic-so from spec.yml config section.\n" + "# Source: stack_orchestrator/deploy/deployment_create.py" + " _write_config_file()\n" + "# Do not edit — changes will be overwritten on deploy create" + " or restart.\n" + "# To change config, edit the config section in your spec.yml" + " and redeploy.\n" + ) if config_vars: for variable_name, variable_value in config_vars.items(): # Skip variables with generate tokens - they go to K8s Secret