Josh Nichols
8fe48d09be
fix(staleness): auto-import on stale DB for read-only commands (bd-9dao) ( #982 )
...
When database is stale and a read-only command runs in --no-daemon mode,
auto-import from JSONL instead of returning an error. This fixes `gt sling`
failing with 'not a valid bead' after git pull.
Root cause: `ensureDatabaseFresh` would return an error when DB was stale,
but read-only commands like `bd show` should be able to auto-import and
proceed rather than blocking the user.
Changes:
- Modify ensureDatabaseFresh to call autoImportIfNewer() when stale
- Only error if --no-auto-import flag is explicitly set
- Add comprehensive tests for all staleness scenarios
Fixes: bd-9dao
Co-authored-by: Claude <noreply@anthropic.com >
2026-01-09 13:40:52 -08:00
..
2026-01-09 11:04:28 -08:00
2026-01-02 00:19:14 -08:00
2026-01-06 23:51:29 -08:00
2025-12-27 16:21:08 -08:00
2026-01-06 22:18:37 -08:00
2026-01-03 13:25:15 -08:00
2026-01-06 22:18:37 -08:00
2025-12-18 18:23:30 -08:00
2026-01-06 19:05:34 -08:00
2026-01-08 14:36:50 -08:00
2026-01-09 12:38:18 -08:00
2026-01-06 12:52:19 -08:00
2026-01-04 15:43:57 -08:00
2026-01-08 12:15:07 -08:00
2026-01-06 18:59:25 -08:00
2026-01-06 19:05:34 -08:00
2025-12-30 00:00:25 -08:00
2026-01-06 18:59:25 -08:00
2026-01-06 19:37:20 -08:00
2025-12-29 14:03:39 -08:00
2026-01-01 10:46:56 -08:00
2026-01-02 16:00:54 -08:00
2025-12-23 12:06:42 -08:00
2026-01-08 14:36:47 -08:00
2026-01-04 11:13:48 -08:00
2026-01-06 19:13:49 -08:00
2026-01-06 19:13:49 -08:00
2026-01-04 10:53:31 -08:00
2026-01-06 19:29:57 -08:00
2026-01-07 21:27:20 -08:00
2026-01-04 16:16:53 -08:00
2026-01-04 11:14:36 -08:00
2026-01-06 12:52:19 -08:00
2026-01-03 13:22:52 -08:00
2026-01-06 18:59:25 -08:00
2026-01-06 19:05:34 -08:00
2026-01-08 14:32:12 -08:00
2026-01-06 19:05:34 -08:00
2025-12-13 10:04:01 +11:00
2026-01-03 21:07:32 -08:00
2026-01-06 23:31:09 -08:00
2026-01-06 12:52:19 -08:00
2026-01-06 12:52:19 -08:00
2026-01-06 19:05:34 -08:00
2026-01-06 18:59:25 -08:00
2025-12-31 13:14:15 -08:00
2025-12-24 00:07:52 -08:00
2026-01-06 22:18:37 -08:00
2026-01-01 10:53:59 -08:00
2026-01-06 23:40:37 -08:00
2026-01-06 23:40:37 -08:00
2026-01-07 00:36:51 -08:00
2026-01-06 19:05:34 -08:00
2026-01-07 20:45:33 -08:00
2025-12-29 14:33:19 -08:00
2026-01-03 13:27:36 -08:00
2026-01-03 13:27:36 -08:00
2025-12-22 21:15:41 -08:00
2026-01-06 23:51:29 -08:00
2026-01-06 12:52:19 -08:00
2026-01-06 15:22:15 -08:00
2026-01-06 15:22:15 -08:00
2026-01-01 10:51:51 -08:00
2026-01-06 19:05:34 -08:00
2026-01-07 20:45:00 -08:00
2026-01-01 14:18:49 -08:00
2026-01-09 00:42:13 -08:00
2025-12-30 14:13:32 -08:00
2026-01-09 12:38:18 -08:00
2026-01-06 22:18:37 -08:00
2025-12-20 17:09:50 -08:00
2026-01-09 11:01:56 -08:00
2025-12-30 00:06:42 -08:00
2025-12-31 00:33:11 -08:00
2026-01-08 21:22:17 -08:00
2026-01-08 21:22:17 -08:00
2025-12-27 16:02:15 -08:00
2026-01-06 19:05:34 -08:00
2026-01-04 16:24:18 -08:00
2026-01-04 16:24:18 -08:00
2025-12-20 17:09:50 -08:00
2025-12-31 00:33:11 -08:00
2026-01-07 20:45:40 -08:00
2026-01-07 20:45:40 -08:00
2025-12-20 17:09:50 -08:00
2026-01-07 20:44:16 -08:00
2026-01-08 21:22:17 -08:00
2026-01-06 19:05:34 -08:00
2026-01-06 19:05:34 -08:00
2026-01-04 10:53:31 -08:00
2026-01-04 10:53:31 -08:00
2026-01-06 19:32:20 -08:00
2026-01-06 18:59:25 -08:00
2025-12-29 13:16:47 -08:00
2025-12-22 01:26:45 -08:00
2025-12-27 16:21:08 -08:00
2026-01-07 21:41:29 -08:00
2026-01-08 20:21:02 -08:00
2025-12-20 17:09:50 -08:00
2025-12-27 16:02:15 -08:00
2026-01-05 22:06:52 -08:00
2025-12-21 23:11:48 -08:00
2026-01-04 17:30:04 -08:00
2026-01-06 18:59:25 -08:00
2026-01-04 15:21:36 -08:00
2026-01-03 13:27:36 -08:00
2025-12-24 00:10:14 -08:00
2026-01-09 13:40:52 -08:00
2026-01-09 13:40:52 -08:00
2025-12-30 15:57:08 -08:00
2025-12-20 17:22:43 -08:00
2025-12-29 14:39:43 -08:00
2026-01-07 21:27:20 -08:00
2026-01-07 21:27:20 -08:00
2026-01-04 16:22:20 -08:00
2026-01-07 21:27:20 -08:00
2026-01-06 19:32:20 -08:00
2026-01-06 12:52:19 -08:00
2026-01-07 21:27:20 -08:00
2026-01-07 21:27:20 -08:00
2026-01-07 21:27:20 -08:00
2026-01-07 21:27:20 -08:00
2026-01-07 21:27:20 -08:00
2026-01-06 12:52:19 -08:00
2025-12-27 16:02:15 -08:00
2026-01-06 18:59:25 -08:00
2026-01-06 18:59:25 -08:00
2026-01-06 23:51:29 -08:00
2025-12-27 21:27:44 -08:00
2026-01-01 23:55:40 -08:00
2026-01-06 18:45:27 -08:00
2026-01-06 18:45:27 -08:00