Title levels on the ladder: principal, senior manager, distinguished, lead split (WP A)

from_title matches a title twice, for the highest people level and the
highest individual grade. A people level wins on its own rung; a grade
above that rung lifts it one rung (Principal Engineering Manager is a
senior manager). Senior Staff is principal, Senior Principal, Distinguished
and Technical Fellow are distinguished; Associate Director, AVP and Senior
Manager are senior managers. lead is now a team lead only (Team Lead, Shift
Lead, Supervisor, Teamleiter); Tech Lead, Lead X and X Lead(er) are staff.
A slash names two levels, so Senior/Staff is staff.

- Jobylon "lead" maps to staff; Recruitee maps student_college, manager,
  senior_manager and executive.
- extract's prompt describes the ladder and its two tracks; enum from LEVELS.
- prep VERSION 2, so the next prep maps every open role again.
- Migration 25 clears seniority_model where it is staff, lead, manager or
  director, so extract reads those roles again, and sets roles.seniority to
  the first filled of model, stated and title.
- The coverage test of tests/test_seniority.py passes; its xfail is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 13:11:26 +02:00
1 parent ae978594b4
commit 322db49773
16 files changed
+328 -137

No files matched your search

+9 -1
View File
@@ -3,6 +3,7 @@ answer writes, and what it may not touch. Nothing here reaches a model."""
from __future__ import annotations
import re
from datetime import UTC, datetime
from pathlib import Path
from typing import Any
@@ -14,7 +15,7 @@ from desk.models import Item
from desk.tools import agent
from app.config import Config
from app.jobs import extract
from app.models import Limits
from app.models import LEVELS, Limits
from app.storage import Store
from prepped import upsert
@@ -263,6 +264,13 @@ def test_the_prompt_carries_the_hints_and_the_teaser_when_there_is_no_text(
assert "" not in schema["enum"], "the afterburner must pick a level"
def test_the_prompt_names_every_level_of_the_ladder() -> None:
schema = extract.SCHEMA["properties"]["roles"]["items"]["properties"]["seniority"]
assert schema["enum"] == list(LEVELS)
section = extract.SYSTEM.split("- seniority:")[1].split("- salary_min")[0]
assert all(re.search(rf"\b{level}\b", section) for level in LEVELS)
def test_an_answer_with_no_level_is_charged_until_given_up(
store: Store, config: Config, monkeypatch: pytest.MonkeyPatch) -> None:
item = posting("1")