Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(config): register Life Chronicle keys so the documented enable command works (#2632)
Paolo Belcastro285cf39f9a40
diff --git a/src/core/config.ts b/src/core/config.tsindex 8a79b0e063..5dd4619c9e 100644--- a/src/core/config.ts+++ b/src/core/config.ts@@ -921,6 +921,16 @@ export const KNOWN_CONFIG_KEYS: readonly string[] = [// operator had to discover these by reading source. Registered so `config// set` accepts them directly. See docs/operations/spend-controls.md.'spend.posture',+ // Life Chronicle (v0.42.56.0, #2390). The release notes' enable command is+ // `gbrain config set auto_chronicle true`, but the key was never registered+ // — so the documented command failed with "Unknown config key" and the+ // operator had to discover --force by reading source. Same class as the+ // spend-controls registration above.+ 'auto_chronicle',+ // Takes bootstrap (v0.41.18.0, A12). The onboard remediation's two-gate+ // consent reads this key, and enabling it is the documented path to+ // `gbrain takes extract --from-pages` — same unregistered-key class.+ 'takes.bootstrap_enabled','sync.cost_gate_min_usd','sync.federated_v2','embed.backfill_cooldown_min',@@ -943,6 +953,7 @@ export const KNOWN_CONFIG_KEY_PREFIXES: readonly string[] = ['content_sanity.', // v0.41 content-sanity tunables'mcp.', // mcp.publish_skills, mcp.skills_dir (PR1 skill catalog)'autopilot.', // autopilot.nightly_quality_probe.*, autopilot.auto_drain.* (#1685)+ 'chronicle.', // chronicle.tz + future Life Chronicle knobs (#2390)'self_upgrade.', // v0.42 self-upgrade (mode, quiet_hours, state)];diff --git a/test/config.test.ts b/test/config.test.tsindex 9ea97d858e..cdfcbf1166 100644--- a/test/config.test.ts+++ b/test/config.test.ts@@ -253,3 +253,15 @@ describe('loadConfig — GBRAIN_MAX_MARKUP_RATIO env (v0.42 #1699)', () => {});});});++describe('KNOWN_CONFIG_KEYS — documented enable commands must be registered', () => {+ test('Life Chronicle keys are registered (v0.42.56.0 release notes say `config set auto_chronicle true`)', async () => {+ const { KNOWN_CONFIG_KEYS, KNOWN_CONFIG_KEY_PREFIXES } = await import('../src/core/config.ts');+ // The flag the chronicle backstop reads (isAutoChronicleEnabled).+ expect(KNOWN_CONFIG_KEYS).toContain('auto_chronicle');+ // The takes bootstrap two-gate consent flag (v0.41.18.0 A12).+ expect(KNOWN_CONFIG_KEYS).toContain('takes.bootstrap_enabled');+ // chronicle.tz (chronicleTz) + future chronicle.* knobs.+ expect(KNOWN_CONFIG_KEY_PREFIXES.some(p => 'chronicle.tz'.startsWith(p))).toBe(true);+ });+});