Hand search roles without text to enrich too, so a Jobbank role above the bar is read on its own page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-10-03 12:31:21 +02:00
1 parent 04f4c09a21
commit 8a033e028d
2 files changed
+2 -12

No files matched your search

+2 -2
View File
@@ -1770,7 +1770,7 @@ class Store:
def enrich_waiting(self, top: int, floor: float,
uids: Sequence[str] | None = None) -> list[dict[str, Any]]:
"""Open `ats` roles without text that an enabled agent with a prompt
"""Open board and search roles without text that an enabled agent with a prompt
ranks ungated among its best `top` and at `floor` or above, best
first by the highest such score, as `{uid, source_id,
subscription_id, title, url, published_at, raw, score}`. The ranking
@@ -1780,7 +1780,7 @@ class Store:
dealt."""
fields = ("r.uid, r.source_id, r.subscription_id, r.title, r.original_url AS url, "
"r.published_at, r.raw")
waiting = ("r.closed_at IS NULL AND r.dup_of IS NULL AND r.source = 'ats' "
waiting = ("r.closed_at IS NULL AND r.dup_of IS NULL AND r.source IN ('ats', 'search') "
"AND r.subscription_id IS NOT NULL AND r.description = '' "
"AND r.article_text = ''")
if uids is not None:
-10
View File
@@ -245,12 +245,6 @@ AD = (ROOT / "tests" / "fixtures" / "search" / "jobbank-detail.html").read_bytes
AD_URL = "https://jobbank.dk/job/1234/acme/role"
#: `Store.enrich_waiting` hands over `source = 'ats'` roles only, and a search's
#: are `search`: until it takes both, the tests that need its answer fail.
needs_waiting = pytest.mark.xfail(
reason="Store.enrich_waiting reads source 'ats' only", strict=False)
def search(store: Store, target: str = "jobbank:cph") -> Any:
return store.add_subscription("search", target, label=target, params={"q": "x"})
@@ -269,7 +263,6 @@ def search_role(store: Store, target: str, native: str, *, provider: str = "") -
return item.uid
@needs_waiting
def test_a_search_whose_reader_has_detail_is_planned_like_a_board(
store: Store, tmp_path: Path, web: dict[str, Any]) -> None:
search(store)
@@ -291,7 +284,6 @@ def test_a_search_whose_reader_has_detail_is_planned_like_a_board(
assert enrich.plan(config(tmp_path), store) == [("fake:acme", [f])]
@needs_waiting
def test_a_search_role_read_waits_for_the_retry_and_a_failed_one_goes_last(
store: Store, tmp_path: Path, web: dict[str, Any]) -> None:
search(store)
@@ -307,7 +299,6 @@ def test_a_search_role_read_waits_for_the_retry_and_a_failed_one_goes_last(
assert enrich.plan(config(tmp_path), store) == [("jobbank:cph", [three, two])]
@needs_waiting
def test_a_batch_reads_a_search_roles_page_and_stores_its_text(
store: Store, tmp_path: Path, web: dict[str, Any]) -> None:
search(store)
@@ -330,7 +321,6 @@ def test_a_batch_reads_a_search_roles_page_and_stores_its_text(
assert enrich.plan(config(tmp_path), store) == []
@needs_waiting
def test_a_search_batch_counts_a_404_as_read_as_a_board_does(
store: Store, tmp_path: Path, web: dict[str, Any]) -> None:
search(store)