chore: remove issue ID references from comments and changelogs

Strip (bd-xxx), (gt-xxx) suffixes from code comments and changelog
entries. The descriptions remain meaningful without the ephemeral
issue IDs.

🤖 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-28 10:05:16 -08:00
parent b4deb96924
commit f46cc2e798
82 changed files with 1175 additions and 1182 deletions

View File

@@ -52,7 +52,7 @@ type Issue struct {
CreatedBy string `json:"created_by,omitempty"`
Dependencies []Dependency `json:"dependencies,omitempty"`
RawLine string `json:"-"` // Store original line for conflict output
// Tombstone fields (bd-0ih): inline soft-delete support for merge
// Tombstone fields: inline soft-delete support for merge
DeletedAt string `json:"deleted_at,omitempty"` // When the issue was deleted
DeletedBy string `json:"deleted_by,omitempty"` // Who deleted the issue
DeleteReason string `json:"delete_reason,omitempty"` // Why the issue was deleted
@@ -240,7 +240,7 @@ func makeKey(issue Issue) IssueKey {
}
}
// bd-ig5: Use constants from types package to avoid duplication
// Use constants from types package to avoid duplication
const StatusTombstone = string(types.StatusTombstone)
// Alias TTL constants from types package for local use
@@ -316,7 +316,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
rightMap[makeKey(issue)] = issue
}
// bd-ncwo: Also build ID-based maps for fallback matching
// Also build ID-based maps for fallback matching
// This handles cases where the same issue has slightly different CreatedAt/CreatedBy
// (e.g., due to timestamp precision differences between systems)
leftByID := make(map[string]Issue)
@@ -331,7 +331,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
// Track which issues we've processed (by both key and ID)
processed := make(map[IssueKey]bool)
processedIDs := make(map[string]bool) // bd-ncwo: track processed IDs to avoid duplicates
processedIDs := make(map[string]bool) // track processed IDs to avoid duplicates
var result []Issue
var conflicts []string
@@ -357,7 +357,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
leftIssue, inLeft := leftMap[key]
rightIssue, inRight := rightMap[key]
// bd-ncwo: ID-based fallback matching for tombstone preservation
// ID-based fallback matching for tombstone preservation
// If key doesn't match but same ID exists in the other side, use that
if !inLeft && inRight {
if fallback, found := leftByID[rightIssue.ID]; found {
@@ -376,7 +376,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
}
}
// bd-ncwo: Check if we've already processed this ID (via a different key)
// Check if we've already processed this ID (via a different key)
currentID := key.ID
if currentID == "" {
if inLeft {
@@ -480,7 +480,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
result = append(result, merged)
} else if inBase && inLeft && !inRight {
// Deleted in right (implicitly), maybe modified in left
// bd-ki14: Check if left is a tombstone - tombstones must be preserved
// Check if left is a tombstone - tombstones must be preserved
if leftTombstone {
result = append(result, leftIssue)
continue
@@ -490,7 +490,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
continue
} else if inBase && !inLeft && inRight {
// Deleted in left (implicitly), maybe modified in right
// bd-ki14: Check if right is a tombstone - tombstones must be preserved
// Check if right is a tombstone - tombstones must be preserved
if rightTombstone {
result = append(result, rightIssue)
continue
@@ -513,7 +513,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
// mergeTombstones merges two tombstones for the same issue.
// The tombstone with the later deleted_at timestamp wins.
//
// bd-6x5: Edge cases for empty DeletedAt:
// Edge cases for empty DeletedAt:
// - If both empty: left wins (arbitrary but deterministic)
// - If left empty, right not: right wins (has timestamp)
// - If right empty, left not: left wins (has timestamp)
@@ -521,7 +521,7 @@ func Merge3WayWithTTL(base, left, right []Issue, ttl time.Duration) ([]Issue, []
// Empty DeletedAt shouldn't happen in valid data (validation catches it),
// but we handle it defensively here.
func mergeTombstones(left, right Issue) Issue {
// bd-6x5: Handle empty DeletedAt explicitly for clarity
// Handle empty DeletedAt explicitly for clarity
if left.DeletedAt == "" && right.DeletedAt == "" {
// Both invalid - left wins as tie-breaker
return left
@@ -577,10 +577,10 @@ func mergeIssue(base, left, right Issue) (Issue, string) {
result.ClosedAt = ""
}
// Merge dependencies - proper 3-way merge where removals win (bd-ndye)
// Merge dependencies - proper 3-way merge where removals win
result.Dependencies = mergeDependencies(base.Dependencies, left.Dependencies, right.Dependencies)
// bd-1sn: If status became tombstone via mergeStatus safety fallback,
// If status became tombstone via mergeStatus safety fallback,
// copy tombstone fields from whichever side has them
if result.Status == StatusTombstone {
// Prefer the side with more recent deleted_at, or left if tied
@@ -686,7 +686,7 @@ func mergeNotes(base, left, right string) string {
// mergePriority handles priority merging - on conflict, higher priority wins (lower number)
// Special case: 0 is treated as "unset/no priority" due to Go's zero value.
// Any explicitly set priority (!=0) wins over 0. (bd-d0t fix, bd-1kf fix)
// Any explicitly set priority (!=0) wins over 0.
func mergePriority(base, left, right int) int {
// Standard 3-way merge for non-conflict cases
if base == left && base != right {
@@ -700,8 +700,8 @@ func mergePriority(base, left, right int) int {
}
// True conflict: both sides changed to different values
// bd-d0t fix: Treat 0 as "unset" - explicitly set priority wins over unset
// bd-1kf fix: Use != 0 instead of > 0 to handle negative priorities
// Treat 0 as "unset" - explicitly set priority wins over unset
// Use != 0 instead of > 0 to handle negative priorities
if left == 0 && right != 0 {
return right // right has explicit priority, left is unset
}
@@ -748,7 +748,7 @@ func isTimeAfter(t1, t2 string) bool {
return true // t1 valid, t2 invalid - t1 wins
}
// Both valid - compare. On exact tie, left wins for consistency with IssueType rule (bd-8nz)
// Both valid - compare. On exact tie, left wins for consistency with IssueType rule
// Using !time2.After(time1) returns true when t1 > t2 OR t1 == t2
return !time2.After(time1)
}
@@ -794,7 +794,7 @@ func maxTime(t1, t2 string) string {
return t2
}
// mergeDependencies performs a proper 3-way merge of dependencies (bd-ndye)
// mergeDependencies performs a proper 3-way merge of dependencies
// Key principle: REMOVALS ARE AUTHORITATIVE
// - If dep was in base and removed by left OR right → exclude (removal wins)
// - If dep wasn't in base and added by left OR right → include