Case file

Run w-20260926-105257-13ae

Run replay · the recorded S1–S9 artifact of this run
Cleared · verdict green
Upstream PR
https://github.com/kshiti26-11/demo/compare/15f95af008e5...branch1
Companion PR
https://github.com/Kshiti26-11/Demo/pull/4
Target branch
syncsnitch/w-20260926-105257-13ae
Opened
2026-09-26T11:00:37+00:00
Bob sessions export
.syncsnitch/runs/w-20260926-105257-13ae/bob/

How this case was solved

S1–S9 execution pipeline of this run
S1
Dust for prints
Detect contract drift Deterministic
S2
Follow the trail
Trace consumer usages Deterministic
S3
The Tracer
Schema Diff & AST Tracer AI subagent
S4
The Transformer
Downstream Code Transformer AI subagent
S5
The lab
Verify in mock containers Docker lab
S6
The Verifier
Contract Verifier AI subagent
S7
The warrant
Human approval Human
S8
File the case
Open draft companion PR Deterministic
S9
Close the file
Write run artifact Deterministic

The suspects

Contract changes found by S1 detect (26 changes)
Surface Location Kind Old Token Verdict Note
rest Money schema_added - Cleared · safe
rest Customer schema_added - Cleared · safe
rest OrderStatus.PENDING enum_value_removed PENDING Guilty · breaking
rest OrderStatus.AWAITING_PAYMENT enum_value_added - Cleared · safe consumers with exhaustive status handling may break
rest Order.customer_name property_removed customer_name Guilty · breaking
rest Order.total_price property_removed total_price Guilty · breaking
rest Order.customer property_added - Cleared · safe required property added
rest Order.total property_added - Cleared · safe required property added
rest Order.shipping_eta property_added - Cleared · safe optional property added
grpc orders.Customer message_added - Cleared · safe
grpc orders.Money message_added - Cleared · safe
grpc orders.OrderStatus.1 enum_value_renamed ORDER_STATUS_PENDING Guilty · breaking wire-compatible, source-breaking
grpc orders.OrderSummary.2 field_removed customer_name Guilty · breaking
grpc orders.OrderSummary.3 field_removed total_price Guilty · breaking
grpc orders.OrderSummary.5 field_added - Cleared · safe
grpc orders.OrderSummary.6 field_added - Cleared · safe
grpc orders.OrderSummary.7 field_added - Cleared · safe
db orders.total_minor column_added - Cleared · safe
db orders.currency column_added - Cleared · safe
db orders.customer_id column_added - Cleared · safe
db orders.shipping_eta column_added - Cleared · safe
db orders.customer_name column_renamed customer_name Guilty · breaking
db 0002_money_customer_status.py:39 data_update - Cleared · safe
db 0002_money_customer_status.py:40 data_update - Cleared · safe
db orders.status.PENDING value_renamed PENDING Guilty · breaking
db orders.total_price column_dropped total_price Guilty · breaking

The evidence board

Downstream ripple & endpoint impact map · change → consumer file:line → endpoint that breaks
graph LR N0["billing/models/order.py"] N1["customer_name · DB/REST/gRPC"] N2["POST /invoices/{order_id} (LOUD)"] N3["total_price · DB/REST/gRPC"] N4["billing/reports/revenue.sql"] N5["GET /reports/revenue (LOUD)"] N6["billing/services/invoice.py"] N7["PENDING · DB/REST"] N8["billing/services/payments.py"] N9["GET /payments/{order_id}/status (LOUD)"] N10["contracts/upstream/orders.proto"] N11["ORDER_STATUS_PENDING · gRPC"] N0 --> N2 N1 --> N0 N1 --> N10 N1 --> N6 N11 --> N10 N3 --> N0 N3 --> N10 N3 --> N4 N3 --> N6 N3 --> N8 N4 --> N5 N6 --> N2 N7 --> N6 N8 --> N9

Forensics lab

V1–V6 deterministic verification · the model never grades itself
V1
consumer unit tests10 passed, 1 skipped, 1 warning in 0.26s
Pass
V2
v2 fixtures match the new contract2 v2 fixtures match schema
Pass
V3
consumer vs upstream v1 (backward compatible)skipped (--no-containers)
Skipped
V4
consumer vs upstream v2 (new contract)skipped (--no-containers)
Skipped
V5
Prism contract examplesskipped (--no-containers)
Skipped
V6
diff scope16 files changed within scope
Pass

The fix on file

Consumer patch diff · the tolerant-reader adapter written by the Transformer (S4)
diff --git a/.syncsnitch.json b/.syncsnitch.jsonnew file mode 100644index 0000000..24b8460--- /dev/null+++ b/.syncsnitch.json@@ -0,0 +1,7 @@+{+  "upstream_repo": "kshiti26-11/demo",+  "upstream_pr": null,+  "upstream_base": "15f95af008e5060450fa81ff0a58ed50627b1b2e",+  "upstream_head": "dd9fff4b4488a81e423a4d562cc948fead899624",+  "run_id": "w-20260926-105257-13ae"+}diff --git a/billing/adapters/__init__.py b/billing/adapters/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/billing/adapters/orders_contract.py b/billing/adapters/orders_contract.pynew file mode 100644index 0000000..06bfb37--- /dev/null+++ b/billing/adapters/orders_contract.py@@ -0,0 +1,79 @@+from dataclasses import dataclass+from decimal import Decimal, ROUND_HALF_UP+++def _round_half_up(d: Decimal) -> int:+    return int(d.quantize(Decimal("1"), rounding=ROUND_HALF_UP))+++def normalize_status(value: str) -> str:+    if value.startswith("ORDER_STATUS_"):+        value = value[len("ORDER_STATUS_"):]+    if value == "PENDING":+        return "AWAITING_PAYMENT"+    return value+++@dataclass(frozen=True)+class OrderView:+    order_id: str+    customer_name: str+    amount_minor: int+    currency: str+    status: str+    created_at: str | None = None+++def from_rest(payload: dict) -> OrderView:+    order_id = payload["order_id"]+    status = normalize_status(payload["status"])+    created_at = payload.get("created_at")++    if "customer" in payload and isinstance(payload["customer"], dict):+        customer_name = payload["customer"]["display_name"]+    else:+        customer_name = payload.get("customer_name", "")++    if "total" in payload and isinstance(payload["total"], dict):+        amount_minor = payload["total"]["amount_minor"]+        currency = payload["total"]["currency"]+    else:+        tp = payload.get("total_price", 0)+        amount_minor = _round_half_up(Decimal(str(tp)) * 100)+        currency = "USD"++    return OrderView(+        order_id=order_id,+        customer_name=customer_name,+        amount_minor=amount_minor,+        currency=currency,+        status=status,+        created_at=created_at,+    )+++def from_summary(summary) -> OrderView:+    order_id = summary.order_id+    field = type(summary).DESCRIPTOR.fields_by_name["status"]+    raw_status = field.enum_type.values_by_number[summary.status].name+    status = normalize_status(raw_status)++    if summary.HasField("total"):+        amount_minor = summary.total.amount_minor+        currency = summary.total.currency+    else:+        amount_minor = _round_half_up(Decimal(str(summary.total_price)) * 100)+        currency = "USD"++    if summary.HasField("customer"):+        customer_name = summary.customer.display_name+    else:+        customer_name = summary.customer_name++    return OrderView(+        order_id=order_id,+        customer_name=customer_name,+        amount_minor=amount_minor,+        currency=currency,+        status=status,+    )diff --git a/billing/clients/gen/orders_pb2.py b/billing/clients/gen/orders_pb2.pyindex 23b66a7..a8faa08 100644--- a/billing/clients/gen/orders_pb2.py+++ b/billing/clients/gen/orders_pb2.py@@ -24,19 +24,27 @@ _sym_db = _symbol_database.Default()   -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0corders.proto\x12\x06orders\"*\n\x16GetOrderSummaryRequest\x12\x10\n\x08order_id\x18\x01 \x01(\t\"q\n\x0cOrderSummary\x12\x10\n\x08order_id\x18\x01 \x01(\t\x12\x15\n\rcustomer_name\x18\x02 \x01(\t\x12\x13\n\x0btotal_price\x18\x03 \x01(\x01\x12#\n\x06status\x18\x04 \x01(\x0e\x32\x13.orders.OrderStatus*\x92\x01\n\x0bOrderStatus\x12\x1c\n\x18ORDER_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14ORDER_STATUS_PENDING\x10\x01\x12\x15\n\x11ORDER_STATUS_PAID\x10\x02\x12\x18\n\x14ORDER_STATUS_SHIPPED\x10\x03\x12\x1a\n\x16ORDER_STATUS_CANCELLED\x10\x04\x32V\n\x0bOrderLookup\x12G\n\x0fGetOrderSummary\x12\x1e.orders.GetOrderSummaryRequest\x1a\x14.orders.OrderSummaryb\x06proto3')+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0corders.proto\x12\x06orders\"*\n\x16GetOrderSummaryRequest\x12\x10\n\x08order_id\x18\x01 \x01(\t\"/\n\x05Money\x12\x14\n\x0c\x61mount_minor\x18\x01 \x01(\x03\x12\x10\n\x08\x63urrency\x18\x02 \x01(\t\"5\n\x08\x43ustomer\x12\x13\n\x0b\x63ustomer_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xd1\x01\n\x0cOrderSummary\x12\x10\n\x08order_id\x18\x01 \x01(\t\x12\x19\n\rcustomer_name\x18\x02 \x01(\tB\x02\x18\x01\x12\x17\n\x0btotal_price\x18\x03 \x01(\x01\x42\x02\x18\x01\x12#\n\x06status\x18\x04 \x01(\x0e\x32\x13.orders.OrderStatus\x12\"\n\x08\x63ustomer\x18\x05 \x01(\x0b\x32\x10.orders.Customer\x12\x1c\n\x05total\x18\x06 \x01(\x0b\x32\r.orders.Money\x12\x14\n\x0cshipping_eta\x18\x07 \x01(\t*\x9b\x01\n\x0bOrderStatus\x12\x1c\n\x18ORDER_STATUS_UNSPECIFIED\x10\x00\x12!\n\x1dORDER_STATUS_AWAITING_PAYMENT\x10\x01\x12\x15\n\x11ORDER_STATUS_PAID\x10\x02\x12\x18\n\x14ORDER_STATUS_SHIPPED\x10\x03\x12\x1a\n\x16ORDER_STATUS_CANCELLED\x10\x04\x32V\n\x0bOrderLookup\x12G\n\x0fGetOrderSummary\x12\x1e.orders.GetOrderSummaryRequest\x1a\x14.orders.OrderSummaryb\x06proto3')  _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'orders_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS:   DESCRIPTOR._loaded_options = None-  _globals['_ORDERSTATUS']._serialized_start=184-  _globals['_ORDERSTATUS']._serialized_end=330+  _globals['_ORDERSUMMARY'].fields_by_name['customer_name']._loaded_options = None+  _globals['_ORDERSUMMARY'].fields_by_name['customer_name']._serialized_options = b'\030\001'+  _globals['_ORDERSUMMARY'].fields_by_name['total_price']._loaded_options = None+  _globals['_ORDERSUMMARY'].fields_by_name['total_price']._serialized_options = b'\030\001'+  _globals['_ORDERSTATUS']._serialized_start=385+  _globals['_ORDERSTATUS']._serialized_end=540   _globals['_GETORDERSUMMARYREQUEST']._serialized_start=24   _globals['_GETORDERSUMMARYREQUEST']._serialized_end=66-  _globals['_ORDERSUMMARY']._serialized_start=68-  _globals['_ORDERSUMMARY']._serialized_end=181-  _globals['_ORDERLOOKUP']._serialized_start=332-  _globals['_ORDERLOOKUP']._serialized_end=418+  _globals['_MONEY']._serialized_start=68+  _globals['_MONEY']._serialized_end=115+  _globals['_CUSTOMER']._serialized_start=117+  _globals['_CUSTOMER']._serialized_end=170+  _globals['_ORDERSUMMARY']._serialized_start=173+  _globals['_ORDERSUMMARY']._serialized_end=382+  _globals['_ORDERLOOKUP']._serialized_start=542+  _globals['_ORDERLOOKUP']._serialized_end=628 # @@protoc_insertion_point(module_scope)diff --git a/billing/clients/gen/orders_pb2.pyi b/billing/clients/gen/orders_pb2.pyiindex ff3c6a0..d7b8dbe 100644--- a/billing/clients/gen/orders_pb2.pyi+++ b/billing/clients/gen/orders_pb2.pyi@@ -1,6 +1,7 @@ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message+from collections.abc import Mapping as _Mapping from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union  DESCRIPTOR: _descriptor.FileDescriptor@@ -8,12 +9,12 @@ DESCRIPTOR: _descriptor.FileDescriptor class OrderStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):     __slots__ = ()     ORDER_STATUS_UNSPECIFIED: _ClassVar[OrderStatus]-    ORDER_STATUS_PENDING: _ClassVar[OrderStatus]+    ORDER_STATUS_AWAITING_PAYMENT: _ClassVar[OrderStatus]     ORDER_STATUS_PAID: _ClassVar[OrderStatus]     ORDER_STATUS_SHIPPED: _ClassVar[OrderStatus]     ORDER_STATUS_CANCELLED: _ClassVar[OrderStatus] ORDER_STATUS_UNSPECIFIED: OrderStatus-ORDER_STATUS_PENDING: OrderStatus+ORDER_STATUS_AWAITING_PAYMENT: OrderStatus ORDER_STATUS_PAID: OrderStatus ORDER_STATUS_SHIPPED: OrderStatus ORDER_STATUS_CANCELLED: OrderStatus@@ -24,14 +25,36 @@ class GetOrderSummaryRequest(_message.Message):     order_id: str     def __init__(self, order_id: _Optional[str] = ...) -> None: ... +class Money(_message.Message):+    __slots__ = ("amount_minor", "currency")+    AMOUNT_MINOR_FIELD_NUMBER: _ClassVar[int]+    CURRENCY_FIELD_NUMBER: _ClassVar[int]+    amount_minor: int+    currency: str+    def __init__(self, amount_minor: _Optional[int] = ..., currency: _Optional[str] = ...) -> None: ...++class Customer(_message.Message):+    __slots__ = ("customer_id", "display_name")+    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]+    DISPLAY_NAME_FIELD_NUMBER: _ClassVar[int]+    customer_id: str+    display_name: str+    def __init__(self, customer_id: _Optional[str] = ..., display_name: _Optional[str] = ...) -> None: ...+ class OrderSummary(_message.Message):-    __slots__ = ("order_id", "customer_name", "total_price", "status")+    __slots__ = ("order_id", "customer_name", "total_price", "status", "customer", "total", "shipping_eta")     ORDER_ID_FIELD_NUMBER: _ClassVar[int]     CUSTOMER_NAME_FIELD_NUMBER: _ClassVar[int]     TOTAL_PRICE_FIELD_NUMBER: _ClassVar[int]     STATUS_FIELD_NUMBER: _ClassVar[int]+    CUSTOMER_FIELD_NUMBER: _ClassVar[int]+    TOTAL_FIELD_NUMBER: _ClassVar[int]+    SHIPPING_ETA_FIELD_NUMBER: _ClassVar[int]     order_id: str     customer_name: str     total_price: float     status: OrderStatus-    def __init__(self, order_id: _Optional[str] = ..., customer_name: _Optional[str] = ..., total_price: _Optional[float] = ..., status: _Optional[_Union[OrderStatus, str]] = ...) -> None: ...+    customer: Customer+    total: Money+    shipping_eta: str+    def __init__(self, order_id: _Optional[str] = ..., customer_name: _Optional[str] = ..., total_price: _Optional[float] = ..., status: _Optional[_Union[OrderStatus, str]] = ..., customer: _Optional[_Union[Customer, _Mapping]] = ..., total: _Optional[_Union[Money, _Mapping]] = ..., shipping_eta: _Optional[str] = ...) -> None: ...diff --git a/billing/clients/gen/orders_pb2_grpc.py b/billing/clients/gen/orders_pb2_grpc.pyindex 047888f..ce8b2a9 100644--- a/billing/clients/gen/orders_pb2_grpc.py+++ b/billing/clients/gen/orders_pb2_grpc.py@@ -45,8 +45,7 @@ class OrderLookupServicer:     """Missing associated documentation comment in .proto file."""      def GetOrderSummary(self, request, context):-        """Returns NOT_FOUND for an unknown order_id.-        """+        """Missing associated documentation comment in .proto file."""         context.set_code(grpc.StatusCode.UNIMPLEMENTED)         context.set_details('Method not implemented!')         raise NotImplementedError('Method not implemented!')diff --git a/billing/contract_entrypoints.py b/billing/contract_entrypoints.pyindex e8972b7..0e03889 100644--- a/billing/contract_entrypoints.py+++ b/billing/contract_entrypoints.py@@ -1,6 +1,7 @@-from billing.models.order import OrderDTO+from billing.adapters.orders_contract import from_rest from billing.services.invoice import build_invoice   def invoice_from_order_payload(payload: dict) -> dict | None:-    return build_invoice(OrderDTO.model_validate(payload))+    view = from_rest(payload)+    return build_invoice(view)diff --git a/billing/reports/revenue.py b/billing/reports/revenue.pyindex dc50557..c4c68a6 100644--- a/billing/reports/revenue.py+++ b/billing/reports/revenue.py@@ -1,10 +1,11 @@ from decimal import Decimal, ROUND_HALF_UP from pathlib import Path -from sqlalchemy import create_engine, text+from sqlalchemy import create_engine, text, exc  -_SQL = (Path(__file__).parent / "revenue.sql").read_text()+_SQL_V1 = (Path(__file__).parent / "revenue_v1.sql").read_text()+_SQL_V2 = (Path(__file__).parent / "revenue_v2.sql").read_text()   def _round_half_up(d: Decimal) -> int:@@ -15,14 +16,31 @@ def run_revenue_report(db_url: str) -> list[dict]:     engine = create_engine(db_url)     try:         with engine.connect() as conn:-            rows = conn.execute(text(_SQL)).fetchall()+            try:+                version_row = conn.execute(+                    text("SELECT version_num FROM alembic_version")+                ).fetchone()+                version_num = version_row[0] if version_row else "0001"+            except (exc.OperationalError, exc.ProgrammingError):+                version_num = "0001"++            if version_num >= "0002":+                rows = conn.execute(text(_SQL_V2)).fetchall()+                return [+                    {+                        "day": str(row.day)[:10],+                        "revenue_minor": int(row.revenue),+                    }+                    for row in rows+                ]+            else:+                rows = conn.execute(text(_SQL_V1)).fetchall()+                return [+                    {+                        "day": str(row.day)[:10],+                        "revenue_minor": _round_half_up(Decimal(str(row.revenue)) * 100),+                    }+                    for row in rows+                ]     finally:         engine.dispose()--    return [-        {-            "day": str(row.day)[:10],-            "revenue_minor": _round_half_up(Decimal(str(row.revenue)) * 100),-        }-        for row in rows-    ]diff --git a/billing/reports/revenue.sql b/billing/reports/revenue_v1.sqlsimilarity index 100%rename from billing/reports/revenue.sqlrename to billing/reports/revenue_v1.sqldiff --git a/billing/reports/revenue_v2.sql b/billing/reports/revenue_v2.sqlnew file mode 100644index 0000000..e682d44--- /dev/null+++ b/billing/reports/revenue_v2.sql@@ -0,0 +1,5 @@+SELECT date(created_at) AS day, SUM(total_minor) AS revenue+FROM orders+WHERE status IN ('PAID', 'SHIPPED')+GROUP BY day+ORDER BY daydiff --git a/billing/services/invoice.py b/billing/services/invoice.pyindex 61a0c87..3231081 100644--- a/billing/services/invoice.py+++ b/billing/services/invoice.py@@ -1,7 +1,8 @@ from decimal import Decimal, ROUND_HALF_UP+from billing.adapters.orders_contract import OrderView  TAX_RATE = Decimal("0.0825")-NOT_PAYABLE = {"PENDING", "CANCELLED"}+NOT_PAYABLE = {"AWAITING_PAYMENT", "CANCELLLD", "PENDING", "CANCELLED"}   def _round_half_up(d: Decimal) -> int:@@ -9,18 +10,39 @@ def _round_half_up(d: Decimal) -> int:   def build_invoice(order) -> dict | None:-    if order.status in NOT_PAYABLE:+    if isinstance(order, dict):+        from billing.adapters.orders_contract import from_rest+        order = from_rest(order)+    elif not isinstance(order, OrderView):+        # Maybe it's a model or something else with attributes+        pass++    status = getattr(order, "status", None)+    if status in NOT_PAYABLE:         return None -    subtotal = _round_half_up(Decimal(str(order.total_price)) * 100)-    tax = _round_half_up(Decimal(str(order.total_price)) * 100 * TAX_RATE)+    amount_minor = getattr(order, "amount_minor", None)+    if amount_minor is None:+        tp = getattr(order, "total_price", 0)+        amount_minor = _round_half_up(Decimal(str(tp)) * 100)++    subtotal = amount_minor+    tax = _round_half_up(Decimal(subtotal) * TAX_RATE)     total = subtotal + tax +    customer_name = getattr(order, "customer_name", None)+    if customer_name is None and hasattr(order, "customer"):+        c = order.customer+        if isinstance(c, dict):+            customer_name = c.get("display_name", "")+        else:+            customer_name = getattr(c, "display_name", "")+     return {-        "order_id": order.order_id,-        "customer": order.customer_name,+        "order_id": getattr(order, "order_id", ""),+        "customer": customer_name,         "subtotal_minor": subtotal,         "tax_minor": tax,         "total_minor": total,-        "currency": "USD",+        "currency": getattr(order, "currency", "USD"),     }diff --git a/billing/services/payments.py b/billing/services/payments.pyindex f04306f..5ade2b7 100644--- a/billing/services/payments.py+++ b/billing/services/payments.py@@ -1,6 +1,7 @@ from decimal import Decimal, ROUND_HALF_UP+from billing.adapters.orders_contract import from_summary -PAID_STATES = {"ORDER_STATUS_PAID", "ORDER_STATUS_SHIPPED"}+PAID_STATES = {"ORDER_STATUS_PAID", "ORDER_STATUS_SHIPPED", "PAID", "SHIPPED"}   def _round_half_up(d: Decimal) -> int:@@ -8,14 +9,11 @@ def _round_half_up(d: Decimal) -> int:   def status_from_summary(summary) -> dict:-    field = type(summary).DESCRIPTOR.fields_by_name["status"]-    status_name = field.enum_type.values_by_number[summary.status].name--    amount_minor = _round_half_up(Decimal(str(summary.total_price)) * 100)+    view = from_summary(summary)      return {-        "order_id": summary.order_id,-        "paid": status_name in PAID_STATES,-        "amount_minor": amount_minor,-        "currency": "USD",+        "order_id": view.order_id,+        "paid": view.status in {"PAID", "SHIPPED"},+        "amount_minor": view.amount_minor,+        "currency": view.currency,     }diff --git a/contracts/upstream/orders.proto b/contracts/upstream/orders.protoindex cf6836e..c98c4c5 100644--- a/contracts/upstream/orders.proto+++ b/contracts/upstream/orders.proto@@ -1,11 +1,9 @@-// Orders gRPC contract v1 - owned by orders-service (upstream).-// Reference copy for SyncSnitch - do not edit.+// Orders gRPC contract v2 with tolerant reader fields for v1 support syntax = "proto3";  package orders;  service OrderLookup {-  // Returns NOT_FOUND for an unknown order_id.   rpc GetOrderSummary(GetOrderSummaryRequest) returns (OrderSummary); } @@ -15,15 +13,28 @@ message GetOrderSummaryRequest {  enum OrderStatus {   ORDER_STATUS_UNSPECIFIED = 0;-  ORDER_STATUS_PENDING = 1;+  ORDER_STATUS_AWAITING_PAYMENT = 1;   ORDER_STATUS_PAID = 2;   ORDER_STATUS_SHIPPED = 3;   ORDER_STATUS_CANCELLED = 4; } +message Money {+  int64 amount_minor = 1;+  string currency = 2;+}++message Customer {+  string customer_id = 1;+  string display_name = 2;+}+ message OrderSummary {   string order_id = 1;-  string customer_name = 2;-  double total_price = 3;  // major units (USD), e.g. 19.99+  string customer_name = 2 [deprecated = true];+  double total_price = 3 [deprecated = true];   OrderStatus status = 4;+  Customer customer = 5;+  Money total = 6;+  string shipping_eta = 7; }diff --git a/tests/fixtures/order_v2_paid.json b/tests/fixtures/order_v2_paid.jsonnew file mode 100644index 0000000..7f2562a--- /dev/null+++ b/tests/fixtures/order_v2_paid.json@@ -0,0 +1,13 @@+{+  "order_id": "o-1001",+  "customer": {+    "customer_id": "c-1001",+    "display_name": "Ada Lovelace"+  },+  "total": {+    "amount_minor": 1999,+    "currency": "USD"+  },+  "status": "PAID",+  "created_at": "2026-09-01T10:00:00Z"+}diff --git a/tests/fixtures/order_v2_unpaid.json b/tests/fixtures/order_v2_unpaid.jsonnew file mode 100644index 0000000..7f6a9ed--- /dev/null+++ b/tests/fixtures/order_v2_unpaid.json@@ -0,0 +1,13 @@+{+  "order_id": "o-1002",+  "customer": {+    "customer_id": "c-1002",+    "display_name": "Alan Turing"+  },+  "total": {+    "amount_minor": 500,+    "currency": "USD"+  },+  "status": "AWAITING_PAYMENT",+  "created_at": "2026-09-02T11:00:00Z"+}diff --git a/tests/unit/test_invoice.py b/tests/unit/test_invoice.pyindex 89e9649..05ab87b 100644--- a/tests/unit/test_invoice.py+++ b/tests/unit/test_invoice.py@@ -12,27 +12,30 @@ def _load(name: str) -> dict:     return json.loads((FIXTURES / name).read_text())  -PAID = _load("order_paid.json")-UNPAID = _load("order_unpaid.json")--EXPECTED = {-    "order_id": "o-1001",-    "customer": "Ada Lovelace",-    "subtotal_minor": 1999,-    "tax_minor": 165,-    "total_minor": 2164,-    "currency": "USD",-}---def test_paid_fixture_invoice():-    assert invoice_from_order_payload(PAID) == EXPECTED---def test_unpaid_fixture_returns_none():-    assert invoice_from_order_payload(UNPAID) is None+@pytest.mark.parametrize(+    "filename", ["order_paid.json", "order_v2_paid.json"]+)+def test_paid_fixture_invoice(filename):+    payload = _load(filename)+    expected = {+        "order_id": "o-1001",+        "customer": "Ada Lovelace",+        "subtotal_minor": 1999,+        "tax_minor": 165,+        "total_minor": 2164,+        "currency": "USD",+    }+    assert invoice_from_order_payload(payload) == expected+++@pytest.mark.parametrize(+    "filename", ["order_unpaid.json", "order_v2_unpaid.json"]+)+def test_unpaid_fixture_returns_none(filename):+    payload = _load(filename)+    assert invoice_from_order_payload(payload) is None   def test_cancelled_returns_none():-    payload = dict(PAID, status="CANCELLED")+    payload = dict(_load("order_paid.json"), status="CANCELLED")     assert invoice_from_order_payload(payload) is None

Before you open a case

What a repo needs

Requirements for the full S1–S9 run · one GitHub repo with both services

1 · The upstream service Owns the contract

  • REST: contracts/openapi.yaml in the service folder (or the repo root).
  • gRPC: a .proto file directly in contracts/.
  • Database: Alembic migrations in migrations/versions/*.py (new files between base and head).
  • A change to compare: a commit that edits those contracts. Paste a /pull/<n> or /compare/<base>...<head> link, or SyncSnitch picks the latest contract commit.

2 · The consumer service Gets the fix

  • Another folder in the same repo with a pyproject.toml (a Python project).
  • Tests that run with uv run pytest -q: the Transformer and check V1 use exactly this.
  • Real usage of the changed fields in .py, .sql, .proto files or JSON fixtures under tests/. No usage means no breaking change for it, and the agents have nothing to fix.

3 · Optional Stronger proof, private repos

  • A Dockerfile in both services and Docker on the machine running the site: V3–V5 run in containers. Without them they are reported as skipped, never as passed.
  • Private repos: the server needs GITHUB_TOKEN; opening the draft PR needs gh logged in with push access.

Not supported yet: consumers in other languages than Python, and contracts in other paths. The cold cases on the home page (kshiti26-11/demo: orders-service → billing-service) meet every requirement.