docs(6209): forty test files — design cascade and stylesheet, embeddings, family canon, forge, backup round trips, inception, placement, platforms, moments, rule move and verification, search scope, facets
Module and test docstrings state what is pinned without the record number or step that introduced it. Incident accounts become the failure shape in the present tense: the pipefail head, the code_shapes import, the export order, the facet dialects, the cross-kind repeat, the write-once kind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
"""Real-Postgres crowd tests: an in-scope record is found however many nearer
|
||||
records sit outside the scope (#4961; the rule search's is #4958's, in
|
||||
records sit outside the scope (the rule search's crowd test is in
|
||||
test_integration_rule_scope).
|
||||
|
||||
Ordered straight off a `*_embeddings` table, the planner can walk the HNSW
|
||||
index, which takes ~`hnsw.ef_search` (40) nearest chunks from every owner and
|
||||
project and only then applies the scope. Each test here puts 80 out-of-scope
|
||||
records nearer the query than the reader's one in-scope record, so the old
|
||||
shape could not reach it when the index served the order. What a test cannot
|
||||
force is the plan — the shape guard in test_search_scope_shape is what fails
|
||||
on the old query whatever Postgres picks.
|
||||
records nearer the query than the reader's one in-scope record, so a query
|
||||
that scopes after the index walk cannot reach it when the index serves the
|
||||
order. What a test cannot force is the plan — the shape guard in
|
||||
test_search_scope_shape is what fails on that query whatever Postgres picks.
|
||||
|
||||
Rows are inserted directly with hand-made vectors and the embedder is stubbed,
|
||||
so the scope alone decides what comes back.
|
||||
@@ -57,7 +57,7 @@ def _chunk(model, key: str, record_id: int, vec: list[float], **extra):
|
||||
async def _found(search, user_id: int, **scope) -> set[int]:
|
||||
"""The ids a search finds. Every search fails open, so a query that raised
|
||||
reads as an empty result — the swallowed traceback is captured and named
|
||||
in the failure instead (#4958)."""
|
||||
in the failure instead."""
|
||||
raised: list[str] = []
|
||||
with patch("scribe.services.embeddings.get_embedding",
|
||||
AsyncMock(return_value=QUERY_VEC)), \
|
||||
|
||||
Reference in New Issue
Block a user