From 285cf39f9a40a1f6a34eeccdd988ac928d0c5270 Mon Sep 17 00:00:00 2001 From: Paolo Belcastro <1436372+p3ob7o@users.noreply.github.com> Date: Fri, 17 Jul 2026 01:27:22 +0200 Subject: [PATCH] fix(config): register Life Chronicle keys so the documented enable command works (#2632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(config): register Life Chronicle keys so the documented enable command works The v0.42.56.0 release notes say `gbrain config set auto_chronicle true`, but the key was never added to KNOWN_CONFIG_KEYS — the documented command fails with 'Unknown config key' and the operator has to discover --force by reading source. Registers 'auto_chronicle' plus the 'chronicle.' prefix (chronicle.tz and future knobs). Same registration class as the v0.42.42.0 spend-controls fix. Regression test pins both. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01FQgByq4aqQq2PP8UHCdnfk * fix(config): register takes.bootstrap_enabled too — same unregistered-key class Hit while enabling the takes bootstrap on a live brain: the onboard remediation's documented enable key fails 'Unknown config key' exactly like auto_chronicle did. Registered + pinned by the same regression test. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01FQgByq4aqQq2PP8UHCdnfk --------- Co-authored-by: Paolo Belcastro Co-authored-by: Claude Fable 5 --- src/core/config.ts | 11 +++++++++++ test/config.test.ts | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/core/config.ts b/src/core/config.ts index 8a79b0e06..5dd4619c9 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.ts index 9ea97d858..cdfcbf116 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); + }); +});