The location gate rejects on evidence only: a place gate is empty for a role with no place the gazetteer resolved, an any group whose country and place members are all empty passes whatever remote says, and a role place that holds one of a country or place gate's places (Øresund, Sweden, Europe) meets it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-05 09:25:43 +02:00
1 parent 1127d06f03
commit 3388b97cf4
4 files changed
+150 -22

No files matched your search

+16 -6
View File
@@ -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