docs(6209): test prose in the present tense — "used to", "previously", "before this" restated as the failure shape
Twenty-eight test files described the code they guard by what it did before a fix. Each is now the property and the failure it prevents, in the present tense: the backfill snapshot, the per-dial calibration query, the rule scope, the lesson trigger filter, the subshell global, the trash owner scope, the version readout fallback, and others. A docstring line that narrated the backup suite's own history is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
Ordered straight off a `*_embeddings` table, the planner walks the HNSW index:
|
||||
it takes ~`hnsw.ef_search` (40) nearest chunks from every owner and project
|
||||
and filters them afterwards, so an in-scope record behind 40 nearer ones the
|
||||
caller cannot see is silently dropped. The fix is one shape, `_rank_scoped`,
|
||||
and these pin that every search goes through it — the rule search was fixed
|
||||
alone first, and the other three kept the fault because nothing said they
|
||||
were the same query.
|
||||
caller cannot see is silently dropped. The remedy is one shape, `_rank_scoped`,
|
||||
and these pin that every search goes through it — fixed in one search alone,
|
||||
the others keep the fault, because nothing says they are the same query.
|
||||
|
||||
The integration lane's crowd tests show the behaviour on a real index; these
|
||||
are the guard that fails on the old shape whatever plan Postgres picks.
|
||||
are the guard that fails on a rank-then-scope query whatever plan Postgres
|
||||
picks.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -54,7 +54,7 @@ def test_every_semantic_search_ranks_through_the_scoped_shape():
|
||||
calls = _calls(fn)
|
||||
assert "_rank_scoped" in calls, f"{name} does not rank through _rank_scoped"
|
||||
assert "_scoped_chunks" in calls, f"{name} does not build its scope as chunks"
|
||||
# Its own ORDER BY is the old shape: a distance ordered on the
|
||||
# Its own ORDER BY is the rank-then-scope shape: a distance ordered on the
|
||||
# embedding table, which the index serves before the scope applies.
|
||||
assert "order_by" not in calls, f"{name} orders by distance itself"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user