From 251ded73be31f271e85ba10a76b642167c1008b7 Mon Sep 17 00:00:00 2001 From: jane Date: Sat, 17 Jan 2026 03:43:49 -0800 Subject: [PATCH] fix(merge-slot): use daemon RPC to get issue_prefix in daemon mode When running in daemon mode, getMergeSlotID() was not using the daemon RPC to retrieve the configured issue_prefix, causing it to fall back to the hardcoded "bd" default. This fix adds the missing daemon path that uses daemonClient.GetConfig() to properly retrieve the prefix, matching the pattern used in create.go. Fixes #1096 Co-Authored-By: Claude Opus 4.5 --- cmd/bd/merge_slot.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/bd/merge_slot.go b/cmd/bd/merge_slot.go index 4d02e415..d05dc247 100644 --- a/cmd/bd/merge_slot.go +++ b/cmd/bd/merge_slot.go @@ -121,8 +121,13 @@ func getMergeSlotID() string { // First try config.yaml (issue-prefix) if configPrefix := config.GetString("issue-prefix"); configPrefix != "" { prefix = strings.TrimSuffix(configPrefix, "-") + } else if daemonClient != nil { + // Daemon mode - use RPC to get config + if configResp, err := daemonClient.GetConfig(&rpc.GetConfigArgs{Key: "issue_prefix"}); err == nil && configResp.Value != "" { + prefix = strings.TrimSuffix(configResp.Value, "-") + } } else if store != nil { - // Fall back to database config + // Direct mode - check database config if dbPrefix, err := store.GetConfig(rootCtx, "issue_prefix"); err == nil && dbPrefix != "" { prefix = strings.TrimSuffix(dbPrefix, "-") }