Steve Yegge
79b7a48a73
Add database fingerprinting and validation (bd-166)
- Add fingerprint.go with robust URL canonicalization
- Handles git@, ssh://, https://, http://, file://, and local paths
- Normalizes URLs to produce consistent repo_id across formats
- Clone ID uses git repo root for stability
- Update init.go to store repo_id and clone_id metadata
- repo_id: SHA256 hash of canonical git remote URL
- clone_id: SHA256 hash of hostname + repo root path
- Add daemon validation to prevent database mismatches
- Validates repo_id on daemon start
- Fails on legacy databases (requires explicit migration)
- Clear error messages with actionable solutions
- Add migrate --update-repo-id command
- Updates repo_id after remote URL changes
- Confirmation prompt (can bypass with --yes)
- Supports --dry-run
Prevents accidental database mixing across repos and provides
migration path for remote URL changes or bd upgrades.
Closes bd-166
Amp-Thread-ID: https://ampcode.com/threads/T-a9d9dab1-5808-4f62-93ea-75a16cca978b
Co-authored-by: Amp <amp@ampcode.com>
2025-10-26 21:15:57 -07:00
..
2025-10-26 18:44:27 -07:00
2025-10-24 12:40:56 -07:00
2025-10-25 17:49:17 -07:00
2025-10-25 13:50:32 -07:00
2025-10-25 13:33:51 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 16:35:40 -07:00
2025-10-25 18:13:49 -07:00
2025-10-23 14:14:22 -07:00
2025-10-25 18:13:49 -07:00
2025-10-26 18:37:25 -07:00
2025-10-22 13:59:58 -07:00
2025-10-22 13:59:58 -07:00
2025-10-26 18:37:25 -07:00
2025-10-20 21:08:49 -07:00
2025-10-26 18:37:25 -07:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-10-26 21:15:57 -07:00
2025-10-26 19:03:00 -07:00
2025-10-24 00:56:18 -07:00
2025-10-25 18:44:38 -07:00
2025-10-24 16:35:40 -07:00
2025-10-25 18:44:38 -07:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 13:45:04 -07:00
2025-10-25 18:13:49 -07:00
2025-10-24 12:27:07 -07:00
2025-10-25 13:20:16 -07:00
2025-10-25 16:36:18 -07:00
2025-10-26 20:35:37 -07:00
2025-10-26 12:37:46 -07:00
2025-10-24 21:34:56 -07:00
2025-10-23 23:08:02 -07:00
2025-10-25 13:33:51 -07:00
2025-10-23 10:25:13 -07:00
2025-10-23 18:41:54 -07:00
2025-10-25 18:13:49 -07:00
2025-10-25 16:37:54 -07:00
2025-10-24 13:45:04 -07:00
2025-10-25 16:43:44 -07:00
2025-10-25 16:43:44 -07:00
2025-10-26 18:16:27 -07:00
2025-10-26 21:15:57 -07:00
2025-10-26 20:17:48 -07:00
2025-10-26 20:17:48 -07:00
2025-10-25 11:27:24 -07:00
2025-10-24 12:40:56 -07:00
2025-10-25 18:13:49 -07:00
2025-10-26 14:45:09 -07:00
2025-10-25 13:33:51 -07:00
2025-10-26 19:20:59 -07:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-10-22 12:24:08 -07:00
2025-10-25 18:13:49 -07:00
2025-10-26 19:20:59 -07:00
2025-10-26 21:15:57 -07:00
2025-10-26 13:24:18 -07:00
2025-10-24 16:35:40 -07:00
2025-10-25 18:54:00 -07:00
2025-10-25 18:04:05 -07:00
2025-10-20 21:08:49 -07:00
2025-10-21 14:56:18 -07:00
2025-10-20 21:08:49 -07:00
2025-10-25 18:44:38 -07:00
2025-10-25 11:27:24 -07:00
2025-10-25 10:39:45 -07:00
2025-10-25 18:44:38 -07:00
2025-10-24 10:07:05 -07:00
2025-10-24 17:06:22 -07:00
2025-10-24 00:56:18 -07:00
2025-10-25 18:44:38 -07:00
2025-10-26 20:17:48 -07:00
2025-10-24 00:56:18 -07:00
2025-10-26 17:42:05 -07:00
2025-10-22 23:05:00 -07:00
2025-10-24 15:28:23 -07:00