Repository navigation
test(es-compat): lock the filtered-alias by-query over-delete safety + _update_by_query aggregate deleted:0 (#553) - #556
Conversation
…_by_query aggregate deleted:0 (#553) Fast-follow to #450/#552. The 3-skeptic verification confirmed the filtered-alias over-delete safety by code inspection but flagged it was untested. This adds the execution test: a match_all _delete_by_query through a filtered 2-member alias deletes only the 2 in-slice (active) docs and leaves the 2 out-of-slice (archived) docs — the #524 hazard. Non-vacuous: without the filter, match_all would delete all 4 and empty both members. Also fixes the flagged nit: aggregate_by_query_results now includes deleted:0 for _update_by_query, matching the single-member update body (2+-member updates dropped it).
Independent 3-skeptic verification (each REFUTES, own worktree, rustc 1.98.0)Verdict: 0 BLOCKING — all three refuted=false / severity=none. Two skeptics independently ran a counterfactual that broke the alias-filter path and confirmed the safety test flips to failure. correctness (none): The test builds a truly FILTERED alias ( regression-risk (none): Full evidence-holds (none): Counterfactual: forced Gate: (a) checks green, none pending; (b) 0 BLOCKING; (c) CLEAN. Merging. |
Newest tag is now v1.0.0-rc.25 (includes xerj-org#555 fix xerj-org#451 class-B alias fan-out + xerj-org#556 fix xerj-org#553 filtered-alias over-delete safety lock). Footer XERJ.AI stamps + llms*.txt 'Current release' bumped rc.24 -> rc.25 across landing/ (48 files). landing-constants-guard passes with VERSION=1.0.0-rc.25.
Closes #553 (fast-follow to #450 / PR #552).
The gap this closes
The 3-skeptic verification of #552 confirmed — by code inspection — that a
_delete_by_querythrough a filtered alias removes only the slice the filter names (never the whole backing index, the #524 hazard), because the alias filter is ANDed into the query applied to every member. But two skeptics independently flagged that no test exercises it: the load-bearing over-delete-safety property was verified only by reading.The test
A
match_all_delete_by_querythrough a filtered 2-member alias (hot,filter: status=active, overidx-a/idx-b, each holding one active + one archived doc) must:deleted: 2(only the in-slice active docs), andNon-vacuous: without the filter,
match_allwould delete all 4 and empty both members — so the test fails loudly the moment the alias filter is ever dropped. It passes on currentmain(the #450 fix is correct).Nit (also flagged by the skeptics)
aggregate_by_query_resultsnow emits"deleted": 0for_update_by_query, matching the single-member update body — previously the 2+-member update response dropped a field the 1-member body has.Verification (rustc 1.98.0)
Full
xerj-apisuite 468 passed, 0 failed;fmt --check,clippy --workspace --all-targets -D warningsclean. Test-only + a 6-line response-consistency fix.