picoclaw/pkg
SiYue-ZO ef002d9a5d fix: ensure dm_scope and dimensions stay in sync across all config paths
The reviewer identified two bugs in the original PR:

1. PATCH /api/config leaves session.dimensions stale: LoadConfig()
   derives dimensions from the old dm_scope, and the merge carries
   those stale dimensions forward. ApplyDmScope() then exits early
   because dimensions is already populated, causing a mismatch between
   dm_scope (new) and dimensions (old).

2. Legacy/default configs omit dm_scope in GET response: configs with
   explicit dimensions but no dm_scope (including DefaultConfig) return
   no dm_scope field, causing the frontend to fall back to its default
   ('per-channel-peer'), which may not match the actual dimensions.

Fix:
- Add DeriveDmScope() to reverse-map known dimensions arrays to
  dm_scope when dm_scope is empty.
- Call it in LoadConfig(), PUT handler, PATCH handler, and
  ResetToDefaults() for consistent normalization.
- In PATCH handler, clear stale dimensions from the merge result when
  the patch contains session.dm_scope but not session.dimensions,
  allowing ApplyDmScope() to re-derive from the new scope.
- Add comprehensive unit tests for DeriveDmScope() and scope
  transition scenarios.
2026-06-11 16:12:48 +08:00
..
agent refactor: replace log.Printf/fmt.Printf with structured logger 2026-06-08 09:18:02 +08:00
audio refactor(models): unify provider metadata around backend catalog (#2896) 2026-05-20 11:50:34 +08:00
auth fix(auth): canonicalize Google Antigravity provider and enhance credential management (#2599) 2026-04-21 16:28:29 +08:00
bus fix(context): expose history tokens and remove leaked state files 2026-06-06 00:28:32 +08:00
channels fix: use %w instead of %v for error wrapping 2026-06-08 09:10:14 +08:00
commands fix(context): expose history tokens and remove leaked state files 2026-06-06 00:28:32 +08:00
config fix: ensure dm_scope and dimensions stay in sync across all config paths 2026-06-11 16:12:48 +08:00
constants refactor: replace bool map with set-style map for internal channels (#472) 2026-02-19 11:48:17 +01:00
credential refactor config and security to simplified the structure (#2068) 2026-03-28 00:03:34 +08:00
cron feat(cron): add get and update actions to cron tool 2026-05-31 10:55:54 +08:00
devices refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
events fix(events): keep runtime observers non-blocking 2026-04-27 13:09:03 +08:00
evolution fix: handle os.Getwd error in evolution skills_recall and drafts 2026-06-07 21:05:16 +08:00
fileutil Merge pull request #1829 from perhapzz/test/add-fileutil-health-tests 2026-03-26 10:42:13 +01:00
gateway Merge pull request #2719 from loafoe/feat/slack-webhook-channel 2026-05-11 16:22:27 +08:00
health fix(host): modernize default host selection order 2026-04-14 14:03:23 +08:00
heartbeat refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
identity fix(identity): support negative integers in isNumeric for Telegram group IDs 2026-03-21 17:09:02 +07:00
isolation fix: add ok checks for sync.Map LoadAndDelete/Load type assertions 2026-06-06 21:17:07 +08:00
logger unify all panic event to panic log file (#2250) 2026-04-01 23:26:49 +08:00
mcp fix: use %w instead of %v for error wrapping 2026-06-08 09:10:14 +08:00
media Fix 1886 media cleanup policy (#1887) 2026-03-23 12:13:59 +08:00
memory fix(session): tighten main-session alias detection to exact 3-part format 2026-06-04 11:01:10 +08:00
migrate fix: check Close() error after io.Copy to writable files 2026-06-07 12:09:01 +08:00
netbind fix(web): address latest Copilot review points 2026-04-14 23:39:59 +08:00
pid fix(pid): verify process identity in singleton PID check 2026-06-04 20:04:51 +08:00
providers fix(config): use canonical Anthropic default model ID 2026-06-07 15:43:26 +08:00
routing feat(routing): add ordered dispatch rules 2026-04-01 22:13:04 +08:00
seahorse fix: type-switch capture, nil guard, LastInsertId error check 2026-06-06 16:32:14 +08:00
session fix(seahorse,session): preserve created_at across history bootstrap 2026-05-26 14:05:20 +08:00
skills feat: agent self evolution (#2847) 2026-05-11 16:13:27 +08:00
state refactor: replace log.Printf/fmt.Printf with structured logger 2026-06-08 09:18:02 +08:00
tokenizer feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
tools refactor: replace log.Printf/fmt.Printf with structured logger 2026-06-08 09:18:02 +08:00
updater fix: check Close() errors in updater extraction functions 2026-06-06 21:34:24 +08:00
utils fix: check Close() error after downloading media file 2026-06-07 11:53:38 +08:00
env.go Merge branch 'main' into version 2026-03-19 18:04:58 +08:00