From 226e33ddfb2445e7c82c8595bfd41b0b642b330c Mon Sep 17 00:00:00 2001 From: Zezae Oh Date: Sat, 27 Jun 2026 12:24:16 +0900 Subject: [PATCH] fix(config): overlay cron command flag from system configs (#1285) --- internal/config/config_extras_test.go | 4 ++++ internal/config/config_system.go | 1 + 2 files changed, 5 insertions(+) diff --git a/internal/config/config_extras_test.go b/internal/config/config_extras_test.go index 6b2bc150..e453e77d 100644 --- a/internal/config/config_extras_test.go +++ b/internal/config/config_extras_test.go @@ -283,6 +283,7 @@ func TestApplySystemConfigs(t *testing.T) { "tools.browser.enabled": "false", "tools.browser.remote_url": "ws://chrome:9222", "tools.browser.max_pages": "9", + "cron.command_enabled": "true", }) if cfg.Agents.Defaults.Provider != "openai" { @@ -306,6 +307,9 @@ func TestApplySystemConfigs(t *testing.T) { if cfg.Tools.Browser.MaxPages != 9 { t.Errorf("tools.browser.max_pages: got %d", cfg.Tools.Browser.MaxPages) } + if !cfg.Cron.CommandEnabled { + t.Error("cron.command_enabled: got false, want true") + } } // --- Save / Load round-trip --- diff --git a/internal/config/config_system.go b/internal/config/config_system.go index 6f90c5b9..bd6985a3 100644 --- a/internal/config/config_system.go +++ b/internal/config/config_system.go @@ -95,6 +95,7 @@ func (c *Config) ApplySystemConfigs(configs map[string]string) { // Cron integer("cron.max_retries", &c.Cron.MaxRetries) str("cron.default_timezone", &c.Cron.DefaultTimezone) + boolValue("cron.command_enabled", &c.Cron.CommandEnabled) // Pending message compaction if _, ok := configs["compaction.threshold"]; ok {