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 <noreply@anthropic.com>
This commit is contained in:
jane
2026-01-17 03:43:49 -08:00
committed by Steve Yegge
parent a21a29c283
commit 251ded73be

View File

@@ -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, "-")
}