Merge main into wp-review-bugs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
commit
09468455d1
14 files changed
+466
-290
No files matched your search
+13
-7
@@ -9,6 +9,8 @@ good for a given search. For each agent:
|
||||
column filled for at least one, is gated ("none of
|
||||
country DK / remote remote")
|
||||
prefer gates `weight` when the role matches, 0 when it does not
|
||||
exclude gates a role that matches one of the values keeps its row, with
|
||||
score 0 and the value ("title account executive")
|
||||
|
||||
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
|
||||
@@ -29,7 +31,8 @@ roles out of extract's reach for good.
|
||||
|
||||
Every term is 0..1. The score is the weighted sum over the sum of the weights
|
||||
(the agent's four and its prefer gates'), so it stays 0..1. A favourite
|
||||
company (`affinity = 2`) skips the `any` group but not the `require` gates, and
|
||||
company (`affinity = 2`) skips the `any` group but not the `require` or
|
||||
`exclude` gates, and
|
||||
is scored like any other company with its affinity term at 1: nothing puts
|
||||
its roles above a better fit. A hidden one (`-1`) is not scored at all. A
|
||||
role with no vector is scored without `fit` and `taste`, unless `fit` is all
|
||||
@@ -156,14 +159,17 @@ def _reason(gate: Gate) -> str:
|
||||
|
||||
|
||||
def failed_gates(candidate: Candidate, gates: Sequence[Gate]) -> list[str]:
|
||||
"""Why this role is gated, as reasons: every require gate it fails, 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 favourite company's roles skip the `any` group but
|
||||
not the require gates, so a star widens a search to a company's roles
|
||||
within e.g. Europe, not to the whole world."""
|
||||
"""Why this role is gated, as reasons: every require gate 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 favourite company's
|
||||
roles skip the `any` group but not the require and exclude gates, so a
|
||||
star widens a search to a company's roles within e.g. Europe, not to the
|
||||
whole world, and not to the titles the agent leaves out."""
|
||||
states = list(zip(gates, candidate.gates, strict=True))
|
||||
reasons = [_reason(g) for g, state in states if g.mode == "require" and state == 0]
|
||||
reasons += [f"{g.field} {g.values[state - 1]}" for g, state in states
|
||||
if g.mode == "exclude" and state > 0]
|
||||
group = [(g, state) for g, state in states if g.mode == "any"]
|
||||
if candidate.affinity != 2 and group and not any(state == 1 for _, state in group) \
|
||||
and any(state == 0 for _, state in group):
|
||||
|
||||
Reference in new issue
Block a user