Merge the location gate that rejects on evidence only, judging an agent with a CV alone, extract reading a role again when its text arrives, and rail counts that follow the fetch gate (wp-rev-core)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
commit
c3c527dc6c
11 files changed
+402
-82
No files matched your search
+6
-6
@@ -14,8 +14,8 @@ career count as at most `app.models.BROKEN_CAP` (4), when the role is
|
||||
served. Culture and location are left out: the first is guessed from ad text,
|
||||
the second is what the fetch gate does.
|
||||
|
||||
The work is pairs, `(agent, role)`: an enabled agent with a CV and a prompt,
|
||||
and an open role in its cut (`scores.cut`, see `app.jobs.score`: the best by
|
||||
The work is pairs, `(agent, role)`: an enabled agent with a CV, with or
|
||||
without a prompt, and an open role in its cut (`scores.cut`, see `app.jobs.score`: the best by
|
||||
fit, the best by CV closeness that those leave out, and the liked and saved)
|
||||
with some text, that has no judgement yet, or one read from another CV,
|
||||
prompts, like, avoid or must text or role text than today's (`input_key`).
|
||||
@@ -189,10 +189,10 @@ def input_key(agent: Agent, text: str) -> str:
|
||||
|
||||
|
||||
def _judged(agent: Agent) -> bool:
|
||||
"""Whether `judge` reads for this agent at all: enabled, with a CV and a
|
||||
prompt with text (without one nothing of its cut is in by fit)."""
|
||||
return agent.enabled and bool(agent.cv_text.strip()) \
|
||||
and any(p.text.strip() for p in agent.prompts)
|
||||
"""Whether `judge` reads for this agent at all: enabled, with a CV. An
|
||||
agent without a prompt is judged too: its cut is the CV list and the
|
||||
kept, and the profile goes without `<wants>` (`system`)."""
|
||||
return agent.enabled and bool(agent.cv_text.strip())
|
||||
|
||||
|
||||
def waiting(store: Store, keys: Sequence[str] | None = None,
|
||||
|
||||
+16
-6
@@ -9,16 +9,19 @@ good for a given search. Each agent first applies its fetch gate:
|
||||
lifts
|
||||
any gates one group, the place part: a role that matches none of
|
||||
them, and has the column filled for at least one, is
|
||||
gated ("none of country DK / remote remote"); skipped for
|
||||
a company set to All locations
|
||||
gated ("none of country DK / remote remote"), unless its
|
||||
location is unknown; skipped for a company set to All
|
||||
locations
|
||||
exclude gates a role that matches one of the values keeps its row, with
|
||||
score 0 and the value ("title account executive"); those
|
||||
on `title` are skipped for a company set to All roles
|
||||
|
||||
A gate rejects on evidence, never on absence: a role whose column is empty
|
||||
is not gated by it. `extract` is what fills an empty column, and it reads
|
||||
only the roles in the cut, so gating on an empty column would keep those
|
||||
roles out of extract's reach for good. A hidden company (`affinity = -1`)
|
||||
is not gated by it, and a place the gazetteer could not resolve, or one
|
||||
that holds the agent's places (Øresund for Copenhagen), is no evidence.
|
||||
`extract` is what fills an empty column, and it reads only the roles in
|
||||
the cut, so gating on an empty column would keep those roles out of
|
||||
extract's reach for good. A hidden company (`affinity = -1`)
|
||||
is not scored at all; a favourite passes the gate like any other company.
|
||||
|
||||
The final score, the feed's order, is the weighted sum of four terms over
|
||||
@@ -181,6 +184,10 @@ def failed_gates(candidate: Candidate, gates: Sequence[Gate]) -> list[str]:
|
||||
it fails, every exclude gate it matches, and the `any` group when it
|
||||
matches none of them. A gate with an empty column (state -1) neither
|
||||
passes nor fails, so the group fails only when some member had evidence.
|
||||
A role whose location is unknown, every `country` and `place` member
|
||||
empty, passes the group whatever its remote says: a hybrid role with no
|
||||
place may still be in one of the agent's towns, and extract reads it
|
||||
only in the cut. A group of remote alone still fails a hybrid role.
|
||||
A company set to All locations skips the `any` group, the place part,
|
||||
and one set to All roles the exclude gates on `title`, the titles to
|
||||
leave out; the require gates, the region, apply to every company."""
|
||||
@@ -190,7 +197,10 @@ def failed_gates(candidate: Candidate, gates: Sequence[Gate]) -> list[str]:
|
||||
if g.mode == "exclude" and state > 0
|
||||
and not (candidate.all_roles and g.field == "title")]
|
||||
group = [(g, state) for g, state in states if g.mode == "any"]
|
||||
if not candidate.all_countries and group and not any(state == 1 for _, state in group) \
|
||||
located = [state for g, state in group if g.field in ("country", "place")]
|
||||
unknown = bool(located) and all(state == -1 for state in located)
|
||||
if not candidate.all_countries and group and not unknown \
|
||||
and not any(state == 1 for _, state in group) \
|
||||
and any(state == 0 for _, state in group):
|
||||
reasons.append("none of " + ", ".join(_wanted(g) for g, _ in group))
|
||||
return reasons
|
||||
|
||||
Reference in new issue
Block a user