diff --git a/scripts/profile_sync.py b/scripts/profile_sync.py index d7adf80d..4be15954 100644 --- a/scripts/profile_sync.py +++ b/scripts/profile_sync.py @@ -725,9 +725,11 @@ def verify_at_pin(part: RefPart, pin_lines, tokens) -> PartResult: part, "AMBIGUOUS", None, None, None, elsewhere, "declared value carried by several lines", ) + # Content-level evidence, stronger than a line-shift heuristic: the value + # sits on exactly one line, so the recale target is not a guess. return PartResult( - part, "CHANGED", None, elsewhere[0], elsewhere[0], elsewhere, - "declared value carried by another line", + part, "MOVED", None, elsewhere[0], elsewhere[0], elsewhere, + "declared value occurs once at the pinned revision", ) diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index 7eb5c82e..b18553dd 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -338,7 +338,7 @@ class TestVerifyAtPin(unittest.TestCase): lines = ["load()", "", "", "", "", "", 'rom("cafebabe")'] part = RefPart("a.c", 1, 1, "a.c:1") result = profile_sync.verify_at_pin(part, lines, ["cafebabe"]) - self.assertEqual(result.status, "CHANGED") + self.assertEqual(result.status, "MOVED") self.assertEqual(result.start, 7) def test_declared_value_on_several_lines_is_ambiguous(self): @@ -1016,7 +1016,7 @@ class TestBuildReport(unittest.TestCase): profile["source_commit"] = "headsha" profile["files"][0]["crc32"] = "deadbeef" report = build_report("test", profile, self.dir) - self.assertEqual(report.entries[0].status, "CHANGED") + self.assertEqual(report.entries[0].status, "MOVED") def test_a_value_absent_from_the_whole_file_is_not_held_against_the_ref(self): # A ref citing loading logic never spells the value out; its absence