Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): recognize joined --config=key=value codex override forms
[._.]/ Adam Eivyda7b6ad9d7dd
diff --git a/server/lib/providerModels.js b/server/lib/providerModels.jsindex e5f3078b43..0c60eaa94f 100644--- a/server/lib/providerModels.js+++ b/server/lib/providerModels.js@@ -161,16 +161,26 @@ export function buildEffortArgs(effort, provider, existingArgs = []) {export const CODEX_UPDATE_CHECK_KEY = 'check_for_update_on_startup';/**- * True when the codex argv already pins the startup-update-check config (a- * `-c check_for_update_on_startup=<v>` pair). Mirrors `hasEffortFlag`'s- * config-pin scan (null-safe, matches the value element of the pair) so a- * caller-supplied value wins over the injected default.+ * True when the codex argv already pins the startup-update-check config, so a+ * caller-supplied value wins over the injected default. Null-safe. Recognizes+ * every codex override syntax for the key: the separate-arg value element of+ * `-c <key>=<v>` / `--config <key>=<v>` (which arrives as a standalone+ * `<key>=<v>` token), AND the joined forms `--config=<key>=<v>` / `-c=<key>=<v>`+ * (a single token). Missing the joined form would inject a second, conflicting+ * `-c <key>=false` that silently overrides the user's explicit value.* @param {unknown[]} args* @returns {boolean}*/export function hasCodexUpdateCheckConfig(args) {if (!Array.isArray(args)) return false;- return args.some((a) => typeof a === 'string' && a.startsWith(`${CODEX_UPDATE_CHECK_KEY}=`));+ const pin = `${CODEX_UPDATE_CHECK_KEY}=`;+ return args.some((a) => {+ if (typeof a !== 'string') return false;+ if (a.startsWith(pin)) return true; // standalone value of `-c`/`--config <key>=<v>`+ // Joined `--config=<key>=<v>` / `-c=<key>=<v>` — strip the flag prefix, then test.+ const joined = a.startsWith('--config=') ? a.slice(9) : a.startsWith('-c=') ? a.slice(3) : null;+ return joined !== null && joined.startsWith(pin);+ });}/**diff --git a/server/lib/providerModels.test.js b/server/lib/providerModels.test.jsindex 28b3a47bbe..1002bf2b0b 100644--- a/server/lib/providerModels.test.js+++ b/server/lib/providerModels.test.js@@ -253,6 +253,13 @@ describe('providerModels', () => {it('detects a baked check_for_update_on_startup config pair (any value)', () => {expect(hasCodexUpdateCheckConfig(['-c', `${CODEX_UPDATE_CHECK_KEY}=false`])).toBe(true);expect(hasCodexUpdateCheckConfig(['-c', `${CODEX_UPDATE_CHECK_KEY}=true`])).toBe(true);+ // separate-arg `--config` long form+ expect(hasCodexUpdateCheckConfig(['--config', `${CODEX_UPDATE_CHECK_KEY}=true`])).toBe(true);+ });++ it('detects the joined `--config=<key>=<v>` / `-c=<key>=<v>` forms', () => {+ expect(hasCodexUpdateCheckConfig([`--config=${CODEX_UPDATE_CHECK_KEY}=true`])).toBe(true);+ expect(hasCodexUpdateCheckConfig([`-c=${CODEX_UPDATE_CHECK_KEY}=false`])).toBe(true);});it('is false for unrelated args, non-arrays, and non-string elements', () => {@@ -271,6 +278,7 @@ describe('providerModels', () => {it('returns [] when the user already pinned the key (their value wins)', () => {expect(buildCodexStartupArgs(['-c', `${CODEX_UPDATE_CHECK_KEY}=true`])).toEqual([]);+ expect(buildCodexStartupArgs([`--config=${CODEX_UPDATE_CHECK_KEY}=true`])).toEqual([]);});});