Commit Graph
197 Commits
Author SHA1 Message Date
WolfandClaude Opus 5.5 0448a34ddb Type the fake host modules in the tests so mypy passes on them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:47:09 +02:00
WolfandClaude Opus 5.5 4fb06191cf Load the host modules when the registry reads ats.py by path without the repo root on sys.path
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:44:03 +02:00
WolfandClaude Opus 5.5 7f04c10e9e Forget a replaced or detached board's robots.txt verdict and detail lists with its failure record
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:43:24 +02:00
WolfandClaude Opus 5.5 60136765b2 Refuse a fetch to another port than 443, an IP address or a local host name, at every hop
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:42:58 +02:00
WolfandClaude Opus 5.5 f61caddced Match a slug whole, and compare an allowed host name without case
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:42:10 +02:00
WolfandClaude Opus 5.5 0ffd0726e9 Read never-tried roles before failed ones in detail, count a 404 as read, and take only the fields a later pull keeps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:41:39 +02:00
WolfandClaude Opus 5.5 1e47192aba Fail a board whose robots.txt cannot be read, and follow a robots.txt redirect to the host's www. twin only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:40:14 +02:00
WolfandClaude Opus 5.5 13ce99304b Match robots.txt rules by RFC 9309, the longest rule winning, with wildcards, end anchors and case-sensitive paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:39:11 +02:00
WolfandClaude Opus 5.5 a9fb4397ac Order the hosts by a RANK per module, which restores the select's and the probes' order from before the modules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:38:18 +02:00
WolfandClaude Opus 5.5 75a389d725 Keep a discovered slug's case for a host with KEEP_CASE, and check only group 1 against the hosts' own path words
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:37:26 +02:00
WolfandClaude Opus 5.5 fb83224007 Add, edit and remove a company on the Watchlist, and show its reason and note in the row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:33:57 +02:00
WolfandClaude Fable 5.1 2c3bce99e3 Clear a company's by-hand reason when a board is attached to it
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 19:27:55 +02:00
WolfandClaude Sonnet 5.5 161e89c955 Sort the by-hand list by the Watchlist's careers_opened_at and print the watch rating
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 19:25:46 +02:00
Wolf 1a2689e08d Merge branch 'main' into wp1-byhand-api
# Conflicts:
#	app/models.py
#	app/storage/schema.py
#	app/storage/store.py
#	app/web/api.py
#	tests/test_storage.py
#	tests/test_web.py
2026-09-29 19:25:42 +02:00
Wolf 9cb35ae785 Merge branch 'main' into wp0-hosts 2026-09-29 19:21:59 +02:00
WolfandClaude Opus 5.5 a30b1ff09f Take discovery's readable hosts, patterns and probes from the host modules, and find Lever boards on its EU instance
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:07:34 +02:00
WolfandClaude Opus 5.5 8b14d8575b Read a role's own page once for a host with detail, and fail a board whose robots.txt disallows it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:05:44 +02:00
WolfandClaude Opus 5.5 b02b72b4aa Move the eight hosts into a module each under plugins/atshosts and build the ats plugin's tables from them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:03:37 +02:00
WolfandClaude Sonnet 5.5 28afc334c3 Add, edit, check and delete a company by hand through the API, and show the by-hand fields in the list
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 17:02:19 +02:00
WolfandClaude Sonnet 5.5 b3cb93d5aa Keep a typed careers link, seed the by-hand reason and add the by-hand commands to app companies
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 17:02:19 +02:00
WolfandClaude Sonnet 5.5 a466ea52b7 Give a company a by-hand reason and a date last checked, in migration 15
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 17:02:18 +02:00
WolfandClaude Fable 5.1 b998f4c270 Merge branch 'watchlist'
The search field on Roles takes the phone top bar while it is typed in,
since a third tab left it a few letters wide.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 17:00:42 +02:00
WolfandClaude Opus 5.5 51d2537d73 Search roles by company too, link the careers page in the reader, widen the list and reader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:58:51 +02:00
WolfandClaude Sonnet 5.5 7dcb2c1705 Add a Watchlist tab for the companies the app cannot read a board of
Rate each one Yes or No apart from affinity, open its careers page with the
time noted, and set a missing or wrong link in the row. Migration 15 adds
companies.watch and careers_opened_at.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 16:56:16 +02:00
WolfandClaude Fable 5.1 4b722744a7 Show Viewing as on Roles as a select, also with one agent
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 16:40:33 +02:00
WolfandClaude Fable 5.1 0458c9c172 Take a Platsbanken region in the API and the CLI, and trust its and Teamtailor's posted date
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 16:23:19 +02:00
Wolf 7939b99a5c Merge branch 'wp4-prompts' 2026-09-29 16:22:26 +02:00
WolfandClaude Opus 5.5 2534803df3 Add app agents list and prompt, and document prompts for the seed agents
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:20:23 +02:00
WolfandClaude Opus 5.5 4e3c3f130e Give a search agent several prompts and score a role by its best one
Migration 14 moves each non-empty agents.intent into agent_prompts as one
prompt named after the agent, with its cached vector, and drops the three
intent columns. A role's fit is the maximum over the agent's prompts of the
calibrated cosine, and scores.prompt names the prompt that won. The agents
API takes prompts and still takes intent; the role endpoint serves the
agent's score and prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:19:57 +02:00
WolfandClaude Fable 5.1 aabf2b4f1b Name an unreadable host in the two tests that used Teamtailor for one
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 16:15:55 +02:00
Wolf d887a91af0 Merge branch 'wp3-teamtailor' 2026-09-29 16:15:22 +02:00
WolfandClaude Sonnet 5.5 b2ab2a270d Discover Teamtailor boards as readable, own-domain sites by their host
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 16:14:41 +02:00
WolfandClaude Sonnet 5.5 50edf0eeeb Read Teamtailor career sites from their jobs.rss feed, paged by offset
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 16:14:41 +02:00
WolfandClaude Sonnet 5.5 00e111961e Add Platsbanken as a third search provider
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 16:10:45 +02:00
WolfandClaude Fable 5.1 92466e2cd4 Drop the retry around the queue's dedup race, fixed upstream
`_score_after_change` tried three times because `Jobs.enqueue` could re-raise an IntegrityError when the live job finished between its insert and its lookup. The queue now does both in one BEGIN IMMEDIATE transaction (boilerplate a1c6f0d), so the workaround and its test go.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 16:02:58 +02:00
WolfandClaude Sonnet 471ace703c Switch the extract and summarise stages on the page, over config.yaml
A stored `stage:extract` / `stage:summarise` in the state table overrides
extract.enabled / summarise.enabled; with none, the file applies. One
function, stages.stage_on, decides, and both tasks' finders ask it.
GET/PUT /api/stages and `app stages` show and set it with who would answer;
Runs has a "What the model reads" block, and a search agent's card says when
a stage is off and links to the switch.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
2026-09-29 15:54:53 +02:00
Wolf a629eda8de Merge branch 'r2-web'
# Conflicts:
#	app/static/roles.js
#	app/web/api.py
#	tests/test_web.py
2026-09-29 15:31:35 +02:00
Wolf 562fa3ab09 Merge branch 'r2-backend'
# Conflicts:
#	app/storage/schema.py
2026-09-29 15:22:03 +02:00
WolfandClaude Sonnet 91596300e1 Serve a row projection from GET /api/roles instead of the whole role
The feed only ever shows a title, a few badges and a short excerpt,
but the list endpoint answered with every role's full row --
description, feed_text, raw and article_text included, about 5.5 KB
a role -- so a 1000-row restore was several megabytes of text a phone
never renders.

Store.roles_page selects only the fields a row draws (RoleRow), with
excerpt built server-side off a SUBSTR of summary or description, so
the big columns never cross into the response. The reader is
unaffected: it already fetched the whole role by uid when it opened
one; the reader pane's own reliance on the list row carrying the body
is removed too, so it no longer flashes a wrong "no description"
before that fetch lands.

Measured on a copy of the live database: a 60-row page went from
392 KiB to 39 KiB, and a 1000-row restore from 6.6 MB to 631 KiB.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
2026-09-29 15:22:00 +02:00
WolfandClaude Opus b2c8c08f7f Judge an employer known only from a search; the Companies list says "from job boards"
Store.set_affinity creates a minimal company row (key, and the name its roles
give most often) for a key with roles and no row, so a Jobindex or Adzuna
employer can be hidden or liked; the reader draws the control for any role
with a company_key and reloads the company list after the first change.

/api/companies derives from_search: no ats subscription (detached included)
and no ats, careers_url or domain. companies.js labels it "from job boards"
and keeps it out of "Not readable yet".

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-09-29 15:19:55 +02:00
WolfandClaude Sonnet e6be593542 Ask before a destructive board or search switch; queue a pull after a reopening one
Switching a company's board or a job board search off, replacing a
company's board and detaching one all close open roles in a tap; each
now asks first, naming the count (a replace also names the old and the
new board), the same as removing a search and deleting an agent
already do.

Switching a target back on, following a board, setting a board and
saving a search used to show nothing until the schedule's next pull,
up to six hours later. Each now queues a pull job right in the API
route, so the CLI and any other caller of the same endpoint behave
like the page; the queued pull's own refusal while one is already
running is not surfaced as an error.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
2026-09-29 15:18:16 +02:00
WolfandClaude Opus 91d15fcc7d A change made while score runs gets one follow-up score, and the page waits on it
score is solo, so a request during a run was deduped into the running job,
which had already read the old state. _score_after_change returns a queued
score when one has not started, else enqueues a plain score and, if that
dedupes to a running job, one follow-up with depends_on it, after="done" and
dedup_key score:after:<id>. POST /api/score answers with that job and
agents.js waits on it; the affinity route answers with score_job.

The flaky affinity test was pipeline's race, not the app's: Jobs.enqueue
re-raises the UNIQUE IntegrityError when the live job it collided with
finishes before the SELECT that should hand it back. The app retries.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-09-29 15:16:23 +02:00
WolfandClaude Opus 3abb44e10a Stream a board's body against MAX_BYTES and a 60 s deadline; read timeout 30 s
_get streams the body with a running byte count, so an oversized board is
refused at MAX_BYTES instead of after it is held whole, and bounds the whole
request, redirects included, by DEADLINE, checked between chunks. The
per-phase timeouts are httpx.Timeout(10, read=30), set from 84 live requests
against mongodb, feedzai and the five Greenhouse boards with most open roles,
with and without pay_transparency=true: the body arrives in under 1 s, the
first byte waited up to 16.6 s, and the flag made no measurable difference.
_paged works unchanged through it (tested over a mock transport, 429 included).

Correct pull.py's BATCH_SIZE comment: a batch reads its boards in sequence,
and the parallelism is the http pool's.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-09-29 15:12:14 +02:00
Wolf bbb7474cef Merge branch 'r2-salary' 2026-09-29 15:09:19 +02:00
WolfandClaude Sonnet fa4e1a657f Keep a board's stated pay as salary_text, even when it does not normalise
Every ats parser now writes one human-readable pay line whether or not it
converts to yearly salary_min/salary_max/currency: hourly and daily rates,
Greenhouse's several pay zones, and a range with no currency all survive as
text instead of being dropped outright. Stored in roles.salary_text
(migration 12), replaced whole on every pull like title, so a board that
stops stating pay clears it rather than leaving a stale line. salary_state
is derived, not stored ('normalised', 'stated', or ''), and is what the
feed's new Pay filter and badge read; gates and scoring are unchanged, still
reading only the normalised columns.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
2026-09-29 15:08:45 +02:00
WolfandClaude Opus 2c4b992c50 Country lookup: every ISO country, the widest unit wins, several European countries are EU
country_of folds with _place_fold (ł, đ, ø, æ map to ASCII; _fold keeps building
company_key unchanged), knows every ISO country by English name and European
ones by their own, and the cities among the 150 most frequent unresolved
places on the live data. Within one location a country beats a US state or
Canadian province, which beats a city. A state code that is also an ISO code
counts as the state only when the line names a US place. Several countries,
all European, are EU; otherwise ''. A code in parentheses is read when no
name matched.

Migration 12 recomputes country from place for roles extract has not read
and whose board sent no country in raw. On the live data: open roles with no
country 2,827 -> 1,183 of 16,841; 1,705 open roles change, 48 from a code.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-09-29 15:06:15 +02:00
WolfandClaude Opus b021838959 Calibrate fit and taste per embedding model instead of min-max per run
scale() maps a cosine to clip((cos - lo) / (hi - lo), 0, 1) with constants
from CALIBRATION in app/config.py, keyed by model and replaceable under
embed.calibration. multilingual-e5-small: fit 0.75..0.88, taste -0.14..0.19
(taste from synthetic votes). An uncalibrated model falls back to min-max
and logs a warning once per run.

The extract and summarise bars default to 0.55 and 0.65, about 300 and 35
roles for the starter agent on the measured data; stored limits are kept.
An agent without an intent is left out of the model-stage scope, and each
score run names such agents in one score.no_intent notice.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-09-29 14:59:34 +02:00
WolfandClaude Sonnet 92ff2bc069 Remove the MOVED redirects
MOVED and _moved answered 301 for twelve paths the settings cog moved
off of a few days ago. A browser caches a 301 indefinitely, so a path
reused later would be unreachable through no fault of that page, and
a one-person app has no outstanding bookmark to protect. Drop the
table, the routes, its export from app.web, and the tests that pinned
it; the old paths now answer plain 404. Keep the test that every
section of the Sources page exists, rewritten without MOVED.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
2026-09-29 14:50:18 +02:00
Wolf 706b127bc0 Merge branch 'worktree-agent-afad54f12aef2cccf'
# Conflicts:
#	app/storage/schema.py
#	app/storage/store.py
#	tests/test_storage.py
2026-09-29 14:32:28 +02:00
WolfandClaude Sonnet 5 44ff7c0131 Unpack structured pay from five ATS hosts; fix the function classifier
Part A: Ashby (?includeCompensation=true), Greenhouse (pay_transparency=true,
already free on the list request), Lever (salaryRange), Recruitee (salary)
and Personio (salaryInformation) all give structured pay; Workable and
SmartRecruiters do not (checked live). Every host converts to a yearly
salary_min/salary_max/currency, multiplying a monthly figure by 12 and
skipping an hourly or daily one rather than annualising a number nobody
stated. A range with no currency is ignored, and Greenhouse's own multi-zone
ranges are skipped outright since nothing says which zone the role is at.

Part B: classify() matched substrings, so " it" matched inside "Italy",
filing European sales roles as engineering; it now matches on word
boundaries (full boundary for the handful of short tokens that are
themselves the start of an unrelated word, prefix matching kept for the
stems). Title is checked before department (a hand-checked sample found
title-first right about twice as often), nothing matching returns '' rather
than "other", and a modest set of German/Dutch/Danish/Norwegian/Swedish/
French keywords covers the seed's other languages.

function is not a board field, so it gets the opposite rule from every
other raw column: extract's answer overwrites the classifier's guess
outright, and once extracted_at is set no later pull may put the guess
back. Migration 9 recomputes function for every not-yet-extracted role from
its stored title and department.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:29:12 +02:00