Remove the must-haves the form dropped on 2026-10-03: the agent's must text, the judge's verdicts and the career cap they set, with migration 34 dropping their columns and the judge's format at 6 so every role is judged again
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
38c31c830b
commit
2159c7925f
19 files changed
+157
-365
No files matched your search
+28
-16
@@ -328,9 +328,8 @@ END;
|
||||
-- as JSON: a key it lacks means the `Limits` default. fetch_terms is a JSON
|
||||
-- list of words that narrow what big boards send (app/jobs/reach.py); empty
|
||||
-- means no narrowing. cv_text, cv_languages (a JSON list of {language,
|
||||
-- level}), like_text (what they like: the work, the workplace, situations),
|
||||
-- avoid_text (what they do not like) and must_text (must-haves and
|
||||
-- deal-breakers, set through the API only) are what judge reads a role
|
||||
-- level}), like_text (what they like: the work, the workplace, situations)
|
||||
-- and avoid_text (what they do not like) are what judge reads a role
|
||||
-- against; an agent with no CV is not judged.
|
||||
CREATE TABLE IF NOT EXISTS agents (
|
||||
id INTEGER PRIMARY KEY,
|
||||
@@ -344,7 +343,6 @@ CREATE TABLE IF NOT EXISTS agents (
|
||||
cv_text TEXT NOT NULL DEFAULT '',
|
||||
cv_languages TEXT NOT NULL DEFAULT '[]',
|
||||
avoid_text TEXT NOT NULL DEFAULT '',
|
||||
must_text TEXT NOT NULL DEFAULT '',
|
||||
like_text TEXT NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
@@ -435,11 +433,8 @@ CREATE TABLE IF NOT EXISTS agent_cv_vectors (
|
||||
-- 100 until migration 33), cv_score their weighted total times 10 at the
|
||||
-- default weights (not read: app.models.cv_score is worked out when a role
|
||||
-- is served), strengths and gaps JSON lists. input_key
|
||||
-- is a hash of the CV, prompts, avoid text and the role's text it read: a
|
||||
-- different one is read again. musts is a JSON list of {id, text, verdict},
|
||||
-- the model's verdict on each of the agent's must-haves (one per line of its
|
||||
-- must text), broken how many are "broken": career counts as at most 4 then
|
||||
-- (app.models.BROKEN_CAP), applied when the role is served. tries counts
|
||||
-- is a hash of the CV, prompts, languages, like and avoid texts and the
|
||||
-- role's text it read: a different one is read again. tries counts
|
||||
-- replies that left the role without one since; at 3 it is given up until the agent is saved again. A
|
||||
-- row with judged_at NULL holds only tries.
|
||||
CREATE TABLE IF NOT EXISTS role_judgements (
|
||||
@@ -451,8 +446,6 @@ CREATE TABLE IF NOT EXISTS role_judgements (
|
||||
cv_score REAL,
|
||||
strengths TEXT NOT NULL DEFAULT '[]',
|
||||
gaps TEXT NOT NULL DEFAULT '[]',
|
||||
musts TEXT NOT NULL DEFAULT '[]',
|
||||
broken INTEGER NOT NULL DEFAULT 0,
|
||||
input_key TEXT NOT NULL DEFAULT '',
|
||||
tries INTEGER NOT NULL DEFAULT 0,
|
||||
judged_at TEXT,
|
||||
@@ -763,6 +756,10 @@ UPDATE roles SET seniority = COALESCE(NULLIF(seniority_model, ''),
|
||||
# A Python step: JSON limits, and a count for the log.
|
||||
(33, "the judge on 0 to 10: every judgement cleared to be made again, and summarise_top "
|
||||
"50 becomes 30", lambda conn: _judge_out_of_ten(conn)),
|
||||
# A Python step: it drops the columns only where they are there. The
|
||||
# judge reads every role again (judge.FORMAT).
|
||||
(34, "agents.must_text, role_judgements.musts and broken dropped: the profile is the "
|
||||
"CV, languages, likes and dislikes", lambda conn: _drop_musts(conn)),
|
||||
)
|
||||
|
||||
#: What a file created from `SCHEMA` today is already at.
|
||||
@@ -1203,12 +1200,14 @@ def _judge_out_of_ten(conn: sqlite3.Connection) -> None:
|
||||
old number is shown on the new scale. The rows stay, as rows of no
|
||||
judgement, and the judge reads every pair again. An agent whose
|
||||
`summarise_top` is 50, migration 32's default, takes 30, the new one.
|
||||
Runs twice without harm."""
|
||||
Runs twice without harm, also after migration 34 dropped the verdicts."""
|
||||
columns = {r[1] for r in conn.execute("PRAGMA table_info(role_judgements)")}
|
||||
verdicts = ", musts = '[]', broken = 0" if {"musts", "broken"} <= columns else ""
|
||||
cleared = conn.execute(
|
||||
"""UPDATE role_judgements
|
||||
SET skills = NULL, experience = NULL, career = NULL, cv_score = NULL,
|
||||
strengths = '[]', gaps = '[]', musts = '[]', broken = 0,
|
||||
input_key = '', tries = 0, judged_at = NULL""").rowcount
|
||||
f"""UPDATE role_judgements
|
||||
SET skills = NULL, experience = NULL, career = NULL, cv_score = NULL,
|
||||
strengths = '[]', gaps = '[]'{verdicts},
|
||||
input_key = '', tries = 0, judged_at = NULL""").rowcount
|
||||
lowered = conn.execute(
|
||||
"""UPDATE agents SET limits = json_set(limits, '$.summarise_top', 30)
|
||||
WHERE json_valid(limits) AND json_type(limits) = 'object'
|
||||
@@ -1217,6 +1216,19 @@ def _judge_out_of_ten(conn: sqlite3.Connection) -> None:
|
||||
"summarise_top 50 set to 30", cleared, lowered)
|
||||
|
||||
|
||||
def _drop_musts(conn: sqlite3.Connection) -> None:
|
||||
"""Migration 34's step: the must-haves are gone, the agent's text
|
||||
(`agents.must_text`) and the judge's verdicts on it
|
||||
(`role_judgements.musts`, `broken`), and with them the cap on career.
|
||||
Runs twice without harm."""
|
||||
for table, columns in (("agents", ("must_text",)),
|
||||
("role_judgements", ("musts", "broken"))):
|
||||
present = {r[1] for r in conn.execute(f"PRAGMA table_info({table})")}
|
||||
for column in columns:
|
||||
if column in present:
|
||||
conn.execute(f"ALTER TABLE {table} DROP COLUMN {column}")
|
||||
|
||||
|
||||
def _add_all_roles(conn: sqlite3.Connection) -> None:
|
||||
"""Migration 21's step. The column; the tag for every company that is a
|
||||
favourite of any agent, since favourite no longer widens what a pull
|
||||
|
||||
Reference in new issue
Block a user