Keep a remote listing and an office listing two roles in the per-place fold, since the kept role takes a copy's places and not its remote and the fetch gate then rejected the one behind the other

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-05 10:16:37 +02:00
1 parent 8f774b5147
commit b4774f1da9
3 files changed
+31 -7

No files matched your search

+14
View File
@@ -4,6 +4,7 @@ no network. The live cases are the 2026-09-29 database's."""
from __future__ import annotations
import sys
from dataclasses import replace
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
@@ -238,6 +239,19 @@ def test_folding_needs_the_same_title_a_link_and_texts_that_can_be_one_job() ->
assert fold([pc("1", "Berlin", a), pc("2", "Munich", "")]).placed == {"2"}
def test_a_remote_listing_is_not_folded_into_an_office_one() -> None:
"""The kept role takes a copy's places, not its remote, so the gate would
read "Remote, Germany" as an office role in Vienna and reject it for an
agent that takes remote roles. Two remote listings still fold."""
text = "We build the payment platform for our bank customers in Kotlin."
office = replace(pc("v", "Vienna", text), country="AT")
remote = replace(pc("r", "Remote, Germany", text), remote=True)
other = replace(pc("s", "Remote, Spain", text), country="ES", remote=True)
got = fold([office, remote, other])
assert got.dup_of == {"v": None, "r": None, "s": "r"}
assert got.placed == {"s"}
def test_a_copy_of_a_folded_row_follows_it_to_the_new_kept_role() -> None:
"""Berlin is kept over Munich; a second Munich row that was Munich's copy
now points at Berlin, and is not a place of its own."""