With an agent named, the rail's tag, company and place counts, Remote included, cover the roles that agent's feed shows, past its fetch gate; and the affinity note names the order What I'm looking for.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
0b92f19f4d
commit
8c3c51dd9f
4 files changed
+106
-35
No files matched your search
@@ -15,7 +15,7 @@ import pytest
|
||||
|
||||
from desk.models import Item
|
||||
from app import places, prep
|
||||
from app.jobs import extract, reach
|
||||
from app.jobs import extract, reach, score
|
||||
from app.models import Agent, Gate
|
||||
from app.places import Gazetteer, label, known, parse, seed, suggest
|
||||
from app.prep import words
|
||||
@@ -468,6 +468,10 @@ def test_the_api_suggests_labels_and_filters_the_remote_tokens(tmp_path: Path) -
|
||||
prep.run(store, dupes=False)
|
||||
agent = store.save_agent("Europe", "python backend", [
|
||||
Gate(field="country", values=EUROPE, mode="require")])
|
||||
# Scored as `score` would, since a named agent's counts are its feed's.
|
||||
store.replace_scores(agent.id, [
|
||||
(c.uid, 0.5, ", ".join(score.failed_gates(c, agent.gates)))
|
||||
for c in store.score_candidates(agent.id, agent.gates)])
|
||||
with TestClient(app) as client:
|
||||
found = client.get("/api/suggest/places", params={"q": "remote"}).json()
|
||||
assert found[0] == {"token": "remote:any", "label": "Remote", "kind": "remote",
|
||||
|
||||
Reference in new issue
Block a user