docs(6209): task document, query scrubbing, note pipeline, lesson door, live body, ledger clear, rule usage

Seven more test files: docstrings and comments state the property and its
reason, the SQL-twin note states why `\m` and not `\b` without the install
it broke, and fixture provenance says "real near-miss queries" rather than
naming the spike that collected them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 21:29:49 -04:00
co-authored by Claude Opus 5.5
parent 17e1931c0b
commit 0e658bf275
7 changed files with 81 additions and 92 deletions
+8 -8
View File
@@ -1,9 +1,9 @@
"""The notes corpus on the one retrieval pipeline (milestone 456 step 4).
"""The notes corpus on the one retrieval pipeline.
`run_note_arm` is driven directly here, with the search and both recorders
stubbed through `NoteIO`: the stage order, the invariants the rule arms
already pin (#3497's call row before any return, #3752's fresh-only cut,
#4101's ledger-renders-not-removes), the write path's withheld menu (#3739),
already pin (the call row before any return, the fresh-only cut, the ledger
renders rather than removes), the write path's withheld menu,
and the two reserved slots in their load-bearing order. The builders that
compose these arms keep their own tests; these pin the stages they share.
"""
@@ -53,7 +53,7 @@ async def _run(arm, route, *, budget=3, **moment):
return result, io, calls
# ── the call row (#3497, #3752) ───────────────────────────────────────────
# ── the call row ──────────────────────────────────────────────────────────
@pytest.mark.asyncio
@@ -75,7 +75,7 @@ async def test_repeats_and_named_records_are_counted_not_reported():
(row,) = _rows(io.record_retrieval, "auto_inject")
assert [int(n.id) for _s, n in row["results"]] == [22]
assert row["suppressed"] == 2
# The repeat stays on the menu (#4101); the named record does not — it is
# The repeat stays on the menu; the named record does not — it is
# shown by its own block.
assert [int(n.id) for _s, n in result.menu] == [11, 22]
(surfaced,) = _rows(io.record_surfaced, "auto_inject")
@@ -105,7 +105,7 @@ def test_every_notes_stage_logs_before_it_can_return():
@pytest.mark.asyncio
async def test_the_band_narrows_the_menu_after_the_row_is_written():
"""Notes log BEFORE the band (#2085) — the row is the candidate set a
"""Notes log BEFORE the band — the row is the candidate set a
floor is tuned against, the surfacing rows are what the reader saw."""
hits = [_note(1, 0.90), _note(2, 0.70)]
result, io, _ = await _run(rp.WRITE_PATH, lambda kw: hits)
@@ -141,7 +141,7 @@ async def test_a_recorder_that_raises_costs_only_its_row():
assert [int(n.id) for _s, n in result.menu] == [1]
# ── the write path's withheld menu (#3739) ────────────────────────────────
# ── the write path's withheld menu ────────────────────────────────────────
@pytest.mark.asyncio
@@ -223,7 +223,7 @@ async def test_a_slot_stands_down_when_its_kind_won_on_score():
@pytest.mark.asyncio
async def test_a_slot_spends_itself_on_a_repeat_without_booking_it_again():
"""A record shown in an EARLIER call is exactly what a slot may spend
itself on (#4101) — it is rendered, but it is not a new surfacing."""
itself on — it is rendered, but it is not a new surfacing."""
main = [_note(1, 0.70)]
lesson = [_note(42, 0.58, note_type=LESSON_NOTE_TYPE)]
result, io, _ = await _run(