From 3a18c37f7d92fa2970ff14dabc5b801ac8b646b2 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Sat, 2 May 2026 11:47:23 -0500 Subject: [PATCH] fix: shadow-let soul_url and neuron_origin so the default actually stores The native elc silently drops bare reassignment inside an if body (`name = expr` compiles to an orphan expr statement with no store). Both soul_url and neuron_origin defaulted to empty, breaking every http_post call to the in-container soul-demo. Switch to let-shadowed if-expressions until the compiler is fixed. See: products/web/src/main.el `/api/soul-health` route output. --- src/main.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main.el b/src/main.el index 2ff0b7f..769d725 100644 --- a/src/main.el +++ b/src/main.el @@ -1352,10 +1352,8 @@ let html_path: String = src_dir + "/index.html" // Soul URL — where the demo soul is reachable. // Defaults to localhost for local dev; set SOUL_URL for deployed environments. -let soul_url: String = env("SOUL_URL") -if str_eq(soul_url, "") { - soul_url = "http://localhost:7772" -} +let soul_url_env: String = env("SOUL_URL") +let soul_url: String = if str_eq(soul_url_env, "") { "http://localhost:7772" } else { soul_url_env } state_set("__soul_url__", soul_url) // Stripe config from environment — loaded first so founding count can use it. @@ -1371,10 +1369,8 @@ let supabase_service_key: String = env("SUPABASE_SERVICE_KEY") let supabase_project_url: String = "https://ocojsghaonltunidkzpw.supabase.co" // Origin — drives Stripe redirect URLs; never hardcoded to localhost. -let neuron_origin: String = env("NEURON_ORIGIN") -if str_eq(neuron_origin, "") { - neuron_origin = "https://neurontechnologies.ai" -} +let neuron_origin_env: String = env("NEURON_ORIGIN") +let neuron_origin: String = if str_eq(neuron_origin_env, "") { "https://neurontechnologies.ai" } else { neuron_origin_env } // Founding count — seeded from persist file or live Stripe query. let sold_file: String = src_dir + "/founding_sold.txt"