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>
This commit is contained in:
1 parent
706b127bc0
commit
fa4e1a657f
18 files changed
+528
-57
No files matched your search
+5
-2
@@ -134,6 +134,7 @@ def list_roles(
|
||||
order: Literal["score", "newest"] = "score",
|
||||
gated: bool = False,
|
||||
judged: Literal["", "liked", "unjudged", "passed"] = "",
|
||||
pay: Literal["", "stated", "normalised", "stated_only"] = "",
|
||||
offset: Annotated[int, Query(ge=0)] = 0,
|
||||
limit: Annotated[int, Query(ge=1, le=1000)] = 60,
|
||||
) -> RolesPage:
|
||||
@@ -152,7 +153,9 @@ def list_roles(
|
||||
|
||||
`include_read` set false hides a role already marked read. `tags` is
|
||||
`?tags=a&tags=b`, kept to a role with any of them or, with
|
||||
`tag_mode=all`, every one."""
|
||||
`tag_mode=all`, every one. `pay` keeps only roles whose `salary_state`
|
||||
is stated or normalised, normalised only, or stated but not normalised
|
||||
(`Store.PAY`)."""
|
||||
agent_id = _agent_id(store, agent)
|
||||
by_score = agent is not None and order == "score"
|
||||
filters: dict[str, Any] = {
|
||||
@@ -160,7 +163,7 @@ def list_roles(
|
||||
"function": function or None, "remote": remote or None, "days": days,
|
||||
"hide_muted": not show_muted, "include_read": include_read, "tags": tags,
|
||||
"tag_mode": tag_mode, "agent": agent_id, "by_score": by_score,
|
||||
"gated": gated, "judged": judged or None}
|
||||
"gated": gated, "judged": judged or None, "pay": pay or None}
|
||||
return RolesPage(items=store.roles(limit=limit, offset=offset, **filters),
|
||||
total=store.count_roles(**filters))
|
||||
|
||||
|
||||
Reference in new issue
Block a user