Retire the always-on tier — every rule arrives by retrieval (milestone 394) #152
@@ -118,6 +118,19 @@ async def test_co_surfaces_drags_in_the_half_that_would_have_been_missed(world):
|
|||||||
"A name decides nothing.",
|
"A name decides nothing.",
|
||||||
when_to_apply="when naming a build",
|
when_to_apply="when naming a build",
|
||||||
)
|
)
|
||||||
|
# TAGGED TO AN AREA THIS PROJECT DOES NOT WORK IN, which is what makes the
|
||||||
|
# test able to fail at all. Since milestone 394 an UNTAGGED rule in a
|
||||||
|
# subscribed rulebook applies on its own, so an untagged partner arrives
|
||||||
|
# through the ordinary query and the edge is never exercised — the
|
||||||
|
# assertion below passed while proving nothing, which is how this was
|
||||||
|
# noticed. Tagging it puts it out of reach of everything except the edge.
|
||||||
|
area = await canonical_svc.find_by_name("CI & Release")
|
||||||
|
assert area is not None, "migration 0087 seeds the standard vocabulary"
|
||||||
|
await rulebooks_svc.set_rule_systems(partner.id, world["owner"], [area.id])
|
||||||
|
assert "Version names are labels" not in await _titles(world), (
|
||||||
|
"the partner must be unreachable on its own, or this test cannot fail"
|
||||||
|
)
|
||||||
|
|
||||||
await rulebooks_svc.add_rule_relation(
|
await rulebooks_svc.add_rule_relation(
|
||||||
world["owner"], world["plain"], partner.id, "co_surfaces",
|
world["owner"], world["plain"], partner.id, "co_surfaces",
|
||||||
note="they fail together",
|
note="they fail together",
|
||||||
@@ -132,6 +145,9 @@ async def test_co_surfaces_drags_in_the_half_that_would_have_been_missed(world):
|
|||||||
async def test_a_suppression_outranks_an_edge(world):
|
async def test_a_suppression_outranks_an_edge(world):
|
||||||
"""The edge says these belong together; the suppression says this project
|
"""The edge says these belong together; the suppression says this project
|
||||||
does not want that one. An explicit decision beats an inferred one."""
|
does not want that one. An explicit decision beats an inferred one."""
|
||||||
|
# Untagged on purpose, unlike the partner above: this test is about the
|
||||||
|
# SUPPRESSION winning, so the partner should be one that would otherwise
|
||||||
|
# arrive by every available route — the ordinary query AND the edge.
|
||||||
partner = await rulebooks_svc.create_rule(
|
partner = await rulebooks_svc.create_rule(
|
||||||
world["topic"], world["owner"], "Muted partner", "Should not arrive.",
|
world["topic"], world["owner"], "Muted partner", "Should not arrive.",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user