fix: Combine db prefix with type prefix for mol/wisp IDs (bd-hobo)

Changed prefix logic to combine the database prefix with the type prefix:
- bd-wisp-xxx (was: wisp-xxx)
- bd-mol-xxx (was: mol-xxx)

This ensures IDs like hq-wisp-xxx at town level and gt-mol-xxx for gastown,
maintaining database namespace while adding type recognition.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-25 02:10:08 -08:00
parent f78fe883d0
commit 9c1bf7d4ea
2 changed files with 6 additions and 4 deletions

View File

@@ -163,10 +163,11 @@ func (s *SQLiteStorage) CreateIssue(ctx context.Context, issue *types.Issue, act
return fmt.Errorf("failed to get config: %w", err)
}
// Use IDPrefix override if set, otherwise use config prefix (bd-hobo)
// Use IDPrefix override if set, combined with config prefix (bd-hobo)
// e.g., configPrefix="bd" + IDPrefix="wisp" → "bd-wisp"
prefix := configPrefix
if issue.IDPrefix != "" {
prefix = issue.IDPrefix
prefix = configPrefix + "-" + issue.IDPrefix
}
// Generate or validate ID

View File

@@ -147,10 +147,11 @@ func (t *sqliteTxStorage) CreateIssue(ctx context.Context, issue *types.Issue, a
return fmt.Errorf("failed to get config: %w", err)
}
// Use IDPrefix override if set, otherwise use config prefix (bd-hobo)
// Use IDPrefix override if set, combined with config prefix (bd-hobo)
// e.g., configPrefix="bd" + IDPrefix="wisp" → "bd-wisp"
prefix := configPrefix
if issue.IDPrefix != "" {
prefix = issue.IDPrefix
prefix = configPrefix + "-" + issue.IDPrefix
}
// Generate or validate ID