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
@@ -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