Steve Yegge
f027de93b6
Add schema compatibility probe to prevent silent migration failures (bd-ckvw)
...
- Implement comprehensive schema probe in sqlite.New() that verifies all
expected tables and columns after migrations
- Add retry logic: if probe fails, retry migrations once
- Return clear fatal error with missing schema elements if probe still fails
- Enhance daemon version gating: refuse RPC if client has newer minor version
- Improve checkVersionMismatch messaging: verify schema before claiming upgrade
- Add schema compatibility check to bd doctor command
- Add comprehensive tests for schema probing
This prevents the silent migration failure bug where:
1. Migrations fail silently
2. Database queries fail with 'no such column' errors
3. Import logic misinterprets as 'not found' and tries INSERT
4. Results in cryptic UNIQUE constraint errors
Fixes #262
Amp-Thread-ID: https://ampcode.com/threads/T-0d7ae2c0-9f12-4f9b-85d1-1291488af150
Co-authored-by: Amp <amp@ampcode.com >
2025-11-08 15:40:19 -08:00
..
2025-11-08 03:56:08 -08:00
2025-11-04 00:23:25 -08:00
2025-11-08 15:40:19 -08:00
2025-11-02 10:01:38 -08:00
2025-11-02 10:38:24 -08:00
2025-11-07 22:06:50 -08:00
2025-11-06 17:31:15 -08:00
2025-11-03 22:23:36 -08:00
2025-11-03 22:23:36 -08:00
2025-11-07 23:11:05 -08:00
2025-11-02 15:37:57 -08:00
2025-11-04 23:12:42 -08:00
2025-11-08 03:12:11 -08:00
2025-11-05 20:39:47 -08:00
2025-11-06 20:14:34 -08:00
2025-11-05 21:04:00 -08:00
2025-11-07 21:17:24 -08:00
2025-11-05 10:26:58 -08:00
2025-11-07 18:57:43 -08:00
2025-11-07 21:29:22 -08:00
2025-11-05 20:39:47 -08:00
2025-11-02 22:17:08 -08:00
2025-11-07 18:57:43 -08:00
2025-11-07 18:57:43 -08:00
2025-11-07 18:57:43 -08:00
2025-11-05 20:39:47 -08:00
2025-11-02 20:16:40 -08:00
2025-11-01 21:27:09 -07:00
2025-11-06 19:41:38 -08:00
2025-11-05 20:39:47 -08:00
2025-11-02 22:17:08 -08:00
2025-11-05 20:39:47 -08:00
2025-11-05 20:39:47 -08:00
2025-11-01 23:56:03 -07:00
2025-11-07 21:17:24 -08:00
2025-11-02 18:52:44 -08:00
2025-11-08 03:10:12 -08:00
2025-11-02 18:52:44 -08:00
2025-11-08 02:20:33 -08:00
2025-11-08 02:20:33 -08:00
2025-11-02 22:34:24 -08:00
2025-11-02 08:09:58 -08:00
2025-11-06 20:14:34 -08:00
2025-11-05 14:25:48 -08:00
2025-11-08 15:40:19 -08:00
2025-11-05 19:16:50 -08:00
2025-11-02 18:52:44 -08:00
2025-11-05 10:26:58 -08:00
2025-11-01 20:29:13 -07:00
2025-11-07 20:07:59 -08:00
2025-11-05 14:31:41 -08:00
2025-11-07 20:07:59 -08:00
2025-11-05 20:39:47 -08:00
2025-11-08 01:28:19 -08:00
2025-11-08 01:28:19 -08:00
2025-11-08 11:36:05 -08:00
2025-11-06 13:01:44 -08:00
2025-11-08 00:00:43 -08:00
2025-11-08 13:09:42 -08:00
2025-11-08 02:28:54 -08:00
2025-11-08 03:56:08 -08:00
2025-11-05 19:04:14 -08:00
2025-11-07 15:55:19 -08:00
2025-11-05 19:04:14 -08:00
2025-11-06 15:57:51 -08:00
2025-11-08 13:18:50 -08:00
2025-11-01 22:01:41 -07:00
2025-11-05 18:10:06 -08:00
2025-11-01 20:29:13 -07:00
2025-11-02 22:34:24 -08:00
2025-11-06 20:00:08 -08:00
2025-11-08 01:32:13 -08:00
2025-11-08 13:09:42 -08:00
2025-11-08 03:10:12 -08:00
2025-11-05 13:56:12 -08:00
2025-11-06 15:38:48 -08:00
2025-11-08 13:16:53 -08:00
2025-11-06 19:23:06 -08:00
2025-11-05 18:44:02 -08:00
2025-11-02 14:31:22 -08:00
2025-11-05 21:04:00 -08:00
2025-11-06 20:14:34 -08:00
2025-11-02 17:10:41 -08:00
2025-11-02 20:06:05 -08:00
2025-11-05 13:56:12 -08:00
2025-11-06 20:00:08 -08:00
2025-11-02 11:02:58 -08:00
2025-11-02 22:34:24 -08:00
2025-11-01 23:56:03 -07:00
2025-11-04 23:12:41 -08:00
2025-11-04 11:25:36 -08:00
2025-11-02 14:31:22 -08:00
2025-11-05 13:56:12 -08:00
2025-11-08 02:20:33 -08:00
2025-11-02 21:25:40 -08:00
2025-11-06 18:49:07 -08:00
2025-11-06 18:49:07 -08:00
2025-11-05 18:10:06 -08:00
2025-11-02 17:09:39 -08:00
2025-11-06 18:47:06 -08:00
2025-11-03 20:31:11 -08:00
2025-11-03 20:31:11 -08:00
2025-11-03 22:01:37 -08:00
2025-11-07 21:58:22 -08:00
2025-11-04 01:10:18 -08:00
2025-11-08 13:09:42 -08:00
2025-11-05 17:37:53 -08:00
2025-11-08 03:53:18 -08:00
2025-11-05 21:04:00 -08:00