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

@@ -59,7 +59,7 @@ Use --merge to merge the sync branch back to main branch.`,
noPush = config.GetBool("no-push")
}
// bd-sync-corruption fix: Force direct mode for sync operations.
// Force direct mode for sync operations.
// This prevents stale daemon SQLite connections from corrupting exports.
// If the daemon was running but its database file was deleted and recreated
// (e.g., during recovery), the daemon's SQLite connection points to the old
@@ -88,7 +88,7 @@ Use --merge to merge the sync branch back to main branch.`,
return
}
// If check mode, run pre-sync integrity checks (bd-hlsw.1)
// If check mode, run pre-sync integrity checks
if checkIntegrity {
showSyncIntegrityCheck(ctx, jsonlPath)
return
@@ -136,7 +136,7 @@ Use --merge to merge the sync branch back to main branch.`,
return
}
// If squash mode, export to JSONL but skip git operations (bd-o2e)
// If squash mode, export to JSONL but skip git operations
// This accumulates changes for a single commit later
if squash {
if dryRun {
@@ -195,11 +195,11 @@ Use --merge to merge the sync branch back to main branch.`,
if dryRun {
fmt.Println("→ [DRY RUN] Would export pending changes to JSONL")
} else {
// ZFC safety check (bd-l0r, bd-53c): if DB significantly diverges from JSONL,
// ZFC safety check: if DB significantly diverges from JSONL,
// force import first to sync with JSONL source of truth.
// After import, skip export to prevent overwriting JSONL (JSONL is source of truth).
//
// bd-53c fix: Added REVERSE ZFC check - if JSONL has MORE issues than DB,
// Added REVERSE ZFC check - if JSONL has MORE issues than DB,
// this indicates the DB is stale and exporting would cause data loss.
// This catches the case where a fresh/stale clone tries to export an
// empty or outdated database over a JSONL with many issues.
@@ -224,7 +224,7 @@ Use --merge to merge the sync branch back to main branch.`,
}
}
// Case 2 (bd-53c): JSONL has significantly more issues than DB
// Case 2: JSONL has significantly more issues than DB
// This is the DANGEROUS case - exporting would lose issues!
// A stale/empty DB exporting over a populated JSONL causes data loss.
if jsonlCount > dbCount && !skipExport {
@@ -233,7 +233,7 @@ Use --merge to merge the sync branch back to main branch.`,
// - Any loss > 20% is suspicious
// - Complete loss (DB empty) is always blocked
if dbCount == 0 || divergence > 0.2 {
fmt.Printf("→ JSONL has %d issues but DB has only %d (stale DB detected - bd-53c)\n", jsonlCount, dbCount)
fmt.Printf("→ JSONL has %d issues but DB has only %d (stale DB detected)\n", jsonlCount, dbCount)
fmt.Println("→ Importing JSONL first to prevent data loss...")
if err := importFromJSONL(ctx, jsonlPath, renameOnImport, noGitHistory); err != nil {
FatalError("importing (reverse ZFC): %v", err)
@@ -246,7 +246,7 @@ Use --merge to merge the sync branch back to main branch.`,
}
}
// Case 3 (bd-f2f): JSONL content differs from DB (hash mismatch)
// Case 3: JSONL content differs from DB (hash mismatch)
// This catches the case where counts match but STATUS/content differs.
// A stale DB exporting wrong status values over correct JSONL values
// causes corruption that the 3-way merge propagates.
@@ -261,10 +261,10 @@ Use --merge to merge the sync branch back to main branch.`,
if !skipExport {
repoKey := getRepoKeyForPath(jsonlPath)
if hasJSONLChanged(ctx, store, jsonlPath, repoKey) {
fmt.Println("→ JSONL content differs from last sync (bd-f2f)")
fmt.Println("→ JSONL content differs from last sync")
fmt.Println("→ Importing JSONL first to prevent stale DB from overwriting changes...")
if err := importFromJSONL(ctx, jsonlPath, renameOnImport, noGitHistory); err != nil {
FatalError("importing (bd-f2f hash mismatch): %v", err)
FatalError("importing (hash mismatch): %v", err)
}
// Don't skip export - we still want to export any remaining local dirty issues
// The import updated DB with JSONL content, and export will write merged state
@@ -368,7 +368,7 @@ Use --merge to merge the sync branch back to main branch.`,
return
}
// Check if sync.branch is configured for worktree-based sync (bd-e3w)
// Check if sync.branch is configured for worktree-based sync
// This allows committing to a separate branch without changing the user's working directory
var syncBranchName string
var repoRoot string
@@ -416,7 +416,7 @@ Use --merge to merge the sync branch back to main branch.`,
fmt.Println("→ [DRY RUN] Would commit changes to git")
}
} else if useSyncBranch {
// Use worktree to commit to sync branch (bd-e3w)
// Use worktree to commit to sync branch
fmt.Printf("→ Committing changes to sync branch '%s'...\n", syncBranchName)
result, err := syncbranch.CommitToSyncBranch(ctx, repoRoot, syncBranchName, jsonlPath, !noPush)
if err != nil {
@@ -460,10 +460,10 @@ Use --merge to merge the sync branch back to main branch.`,
} else {
// Execute pull - either via sync branch worktree or regular git pull
if useSyncBranch {
// Pull from sync branch via worktree (bd-e3w)
// Pull from sync branch via worktree
fmt.Printf("→ Pulling from sync branch '%s'...\n", syncBranchName)
// bd-4u8: Check if confirmation is required for mass deletion
// Check if confirmation is required for mass deletion
requireMassDeleteConfirmation := config.GetBool("sync.require_confirmation_on_mass_delete")
pullResult, err := syncbranch.PullFromSyncBranch(ctx, repoRoot, syncBranchName, jsonlPath, !noPush, requireMassDeleteConfirmation)
@@ -472,17 +472,17 @@ Use --merge to merge the sync branch back to main branch.`,
}
if pullResult.Pulled {
if pullResult.Merged {
// bd-3s8 fix: divergent histories were merged at content level
// Divergent histories were merged at content level
fmt.Printf("✓ Merged divergent histories from %s\n", syncBranchName)
// bd-7z4: Print safety warnings from result
// Print safety warnings from result
for _, warning := range pullResult.SafetyWarnings {
fmt.Fprintln(os.Stderr, warning)
}
// bd-4u8: Handle safety check with confirmation requirement
// Handle safety check with confirmation requirement
if pullResult.SafetyCheckTriggered && !pullResult.Pushed {
// bd-dmd: Don't duplicate SafetyCheckDetails - it's already in SafetyWarnings
// Don't duplicate SafetyCheckDetails - it's already in SafetyWarnings
// Prompt for confirmation
fmt.Fprintf(os.Stderr, "Push these changes to remote? [y/N]: ")
@@ -503,7 +503,7 @@ Use --merge to merge the sync branch back to main branch.`,
fmt.Println("If this was unintended, use 'git reflog' on the sync branch to recover.")
}
} else if pullResult.Pushed {
// bd-7ch: auto-push after merge
// Auto-push after merge
fmt.Printf("✓ Pushed merged changes to %s\n", syncBranchName)
pushedViaSyncBranch = true
}
@@ -582,7 +582,7 @@ Use --merge to merge the sync branch back to main branch.`,
// Step 4: Import updated JSONL after pull
// Enable --protect-left-snapshot to prevent git-history-backfill from
// tombstoning issues that were in our local export but got lost during merge (bd-sync-deletion fix)
// tombstoning issues that were in our local export but got lost during merge
fmt.Println("→ Importing updated JSONL...")
if err := importFromJSONL(ctx, jsonlPath, renameOnImport, noGitHistory, true); err != nil {
FatalError("importing: %v", err)
@@ -648,7 +648,7 @@ Use --merge to merge the sync branch back to main branch.`,
if hasPostImportChanges {
fmt.Println("→ Committing DB changes from import...")
if useSyncBranch {
// Commit to sync branch via worktree (bd-e3w)
// Commit to sync branch via worktree
result, err := syncbranch.CommitToSyncBranch(ctx, repoRoot, syncBranchName, jsonlPath, !noPush)
if err != nil {
FatalError("committing to sync branch: %v", err)
@@ -693,7 +693,7 @@ Use --merge to merge the sync branch back to main branch.`,
if dryRun {
fmt.Println("\n✓ Dry run complete (no changes made)")
} else {
// Clean up temporary snapshot files after successful sync (bd-0io)
// Clean up temporary snapshot files after successful sync
// This runs regardless of whether pull was performed
sm := NewSnapshotManager(jsonlPath)
if err := sm.Cleanup(); err != nil {
@@ -901,7 +901,7 @@ func gitCommit(ctx context.Context, filePath string, message string) error {
}
// Commit from repo root context with config-based author and signing options
// Use pathspec to commit ONLY this file (bd-trgb fix)
// Use pathspec to commit ONLY this file
// This prevents accidentally committing other staged files
commitArgs := buildGitCommitArgs(repoRoot, message, "--", relPath)
commitCmd := exec.CommandContext(ctx, "git", commitArgs...)
@@ -913,10 +913,10 @@ func gitCommit(ctx context.Context, filePath string, message string) error {
return nil
}
// gitCommitBeadsDir stages and commits only sync-related files in .beads/ (bd-red fix)
// gitCommitBeadsDir stages and commits only sync-related files in .beads/
// This ensures bd sync doesn't accidentally commit other staged files.
// Only stages specific sync files (issues.jsonl, deletions.jsonl, metadata.json)
// to avoid staging gitignored snapshot files that may be tracked. (bd-guc fix)
// to avoid staging gitignored snapshot files that may be tracked.
// Worktree-aware: handles cases where .beads is in the main repo but we're running from a worktree.
func gitCommitBeadsDir(ctx context.Context, message string) error {
beadsDir := beads.FindBeadsDir()
@@ -930,7 +930,7 @@ func gitCommitBeadsDir(ctx context.Context, message string) error {
return fmt.Errorf("cannot determine repository root")
}
// Stage only the specific sync-related files (bd-guc)
// Stage only the specific sync-related files
// This avoids staging gitignored snapshot files (beads.*.jsonl, *.meta.json)
// that may still be tracked from before they were added to .gitignore
syncFiles := []string{
@@ -969,7 +969,7 @@ func gitCommitBeadsDir(ctx context.Context, message string) error {
message = fmt.Sprintf("bd sync: %s", time.Now().Format("2006-01-02 15:04:05"))
}
// Commit only .beads/ files using -- pathspec (bd-red)
// Commit only .beads/ files using -- pathspec
// This prevents accidentally committing other staged files that the user
// may have staged but wasn't ready to commit yet.
// Convert beadsDir to relative path for git commit (worktree-aware)
@@ -1091,13 +1091,13 @@ func checkMergeDriverConfig() {
}
func gitPull(ctx context.Context) error {
// Check if any remote exists (bd-biwp: support local-only repos)
// Check if any remote exists (support local-only repos)
if !hasGitRemote(ctx) {
return nil // Gracefully skip - local-only mode
}
// Get current branch name
// Use symbolic-ref to work in fresh repos without commits (bd-flil)
// Use symbolic-ref to work in fresh repos without commits
branchCmd := exec.CommandContext(ctx, "git", "symbolic-ref", "--short", "HEAD")
branchOutput, err := branchCmd.Output()
if err != nil {
@@ -1126,7 +1126,7 @@ func gitPull(ctx context.Context) error {
// gitPush pushes to the current branch's upstream
// Returns nil if no remote configured (local-only mode)
func gitPush(ctx context.Context) error {
// Check if any remote exists (bd-biwp: support local-only repos)
// Check if any remote exists (support local-only repos)
if !hasGitRemote(ctx) {
return nil // Gracefully skip - local-only mode
}