Every way a company gets a board is set_board, and an unreadable host keeps its slug

`app.jobs.sources.set_board` attaches a board to an existing company,
replaces the one it has (closing the old board's open roles) or creates
the company, with row and subscription changed in one transaction by
`Store.set_company_board`. A board that lists zero roles is kept. `add`,
`discover --add`, the seed importer (moved out of app/cli.py) and the new
`POST|DELETE /api/companies/{key}/board` all go through it; a seed re-run
attaches a board to a row that never had one. A company's subscription is
rewritten in place, and detaching hides it.

`companies.ats_slug` (migration 9) keeps the slug of a host the app
cannot read yet, and discovery returns such a host before probing slugs.
The Companies rows get Set board / Change, the host select is rendered
from `plugins.ats.HOSTS`, and a row with nothing found reads "board not
found" and is in the "Not readable yet" filter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-29 14:04:52 +02:00
1 parent 0558ef19ed
commit 3b209d628a
18 files changed
+1038 -178

No files matched your search

+8 -2
View File
@@ -94,7 +94,9 @@ CREATE TABLE IF NOT EXISTS role_tags (
-- ats is the host the careers site runs on, readable by the ats plugin or
-- not (workday, successfactors, ...): what discovery found, '' unknown. A
-- company with an ats and no board subscription is one the app cannot read
-- yet. country is an ISO code and city the head office's.
-- yet. country is an ISO code and city the head office's. ats_slug is the
-- name that host knows the company by (the acme of acme.teamtailor.com),
-- '' where its URL carries none, kept for the parser written later.
CREATE TABLE IF NOT EXISTS companies (
key TEXT PRIMARY KEY,
name TEXT NOT NULL,
@@ -106,7 +108,8 @@ CREATE TABLE IF NOT EXISTS companies (
updated_at TEXT NOT NULL,
ats TEXT NOT NULL DEFAULT '',
country TEXT NOT NULL DEFAULT '',
city TEXT NOT NULL DEFAULT ''
city TEXT NOT NULL DEFAULT '',
ats_slug TEXT NOT NULL DEFAULT ''
);
-- The targets desk's runner hands to plugins. newsdesk's shape, with its two
@@ -337,6 +340,9 @@ ALTER TABLE companies ADD COLUMN city TEXT NOT NULL DEFAULT '';
"""),
(8, "agents.limits: how deep into its ranking the model stages read is each agent's own", """
ALTER TABLE agents ADD COLUMN limits TEXT NOT NULL DEFAULT '{}';
"""),
(9, "companies.ats_slug: the slug of a host the app cannot read yet is kept", """
ALTER TABLE companies ADD COLUMN ats_slug TEXT NOT NULL DEFAULT '';
"""),
)