mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-27 22:15:33 +00:00
fix(config): register Life Chronicle keys so the documented enable command works (#2632)
* 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 <noreply@anthropic.com> 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQgByq4aqQq2PP8UHCdnfk --------- Co-authored-by: Paolo Belcastro <p3ob7o@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Paolo Belcastro
Claude Fable 5
parent
836d83012d
commit
285cf39f9a
@@ -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)
|
||||
];
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user