Send fetch terms to every big board whose host takes one query, and on a series overflow let a narrow read keep its places and drop the terms
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
060ccf66e6
commit
5fe5a31747
6 files changed
+159
-62
No files matched your search
@@ -1,6 +1,6 @@
|
||||
"""A company's two fetch overrides (see "The agents set the reach of a pull"
|
||||
and "Fetch terms" in `docs/decisions.md`): All countries reads its big boards
|
||||
with the agents' wide reach, All roles with no role-type narrowing. The four
|
||||
with the agents' wide reach, All roles with no fetch terms. The four
|
||||
combinations, the reach line, migration 24 and a merge. No network."""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -51,7 +51,7 @@ def _read(store: Store, target: str) -> tuple[Ask, str]:
|
||||
|
||||
|
||||
@pytest.mark.parametrize("countries, roles, line", [
|
||||
(False, False, "follows agents: DK, SE · remote not asked on Phenom · all roles"),
|
||||
(False, False, "follows agents: DK, SE · remote not asked on Phenom · follows agents' terms: data, engineer, product"),
|
||||
(False, True, "follows agents: DK, SE · remote not asked on Phenom · all roles"),
|
||||
(True, False, "all countries (Europe) · remote not asked on Phenom · follows agents' terms: data, engineer, product"),
|
||||
(True, True, "all countries (Europe) · remote not asked on Phenom · all roles"),
|
||||
@@ -67,15 +67,17 @@ def test_the_four_combinations(store: Store, countries: bool, roles: bool, line:
|
||||
assert {"DE", "FR", "DK", "SE"} <= set(ask.countries) and len(ask.countries) > 30
|
||||
else:
|
||||
assert ask.countries == ("DK", "SE")
|
||||
# Terms go only with the wide reach, and never to a company set to All roles.
|
||||
assert ask.terms == (("data", "engineer", "product") if countries and not roles else ())
|
||||
# Terms go to every big board, and never to a company set to All roles.
|
||||
assert ask.terms == (() if roles else ("data", "engineer", "product"))
|
||||
|
||||
|
||||
def test_all_roles_alone_changes_nothing_today(store: Store) -> None:
|
||||
def test_all_roles_alone_drops_the_terms_and_keeps_the_places(store: Store) -> None:
|
||||
_board(store, PHILIPS, "Philips")
|
||||
before = _read(store, PHILIPS)
|
||||
before, _ = _read(store, PHILIPS)
|
||||
assert before.terms == ("data", "engineer", "product")
|
||||
store.set_all_roles("philips", True)
|
||||
assert _read(store, PHILIPS) == before
|
||||
after, _ = _read(store, PHILIPS)
|
||||
assert after == before.model_copy(update={"terms": ()})
|
||||
|
||||
|
||||
@pytest.mark.parametrize("target, size, line", [
|
||||
|
||||
Reference in new issue
Block a user