From a25a9f6b5eeb0368cb08fc728783e92da6aff2f0 Mon Sep 17 00:00:00 2001 From: "napkinstack-agent[bot]" <330339777+napkinstack-agent[bot]@users.noreply.github.com> Date: Sat, 19 Sep 2026 22:48:35 +0200 Subject: [PATCH] =?UTF-8?q?Probe=20P4c=20=E2=80=94=20v1=20of=20the=20contr?= =?UTF-8?q?act=20broken=20consistently,=20examples=20and=20producer's=20te?= =?UTF-8?q?sts=20included?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M9's P4 left the examples invalid, which is how it was caught; M9 noted that had they been updated too, nothing would have refused. This is that change: approximateLocation renamed whereabouts everywhere in catalog-api v1 — property, required, examples — and in catalog, its code and its tests. loans, the consumer, is not touched. A probe, never merged. Agent-Session: 26f79b64-9fc9-4b2b-9354-485dcc9cda58 Co-Authored-By: Claude Opus 5 (1M context) --- contracts/catalog-api/v1/openapi.yaml | 10 +++++----- modules/catalog/e2e/conftest.py | 2 +- modules/catalog/src/catalog/listing.py | 2 +- modules/catalog/tests/test_listing.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/catalog-api/v1/openapi.yaml b/contracts/catalog-api/v1/openapi.yaml index 778985d..b58025b 100644 --- a/contracts/catalog-api/v1/openapi.yaml +++ b/contracts/catalog-api/v1/openapi.yaml @@ -48,11 +48,11 @@ paths: - id: "9f1c6f6a-5f1e-4e2a-9a1e-6a1b0c2d3e4f" name: Hammer drill lender: Amina - approximateLocation: Rue des Lilas, near the bakery + whereabouts: Rue des Lilas, near the bakery - id: "3b7d2c18-8c4a-4f6b-b2d1-0e9a7c5f4d3b" name: Extension ladder lender: Bruno - approximateLocation: Allee du Parc, by the playground + whereabouts: Allee du Parc, by the playground /tools/{toolId}: get: @@ -74,7 +74,7 @@ paths: id: "9f1c6f6a-5f1e-4e2a-9a1e-6a1b0c2d3e4f" name: Hammer drill lender: Amina - approximateLocation: Rue des Lilas, near the bakery + whereabouts: Rue des Lilas, near the bakery "400": description: The request is not one this document declares. content: @@ -122,7 +122,7 @@ components: Tool: type: object additionalProperties: false - required: [id, name, lender, approximateLocation] + required: [id, name, lender, whereabouts] # Probe P4c: v1 broken on purpose properties: id: $ref: "#/components/schemas/ToolId" @@ -138,7 +138,7 @@ components: description: >- The neighbour who lends it - a name typed on a form, never a verified identity and never a way to reach them. - approximateLocation: + whereabouts: type: string minLength: 1 maxLength: 120 diff --git a/modules/catalog/e2e/conftest.py b/modules/catalog/e2e/conftest.py index fe476dc..6f16c07 100644 --- a/modules/catalog/e2e/conftest.py +++ b/modules/catalog/e2e/conftest.py @@ -177,7 +177,7 @@ def listed_neighbourhood(document: dict[str, Any], tmp_path_factory) -> Iterator for tool in listed_example(document)["tools"]: add( connection, - Listing(tool["id"], tool["name"], tool["lender"], tool["approximateLocation"]), + Listing(tool["id"], tool["name"], tool["lender"], tool["whereabouts"]), ) connection.close() with serving(database) as base: diff --git a/modules/catalog/src/catalog/listing.py b/modules/catalog/src/catalog/listing.py index f6a038b..1fd532c 100644 --- a/modules/catalog/src/catalog/listing.py +++ b/modules/catalog/src/catalog/listing.py @@ -44,7 +44,7 @@ def as_declared(self) -> dict[str, str]: "id": self.id, "name": self.name, "lender": self.lender, - "approximateLocation": self.approximate_location, + "whereabouts": self.approximate_location, } diff --git a/modules/catalog/tests/test_listing.py b/modules/catalog/tests/test_listing.py index 9a95fb5..f0b0063 100644 --- a/modules/catalog/tests/test_listing.py +++ b/modules/catalog/tests/test_listing.py @@ -37,6 +37,6 @@ def test_a_whole_form_is_published_with_its_own_identifier_and_nothing_trimmed_a "id": listing.id, "name": "Hammer drill", "lender": "Amina", - "approximateLocation": "Rue des Lilas", + "whereabouts": "Rue des Lilas", } assert published(WHOLE).id != listing.id, "two listings must not share an identifier"