A pull that brings a role a better text, as fetch text does, puts it back in extract's queue beside dropping its vector, so a role extract read from its title alone is read again from its text.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
7ac63dea7c
commit
0b92f19f4d
3 files changed
+77
-10
No files matched your search
@@ -237,6 +237,24 @@ def test_a_batch_stores_what_the_pages_filled_and_drops_those_vectors(
|
||||
assert again.place == "Copenhagen"
|
||||
|
||||
|
||||
def test_a_role_extract_read_without_text_waits_for_it_again_once_its_page_is_read(
|
||||
store: Store, tmp_path: Path, web: dict[str, Any]) -> None:
|
||||
"""Extract read the title alone; the page's text puts the role back in
|
||||
its queue, and a page that gave nothing leaves it read."""
|
||||
board(store, "fake:acme")
|
||||
filled, empty = (role(store, "fake:acme", n) for n in ("1", "2"))
|
||||
with store.transaction() as conn:
|
||||
conn.execute("UPDATE roles SET extracted_at = '2026-09-22T00:00:00+00:00', "
|
||||
"extract_tries = 1")
|
||||
web["answers"].update({f"{BASE}/acme/1": b"Python in full"})
|
||||
|
||||
fetch_text.run_batch(config(tmp_path), store, target="fake:acme", uids=[filled, empty])
|
||||
|
||||
first, second = store.role(filled), store.role(empty)
|
||||
assert first is not None and first.extracted_at is None
|
||||
assert second is not None and second.extracted_at == "2026-09-22T00:00:00+00:00"
|
||||
|
||||
|
||||
def test_a_board_switched_off_since_the_plan_reads_nothing(
|
||||
store: Store, tmp_path: Path, web: dict[str, Any]) -> None:
|
||||
sub = board(store, "fake:acme")
|
||||
|
||||
Reference in new issue
Block a user