beads/internal
Marco Del Pin f724b612d2
fix: Deduplicate database paths when symlinks present (#354)
Fixes a bug where FindAllDatabases() would return the same database
multiple times when symlinks were present in the directory hierarchy.

The issue occurred because the function walked up the directory tree
without resolving symlinks or checking if a database had already been
discovered. This led to confusing warnings about "multiple databases"
even when only one physical database existed.

Changes:
- Added symlink resolution using filepath.EvalSymlinks()
- Implemented deduplication using a seen map with canonical paths
- Added comprehensive tests for symlink scenarios

This ensures that each unique database is reported exactly once,
regardless of how many symlinks point to it in the directory tree.

Resolves duplicate database warnings when symlinks are present.
2025-11-21 12:22:33 -08:00
..
autoimport Improve staleness check error handling and optimization (bd-n4td, bd-o4qy, bd-c4rq) 2025-11-20 20:45:39 -05:00
beads fix: Deduplicate database paths when symlinks present (#354) 2025-11-21 12:22:33 -08:00
compact Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
config Centralize BD_DEBUG logging into internal/debug package 2025-11-06 20:14:34 -08:00
configfile Remove version field from metadata.json 2025-11-08 18:16:39 -08:00
daemon Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
debug Centralize BD_DEBUG logging into internal/debug package 2025-11-06 20:14:34 -08:00
git Fix branchExists test after signature change 2025-11-02 20:30:31 -08:00
importer Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
lockfile Standardize daemon detection with tryDaemonLock probe (bd-wgu4) 2025-11-07 21:02:38 -08:00
merge Annotate gosec-safe file accesses 2025-11-17 10:12:46 -07:00
routing Fix TestRoutingIntegration and improve DetectUserRole robustness 2025-11-20 19:04:42 -05:00
rpc Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
storage test: Tag 16 slow integration tests with build tags 2025-11-21 14:40:22 -05:00
syncbranch fix: Add context.Background() to sqlite.New() calls in test files 2025-11-21 14:48:41 -05:00
testutil Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
types feat: Add ancestor_id field and implement epic/child filtering 2025-11-05 00:44:41 -08:00
util Extract normalizeLabels to internal/util/strings.go 2025-11-06 20:00:08 -08:00
utils fix: improve ResolvePartialID / ResolveID handling for bd show (issue #336) 2025-11-19 05:54:28 -05:00
validation Refactor: Extract duplicated validation logic to internal/validation 2025-11-20 20:39:23 -05:00