Skip to content

self-heal stale index entries on list NotFound#89

Merged
fabracht merged 2 commits into
mainfrom
self-heal-stale-index
May 30, 2026
Merged

self-heal stale index entries on list NotFound#89
fabracht merged 2 commits into
mainfrom
self-heal-stale-index

Conversation

@fabracht

Copy link
Copy Markdown
Contributor

Summary

  • list_from_index_ids now purges stale idx/{entity}/.../{id} entries whose data row is missing, instead of just logging a WARN each call. Race-safe: re-checks the row is absent before deleting.
  • Atomic row+index delete (95c138c) already prevents new stale entries; this self-heals pre-existing ones and any from paths outside the agent crate.

Test plan

  • cargo make dev (format + clippy + 748+ tests)
  • list_purges_stale_index_entry_for_missing_row — manually injected stale entry is purged on next indexed list
  • purge_skips_when_row_was_recreated_before_heal — race guard leaves entries alone when row exists

@fabracht fabracht merged commit e03075e into main May 30, 2026
5 checks passed
@fabracht fabracht deleted the self-heal-stale-index branch May 30, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant