Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(config): describe how the save guard reads both env snapshots

Yudhi Armyndharis2ee2688b540c
diff --git a/src/config/env-precedence.ts b/src/config/env-precedence.ts
index 00d1aca34..754484f1b 100644
--- a/src/config/env-precedence.ts
+++ b/src/config/env-precedence.ts
@@ -287,10 +287,10 @@ export function isOsProvidedEnv(key: string): boolean {
* OR by the project `.env`, both of which load with `override: false` and therefore win over the
* dashboard-saved file for good.
*
- * Distinct from `osEnvKeys` on purpose. That snapshot answers "may this value win over the file being
- * WRITTEN?" for the save-config guard, where only a host value counts. This one answers "can the
- * dashboard change this setting at all?", and there a project `.env` pins exactly as hard as an
- * orchestrator variable does.
+ * Distinct from `osEnvKeys` on purpose. That snapshot records what the host supplied; the save-config
+ * guard now reads both snapshots, since the host and the project .env both outrank the file being
+ * WRITTEN. This one answers "can the dashboard change this setting at all?", and there a project
+ * `.env` pins exactly as hard as an orchestrator variable does.
*/
let pinnedEnvKeys: Set<string> | null = null;