Bring the Python side to the ADR: the judge scores 0 to 10 with the cap at 4 and migration 33 clears every judgement, summarise reads the top 30 of the want and the match order, a hidden company's roles are never in the feed, and the company switch is called All locations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-10-04 21:40:32 +02:00
1 parent 6cad9713ac
commit 6d82287402
27 files changed
+390 -247

No files matched your search

+21 -12
View File
@@ -51,7 +51,7 @@ class Model:
def judged(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
return [{"key": i["key"], "skills": 80, "experience": 70, "career": 90,
return [{"key": i["key"], "skills": 8, "experience": 7, "career": 9,
"strengths": ["Leads a data science team.", "", "Python.", "ML.", "Fourth."],
"gaps": ["No people budget stated."]} for i in items]
@@ -100,8 +100,8 @@ def test_a_run_writes_the_judgement_and_its_total(
found = store.judgement(owner.id, uid)
assert found is not None
assert (found.skills, found.experience, found.career) == (80, 70, 90)
assert found.cv_score == round((30 * 80 + 25 * 70 + 30 * 90) / 85, 1)
assert (found.skills, found.experience, found.career) == (8, 7, 9)
assert found.cv_score == round(10 * (30 * 8 + 25 * 7 + 30 * 9) / 85, 1)
assert found.strengths == ["Leads a data science team.", "Python.", "ML."]
assert found.gaps == ["No people budget stated."]
assert result["judged"] == 1 and result["pending"] == 0
@@ -125,7 +125,7 @@ def test_the_musts_are_numbered_in_the_profile_and_stored_with_their_text(
[uid] = ranked(store, owner, "1")
def reply(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
return [{**one, "career": 80, "musts": [
return [{**one, "career": 8, "musts": [
{"id": "M1", "verdict": "met"}, {"id": "M2", "verdict": "broken"},
{"id": "M9", "verdict": "broken"}, {"id": "M3", "verdict": "maybe"}]}
for one in judged(items)]
@@ -140,8 +140,8 @@ def test_the_musts_are_numbered_in_the_profile_and_stored_with_their_text(
assert [(m.id, m.text, m.verdict) for m in found.musts] == [
("M1", "Permanent contract", "met"), ("M2", "Remote two days", "broken"),
("M3", "Danish team", "unclear")]
assert (found.career, found.career_capped, found.broken) == (80, 39, 1)
assert found.cv_score == round((30 * 80 + 25 * 70 + 30 * 39) / 85, 1)
assert (found.career, found.career_capped, found.broken) == (8, 4, 1)
assert found.cv_score == round(10 * (30 * 8 + 25 * 7 + 30 * 4) / 85, 1)
def test_a_must_the_model_left_out_is_unclear_and_nothing_is_broken_by_silence(
@@ -153,7 +153,7 @@ def test_a_must_the_model_left_out_is_unclear_and_nothing_is_broken_by_silence(
found = store.judgement(owner.id, uid)
assert found is not None
assert [(m.id, m.verdict) for m in found.musts] == [("M1", "unclear")]
assert (found.career, found.career_capped, found.broken) == (90, 90, 0)
assert (found.career, found.career_capped, found.broken) == (9, 9, 0)
def test_the_schema_requires_the_verdicts_and_the_prompt_leaves_the_cap_to_code() -> None:
@@ -161,7 +161,8 @@ def test_the_schema_requires_the_verdicts_and_the_prompt_leaves_the_cap_to_code(
assert "musts" in item["required"]
verdict = item["properties"]["musts"]["items"]["properties"]["verdict"]
assert verdict["enum"] == ["met", "broken", "unclear"]
assert "career 0-39" not in judge.SYSTEM and "clearly contradicts" in judge.SYSTEM
assert "career 0-3" not in judge.SYSTEM and "clearly contradicts" in judge.SYSTEM
assert "0 to 10" in judge.SYSTEM and "80-100" not in judge.SYSTEM
def test_judgements_made_before_the_format_are_made_again(store: Store) -> None:
@@ -169,6 +170,14 @@ def test_judgements_made_before_the_format_are_made_again(store: Store) -> None:
assert judge.input_key(owner, "text") != hashlib_old_key(owner, "text")
def test_a_judgement_on_the_0_to_100_scale_is_made_again(
store: Store, monkeypatch: pytest.MonkeyPatch) -> None:
owner = hunter(store)
now = judge.input_key(owner, "text")
monkeypatch.setattr(judge, "FORMAT", 3)
assert judge.input_key(owner, "text") != now
def test_what_the_person_likes_is_part_of_what_a_judgement_read(store: Store) -> None:
owner = hunter(store)
liked = store.save_agent("Data", prompts=owner.prompts, agent_id=owner.id,
@@ -265,16 +274,16 @@ def test_an_answer_without_its_three_numbers_is_rejected(
owner = hunter(store)
[uid] = ranked(store, owner, "1")
stub(monkeypatch, lambda items: [{"key": items[0]["key"], "skills": None,
"experience": 50, "career": 250,
"experience": 5, "career": 25,
"strengths": [], "gaps": []}])
modeltask.run(judge.TASK, config, store)
assert store.judgement(owner.id, uid) is None
stub(monkeypatch, lambda items: [{"key": items[0]["key"], "skills": 40.4,
"experience": 50, "career": 250,
stub(monkeypatch, lambda items: [{"key": items[0]["key"], "skills": 4.4,
"experience": 5, "career": 25,
"strengths": [], "gaps": []}])
modeltask.run(judge.TASK, config, store)
found = store.judgement(owner.id, uid)
assert found is not None and (found.skills, found.career) == (40, 100)
assert found is not None and (found.skills, found.career) == (4, 10)
def test_a_batch_holds_one_agents_pairs_with_that_agents_profile(