From 84caa6d7ec40d83269eeeee98543fc4d707d83d2 Mon Sep 17 00:00:00 2001 From: Daniel Strader Date: Mon, 20 Jul 2026 14:24:15 -0700 Subject: [PATCH] Document shifted in MCP return contract --- mcp_server.py | 5 +++-- test_otio_diff.py | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mcp_server.py b/mcp_server.py index 977be4a..12938a0 100644 --- a/mcp_server.py +++ b/mcp_server.py @@ -34,8 +34,9 @@ def diff_timelines(path_a: str, path_b: str) -> dict: path_b: revised timeline file path. Returns: - dict with keys: added, removed, retimed, moved, unchanged_count. - Each list holds clip records (name, media_url, source/timeline timing). + dict with keys: added, removed, retimed, moved, shifted, unchanged_count. + Each list holds clip records (name, media_url, source/timeline timing); + shifted records describe ripple-only timeline slides. """ result = diff(load(path_a), load(path_b)) return asdict(result) diff --git a/test_otio_diff.py b/test_otio_diff.py index f76227b..a5e3bdb 100644 --- a/test_otio_diff.py +++ b/test_otio_diff.py @@ -25,6 +25,7 @@ import opentimelineio as otio import pytest +from pathlib import Path from otio_diff import flatten_timeline, diff, load # noqa: F401 @@ -286,3 +287,11 @@ def test_load_serializable_collection(tmp_path, capsys): recs = load(path) assert len(recs) == 3 # the baseline timeline, not the 1-clip one assert "2 timelines" in capsys.readouterr().err + + +def test_mcp_return_contract_mentions_shifted(): + """The MCP-facing tool description must stay aligned with DiffResult.""" + text = Path("mcp_server.py").read_text(encoding="utf-8") + + assert "shifted" in text + assert "added, removed, retimed, moved, shifted, unchanged_count" in text