From 86440116c616b1f363824e2a3e7bee56ca5f9ca1 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 21 Sep 2026 14:58:32 +0000 Subject: [PATCH] Bump DEFAULT_CATALOG_PATH: google-calendar events now support PATCH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per AGENTS.md's platform-specific-fix workflow: the actual change (a new `patch` operation on /calendars/{calendarId}/events/{eventId}, its security requirement, x-crud metadata, and the event.etag schema field) was authored and pinned in localthought/overlays (https://github.com/localthought/overlays/pull/165, part of localthought/atomic-plugins#5 Phase 1). This is the one-line, platform-agnostic follow-up: point CATALOG_PATH's default at the new immutable revision, add a pinned-fixture assertion that PATCH is now allowed, and regenerate the checked-in google-calendar fixture. The new pin is based on the currently-deployed commit rather than overlays' main tip, which has since gained an unrelated clockify entry that fails catalog validation (missing oauthSecurityScheme selection) — avoids dragging that unrelated breakage into this default. Restarting the service after this merges is still required to pick up the new pin; not done here. --- src/catalog.rs | 9 +++ src/config.rs | 2 +- src/identity_catalog_tests.rs | 2 +- .../google-calendar-composed.yaml | 64 +++++++++++++++++++ tests/identity-catalog/sources.json | 22 +++++-- 5 files changed, 90 insertions(+), 9 deletions(-) diff --git a/src/catalog.rs b/src/catalog.rs index 7d7df1d..84d754d 100644 --- a/src/catalog.rs +++ b/src/catalog.rs @@ -854,6 +854,15 @@ mod tests { assert!(catalog .allows("github-issues", "GET", "/repositories/123/issues") .is_some()); + // atomic-plugins#5 Phase 1: the composed google-calendar document + // now allows the one write operation Devonian's lens sends. + assert!(catalog + .allows( + "google-calendar", + "PATCH", + "/calendar/v3/calendars/team%40example.com/events/id" + ) + .is_some()); } /// Tests a specific, separately identified catalog revision (not the diff --git a/src/config.rs b/src/config.rs index c386b2d..c8e619d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -58,7 +58,7 @@ pub struct Config { /// Immutable pinned revision of `localthought/overlays`' `catalog.json` used /// when `CATALOG_PATH` is not set. Shared with tests that need to validate /// the exact catalog the application would load by default. -pub const DEFAULT_CATALOG_PATH: &str = "https://raw.githubusercontent.com/localthought/overlays/8f29d9973267b6b3877aa27a5ab50cd41b010e6c/catalog.json"; +pub const DEFAULT_CATALOG_PATH: &str = "https://raw.githubusercontent.com/localthought/overlays/5d344a62e36f918a065bab1fbb7736571877673e/catalog.json"; /// Reads a required environment variable and rejects it if unset or blank, /// so a blank `.env` value fails configuration explicitly instead of being diff --git a/src/identity_catalog_tests.rs b/src/identity_catalog_tests.rs index 9249651..624bf86 100644 --- a/src/identity_catalog_tests.rs +++ b/src/identity_catalog_tests.rs @@ -67,7 +67,7 @@ fn composed_github_identity_uses_numeric_subject_without_google_legacy_mapping() #[ignore = "downloads the published catalog revision and its pinned OAD sources"] async fn published_catalog_loads_trusted_google_and_github_identity_operations() { let catalog = Catalog::load( - "https://raw.githubusercontent.com/localthought/overlays/8f29d9973267b6b3877aa27a5ab50cd41b010e6c/catalog.json", + "https://raw.githubusercontent.com/localthought/overlays/5d344a62e36f918a065bab1fbb7736571877673e/catalog.json", &crate::build_http_client(), ) .await diff --git a/tests/identity-catalog/google-calendar-composed.yaml b/tests/identity-catalog/google-calendar-composed.yaml index cf3dca3..fa0d729 100644 --- a/tests/identity-catalog/google-calendar-composed.yaml +++ b/tests/identity-catalog/google-calendar-composed.yaml @@ -236,6 +236,12 @@ components: format: date-time timeZone: type: string + etag: + type: string + description: 'Opaque version identifier, present on every read. Send back + as `If-Match` on a PATCH for optimistic-concurrency conflict detection. + + ' paginationSchemes: pageToken: type: pageToken @@ -460,6 +466,64 @@ paths: x-crud: action: read resource: event + patch: + operationId: events-patch + summary: Update fields on an existing event + description: 'A partial update to an event. `If-Match` carries the event''s + last-known ETag for optimistic-concurrency conflict detection; Google returns + 412 if the event changed remotely since it was read. + + ' + parameters: + - name: calendarId + in: path + required: true + schema: + type: string + - name: eventId + in: path + required: true + schema: + type: string + - name: sendUpdates + in: query + required: false + description: Whether to notify attendees of the change. + schema: + type: string + enum: + - all + - externalOnly + - none + - name: If-Match + in: header + required: false + description: The event's last-known ETag. + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/event' + responses: + '200': + description: The updated event. + content: + application/json: + schema: + $ref: '#/components/schemas/event' + '412': + description: The If-Match precondition failed. + security: + - googleOnline: + - https://www.googleapis.com/auth/calendar.events + - googleOffline: + - https://www.googleapis.com/auth/calendar.events + x-crud: + action: update + resource: event /v1/userinfo: get: operationId: getGoogleAuthenticatedPrincipal diff --git a/tests/identity-catalog/sources.json b/tests/identity-catalog/sources.json index c5f9ab1..f7384bf 100644 --- a/tests/identity-catalog/sources.json +++ b/tests/identity-catalog/sources.json @@ -1,7 +1,7 @@ { "catalog": { "path": "catalog.json", - "sha256": "9b79ad36b99b78810e5f276d060fdec1f28deff3f918604e975925d20d8b998c" + "sha256": "8244b8af1193be1fd16ef71b394895e3be17e19e7bb15b07ea6c8763276e397f" }, "platforms": { "google-calendar": [ @@ -10,24 +10,28 @@ "sha256": "093d160025a14c69479bbf30d277a19a83c696f10c3b37d81ccefeddf30f860f" }, { - "url": "https://raw.githubusercontent.com/localthought/overlays/168a9395a5ce290eee10a6a924c57717e7e0395a/googleapis.com/google-calendar/v3/auth-overlay.yaml", - "sha256": "6ad6b9375eede96fe8981a988301400345ca3c97c3e9ee4b38ab9e358addd1d0" + "url": "https://raw.githubusercontent.com/localthought/overlays/c844b237027e0297e40f5ff540ba041d760f862a/googleapis.com/google-calendar/v3/auth-overlay.yaml", + "sha256": "b03aef38c8c8ec688fcbf5d8280a27927c7f62cc3b2ba838c8b8b927bce99005" }, { "url": "https://raw.githubusercontent.com/localthought/overlays/d603d5453e9dc5ec26a1d7a6b9cfaeec934d5f4a/googleapis.com/google-calendar/v3/pagination-overlay.yaml", "sha256": "38fc738ac451a545084750d984b7ee5cd29db45b7fa8b48c346347ea8342cd84" }, { - "url": "https://raw.githubusercontent.com/localthought/overlays/d603d5453e9dc5ec26a1d7a6b9cfaeec934d5f4a/googleapis.com/google-calendar/v3/crud-causality-overlay.yaml", - "sha256": "51449d355b3f2708b02aee6efe26f72bc8b5287e8a1e5553d53b0aa632ee4526" + "url": "https://raw.githubusercontent.com/localthought/overlays/c844b237027e0297e40f5ff540ba041d760f862a/googleapis.com/google-calendar/v3/crud-causality-overlay.yaml", + "sha256": "03f8dcf2e65e95af791496804559b9d7b8414869b61832bf6a1da6c504e57023" }, { - "url": "https://raw.githubusercontent.com/localthought/overlays/0621413709fc88d65e908ae3643ceaaa53872194/googleapis.com/google-calendar/v3/schema-overlay.yaml", - "sha256": "06ba78fc58e56f09e3edebad0a58597fdb14c0078c78508e01e2c6ca2298febd" + "url": "https://raw.githubusercontent.com/localthought/overlays/c844b237027e0297e40f5ff540ba041d760f862a/googleapis.com/google-calendar/v3/schema-overlay.yaml", + "sha256": "7638a04bc9a39cbe03b3b093f9f4a68222e6a08f0d309922fa14015aefe535f0" }, { "url": "https://raw.githubusercontent.com/localthought/overlays/ee929c625d3c63dea87bcccae932a98a33138a8f/googleapis.com/google-calendar/v3/identity-overlay.yaml", "sha256": "9acf145f2a0611202ae199c29976eebe22813e67977354bd057e0446b89cc6f1" + }, + { + "path": "googleapis.com/google-calendar/v3/identity-overlay.yaml", + "sha256": "9acf145f2a0611202ae199c29976eebe22813e67977354bd057e0446b89cc6f1" } ], "github-issues": [ @@ -54,6 +58,10 @@ { "url": "https://raw.githubusercontent.com/localthought/overlays/ee929c625d3c63dea87bcccae932a98a33138a8f/github.com/github-issues/1.1.4/identity-overlay.yaml", "sha256": "8df50990a4d3d98aeec83a134e0f5f0fc8abf5fc87de4ee32d95e5a616bc5e77" + }, + { + "path": "github.com/github-issues/1.1.4/identity-overlay.yaml", + "sha256": "8df50990a4d3d98aeec83a134e0f5f0fc8abf5fc87de4ee32d95e5a616bc5e77" } ] }