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

+14
View File
@@ -47,6 +47,11 @@ CREATE TABLE IF NOT EXISTS roles (
currency TEXT NOT NULL DEFAULT '',
seniority TEXT NOT NULL DEFAULT '',
function TEXT NOT NULL DEFAULT '',
-- Whether the posting says it sponsors a work permit, and the languages
-- (ISO 639-1, a JSON array) it says are required. Only extract fills these.
permit TEXT NOT NULL DEFAULT ''
CHECK (permit IN ('', 'sponsors', 'no_sponsorship')),
languages TEXT NOT NULL DEFAULT '[]',
description TEXT NOT NULL DEFAULT '', -- the posting's body text
feed_text TEXT NOT NULL DEFAULT '', -- the teaser a feed handed over
original_url TEXT NOT NULL DEFAULT '', -- the posting page
@@ -59,6 +64,9 @@ CREATE TABLE IF NOT EXISTS roles (
closed_at TEXT,
raw TEXT NOT NULL DEFAULT '{}',
extracted_at TEXT, -- when extract last filled columns
-- Replies from extract that left this role unanswered. At GIVE_UP_AFTER it
-- is no longer offered. A column, not raw, because every upsert rewrites raw.
extract_tries INTEGER NOT NULL DEFAULT 0,
created_at TEXT NOT NULL
);
@@ -186,6 +194,12 @@ MIGRATIONS: tuple[tuple[int, str, Step], ...] = (
# Never run as a migration: a file without the marker table is created
# from `SCHEMA` and stamped. It exists so the first real migration is 2.
(1, "roles, companies, subscriptions, applications, agents, scores, state", ""),
(2, "roles.permit, roles.languages and roles.extract_tries, for extract", """
ALTER TABLE roles ADD COLUMN permit TEXT NOT NULL DEFAULT ''
CHECK (permit IN ('', 'sponsors', 'no_sponsorship'));
ALTER TABLE roles ADD COLUMN languages TEXT NOT NULL DEFAULT '[]';
ALTER TABLE roles ADD COLUMN extract_tries INTEGER NOT NULL DEFAULT 0;
"""),
)
#: What a file created from `SCHEMA` today is already at.