[object Object]

← back to AbramsOS

abramsos: watch loads .env so launchd corpus-refresh has GEORGE_URL (TK-10506)

b998091c92ec168993ced69013ccc732a05df40f · 2026-08-25 12:47:42 -0700 · Steve

The launchd plist injects only PG_*; without GEORGE_URL/GEORGE_BASIC_AUTH the
corpus refresh skipped as 'GEORGE_URL unset' even after a token reconnect.
Loading .env (WorkingDirectory=repo root) gives the headless watch the George
creds; dotenv never overrides the plist-set PG_* vars.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit b998091c92ec168993ced69013ccc732a05df40f
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Aug 25 12:47:42 2026 -0700

    abramsos: watch loads .env so launchd corpus-refresh has GEORGE_URL (TK-10506)
    
    The launchd plist injects only PG_*; without GEORGE_URL/GEORGE_BASIC_AUTH the
    corpus refresh skipped as 'GEORGE_URL unset' even after a token reconnect.
    Loading .env (WorkingDirectory=repo root) gives the headless watch the George
    creds; dotenv never overrides the plist-set PG_* vars.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 scripts/mode-claims-watch.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/mode-claims-watch.js b/scripts/mode-claims-watch.js
index 0a1e8d3..687a149 100644
--- a/scripts/mode-claims-watch.js
+++ b/scripts/mode-claims-watch.js
@@ -14,6 +14,9 @@
 // never provisioned — connector_account has 0 rows), the reason the watch used to SKIP silently.
 //
 // Usage: node scripts/mode-claims-watch.js
+// Load .env so the launchd job (which injects only PG_*) also gets GEORGE_URL /
+// GEORGE_BASIC_AUTH for the corpus refresh. dotenv never overrides vars the plist already set.
+try { require('dotenv').config({ path: require('path').join(__dirname, '..', '.env') }); } catch (_) {}
 const fs = require('fs');
 const path = require('path');
 const { execFileSync } = require('child_process');

← f55aae8 auto-data-snapshot: 2026-08-25T12:44:18 (4 data files) — dat  ·  back to AbramsOS  ·  auto-data-snapshot: 2026-09-01T14:52:01 (2 data files) — vie b5d614e →