Extract gate columns from posting text with a Haiku ModelTask

roledesk job extract reads open, unanswered roles 20 to a call and fills
place, country, remote, seniority, salary, currency, function, permit and
languages, only into columns the board left empty. Schema v2 adds
roles.permit, roles.languages and roles.extract_tries. Off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-23 12:05:30 +02:00
1 parent b44f78ca7e
commit 4dfb8831aa
12 files changed
+578 -14

No files matched your search

+19
View File
@@ -75,6 +75,25 @@ def test_a_newer_file_is_refused(tmp_path: Path) -> None:
Store(path)
def _columns(path: Path, table: str) -> list[tuple[str, str, int, str]]:
with sqlite3.connect(path) as conn:
return [(r[1], r[2], r[3], r[4]) for r in conn.execute(f"PRAGMA table_info({table})")]
def test_a_v1_file_migrates_to_the_shape_a_new_file_has(tmp_path: Path) -> None:
fresh, old = tmp_path / "fresh.db", tmp_path / "old.db"
Store(fresh)
Store(old)
with sqlite3.connect(old) as conn:
for column in ("permit", "languages", "extract_tries"):
conn.execute(f"ALTER TABLE roles DROP COLUMN {column}")
conn.execute("PRAGMA user_version = 1")
assert Store(old).migrations_applied == list(range(2, LATEST + 1))
# ALTER appends, so the order differs; every read is by column name.
assert sorted(_columns(old, "roles")) == sorted(_columns(fresh, "roles"))
def test_state_is_a_mapping(store: Store) -> None:
store.state["ats:last"] = "2026-09-23"
assert store.state["ats:last"] == "2026-09-23"