Say remote not asked on the Companies line, show a failing search on its row, forget a removed search's record, and mark a read that asked nothing as not closing

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-30 16:11:27 +02:00
1 parent 0ad47605fd
commit a63eed2e56
10 files changed
+66 -36

No files matched your search

+19 -9
View File
@@ -328,7 +328,7 @@ def site_facets(store: Store, subs: Iterable[Subscription]) -> dict[str, dict[st
out: dict[str, dict[str, dict[str, str]]] = {}
for sub in subs:
module = readers.HOSTS.get(sub.target.partition(":")[0])
if module is None or not _runner.declared(module) \
if module is None \
or "ids" not in (module.READS.filters.country, module.READS.filters.remote):
continue
try:
@@ -399,8 +399,9 @@ def _site(module: Any, ask: readers.Ask, facets: Mapping[str, Mapping[str, str]]
before any are kept), as `_runner.series` drops them: what is asked,
then what the site does not know ("DK · SE not on this site · no remote
option"), after `lead` and before `roles`; or, with nothing left to
ask, "site lists none of DK, SE: nothing asked". "" when the site knows
every value, or `lead` is "" and something is still asked."""
ask, "site lists none of DK, SE: nothing asked, not closing", since the
runner reads such a board as incomplete. "" when the site knows every
value, or `lead` is "" and something is still asked."""
if facets is None:
return ""
reads = module.READS.filters
@@ -418,9 +419,9 @@ def _site(module: Any, ask: readers.Ask, facets: Mapping[str, Mapping[str, str]]
remote = bool(ask.remote) and not no_remote
if not (known or ask.places or remote):
if not missing:
return "site has no remote option: nothing asked"
return "site has no remote option: nothing asked, not closing"
named = _codes(missing) + (["remote"] if no_remote else [])
return f"site lists none of {', '.join(named)}: nothing asked"
return f"site lists none of {', '.join(named)}: nothing asked, not closing"
if not lead:
return ""
words = [", ".join(_codes(known) + list(ask.places) + (["remote"] if remote else []))]
@@ -452,7 +453,9 @@ def line(found: Plan, sub: Subscription) -> str:
a host that filters by its own ids, the line names what the site does
not know once the runner has asked it (`_site`): "follows agents: DK ·
SE not on this site · no remote option · all roles", or "site lists
none of DK, SE: nothing asked"."""
none of DK, SE: nothing asked, not closing", or, on a host with no remote
filter while the agents want remote, "follows agents: DK, SE · remote not
asked on SmartRecruiters · all roles"."""
module = readers.HOSTS.get(sub.target.partition(":")[0])
if module is None:
return ""
@@ -465,12 +468,19 @@ def line(found: Plan, sub: Subscription) -> str:
lead = {"agents": "follows agents", "override": "set here"}.get(why, "")
if site := _site(module, ask, found.facets.get(sub.target), lead, roles):
return site
# The reach wants remote roles and the host cannot be asked for them:
# the read leaves them out, and the settle keeps the ones it has
# (`app.jobs.pull`), so the line says so rather than "DK, SE".
unasked = (f" · remote not asked on {module.LABEL}"
if module.READS.filters.remote == "none"
and _runner.remote_wanted(module, sub.params, found.for_subscription(sub))
else "")
if why == "countries":
named = found.wide_names or f"{len(found.wide.countries)} countries"
return f"all countries ({named}) · {roles}"
return f"all countries ({named}){unasked} · {roles}"
if why == "override":
return f"set here: {_places(ask)} · {roles}"
return f"follows agents: {_places(ask)} · {roles}"
return f"set here: {_places(ask)}{unasked} · {roles}"
return f"follows agents: {_places(ask)}{unasked} · {roles}"
if ask.terms:
if given.everywhere:
return f"all countries (everywhere) · {roles}"