docs(6209): wide net, startup, stamps, slippage, miss route and parity tests
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m10s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 1m23s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m10s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 1m23s
Eight more test files state the property they pin as a present-tense fact. Incident narratives (a dated storage stall, a week of zero tuning events, a two-project poisoned ledger, a twenty-site owner audit) become the failure shape each test defends; one-install figures that name a rule become a general worked example with the calibration numbers kept. The family-grouping regression guard is renamed for what it checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+15
-16
@@ -1,10 +1,10 @@
|
||||
"""The wide net: many candidates, no bar, and a cost that stays bounded (#4103).
|
||||
"""The wide net: many candidates, no bar, and a cost that stays bounded.
|
||||
|
||||
WHY THIS EXISTS
|
||||
|
||||
Milestone 416 step 5 moves "do not exclude potentially important data" off the
|
||||
push, where fifty candidates would be a wall nobody reads, and onto a pull,
|
||||
where they arrive only when a session asks for them.
|
||||
"Do not exclude potentially important data" belongs on a pull, not the push:
|
||||
fifty candidates pushed would be a wall nobody reads, and pulled they arrive
|
||||
only when a session asks for them.
|
||||
|
||||
Three things have to hold, and each has a way of quietly failing:
|
||||
|
||||
@@ -12,13 +12,13 @@ Three things have to hold, and each has a way of quietly failing:
|
||||
not trust a threshold to decide for them. A default floor creeping in
|
||||
here would turn the wide net into the narrow one and nothing would look
|
||||
wrong — the results would simply be fewer.
|
||||
2. **A bounded cost.** The step was filed claiming fifty "costs nothing".
|
||||
`_rule_hint_line` had already measured ~143 tokens for a line with its
|
||||
trigger rendered, so fifty is ~7,000. The graduated shape (#3851) is what
|
||||
keeps this affordable, and a change that renders every trigger in full
|
||||
2. **A bounded cost.** Fifty candidates do not cost nothing: a line with
|
||||
its trigger rendered is ~143 tokens, so fifty is ~7,000. The graduated
|
||||
shape is what keeps this affordable, and a change that renders every trigger in full
|
||||
would pass every other test here.
|
||||
3. **A pull, logged as one.** The push arms' near-miss distributions are the
|
||||
evidence #4121 argues from. A pull mixed into them moves those numbers.
|
||||
evidence their floors are tuned from. A pull mixed into them moves those
|
||||
numbers.
|
||||
"""
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
@@ -71,7 +71,7 @@ async def test_the_limit_is_clamped_to_the_cap(asked, expected):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_the_head_carries_its_trigger_whole_and_the_tail_is_cut():
|
||||
"""The graduated shape (#3851), which is what makes fifty affordable.
|
||||
"""The graduated shape, which is what makes fifty affordable.
|
||||
|
||||
A regression that rendered every trigger in full would satisfy every other
|
||||
assertion in this file, so the cut is pinned on both sides: the head is
|
||||
@@ -104,8 +104,7 @@ async def test_a_short_trigger_is_never_marked_truncated():
|
||||
|
||||
|
||||
def test_the_cut_breaks_on_a_word_and_says_it_was_cut():
|
||||
"""#4036's lesson, borrowed: a raw slice ends mid-word and reads as the
|
||||
whole thing."""
|
||||
"""A raw slice ends mid-word and reads as the whole thing."""
|
||||
text, cut = wide_net._teaser("alpha beta gamma delta " * 40)
|
||||
assert cut is True
|
||||
assert text.endswith("…")
|
||||
@@ -152,7 +151,7 @@ async def test_the_call_is_logged_under_its_own_pull_source():
|
||||
|
||||
|
||||
def test_the_wide_net_is_not_one_of_the_tunable_push_surfaces():
|
||||
"""THE GUARD that keeps #4121's evidence clean (rule 167).
|
||||
"""THE GUARD that keeps the push arms' tuning evidence clean.
|
||||
|
||||
The registry holds the PUSH arms — the ones with a floor and a budget the
|
||||
model tunes. This source must not appear there: a pull folded into those
|
||||
@@ -175,7 +174,7 @@ def test_the_wide_net_is_not_ambient_either():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_a_search_that_never_ran_is_not_reported_as_a_decline():
|
||||
"""#3765: an empty query, a dead embedder and a failed query all return
|
||||
"""An empty query, a dead embedder and a failed query all return
|
||||
nothing, and none of them is a ranker declining."""
|
||||
with _patched([], report={"searched": False, "best_available_score": None}), \
|
||||
patch.object(wide_net, "record_retrieval") as rec, \
|
||||
@@ -189,7 +188,7 @@ async def test_a_search_that_never_ran_is_not_reported_as_a_decline():
|
||||
@pytest.mark.asyncio
|
||||
async def test_what_the_bar_turned_away_is_carried_through():
|
||||
"""There is no bar here, but `best_available` still answers "did the corpus
|
||||
have anything at all" for a call that came back empty (#3670)."""
|
||||
have anything at all" for a call that came back empty."""
|
||||
with _patched([], report={"searched": True, "best_available_score": 0.31,
|
||||
"best_available_id": 7}), \
|
||||
patch.object(wide_net, "record_retrieval") as rec, \
|
||||
@@ -230,7 +229,7 @@ def test_it_is_registered_and_readable_with_a_read_key():
|
||||
|
||||
|
||||
def test_the_instruction_surfaces_point_at_it():
|
||||
"""Rule 119: the instruction surfaces ARE the specification for product
|
||||
"""The instruction surfaces ARE the specification for product
|
||||
behaviour, so a tool the reflex never learns about is not shipped."""
|
||||
import pathlib
|
||||
|
||||
|
||||
Reference in New Issue
Block a user