Fix: Improve staleness check error handling (bd-2q6d, bd-o4qy, bd-n4td)
Changes: - CheckStaleness now returns errors for corrupted last_import_time metadata instead of silently returning false (bd-o4qy) - Added handling for empty string metadata (memory store behavior) - Enhanced warning messages when staleness check fails to be more explicit that operation continues with potentially stale data (bd-n4td) - Added test coverage for corrupted metadata scenario Closes bd-2q6d, bd-o4qy, bd-n4td 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,8 @@ func ensureDatabaseFresh(ctx context.Context) error {
|
||||
if err != nil {
|
||||
// If we can't determine staleness, allow operation to proceed
|
||||
// (better to show potentially stale data than block user)
|
||||
fmt.Fprintf(os.Stderr, "Warning: could not check database staleness: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Warning: Could not verify database freshness: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Proceeding anyway. Data may be stale.\n\n")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user