mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-30 07:37:38 +00:00
prepareRowIDSubQueries excluded `d` from tagsAll (it is matched on
event_headers.d_tag, not event_tags) but built the d_tag condition only
from `tags["d"]`, so a tagsAll d vanished from every filter that went
through the row-id subquery. `delete(Filter(tagsAll = {"d": ["x"]}))` then
had no condition left and deleted every row in the store; a tag-join
query or a multi-filter union/count with a tagsAll d over-matched.
Both the subquery and toFilterWithDTags now read the d values from one
helper, Filter.dTagValues(), so every path folds tagsAll d into the d_tag
condition the way the simple path already did (STORE-F05 updated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMvT9WHj9DC2i5YzveLsFw