Skip to content

GetCalendar/UpdateCalendar: the top-level calendar pair (#12321) - #526

Merged
jeremy merged 5 commits into
mainfrom
c8-calendar
Jul 31, 2026
Merged

GetCalendar/UpdateCalendar: the top-level calendar pair (#12321)#526
jeremy merged 5 commits into
mainfrom
c8-calendar

Conversation

@jeremy

@jeremy jeremy commented Jul 31, 2026

Copy link
Copy Markdown
Member

C8 of the post-v0.11.0 absorption sprint — the last pre-C4 absorption.

BC3 #12321 shipped the intentionally small calendar scope: show + update on /calendars/:id.json (a top-level BC5 bucketable keyed by its own bucket id, distinct from a project).

What

  • Spec: CalendarsService (tag Calendars, default-fallback mapping) with GetCalendar + UpdateCalendar. 233 → 235 operations. Shape derived from doc/api/sections/calendars.md at the pinned revision — verified drift-free since e83b2733 — per the gap's shape-discovery warning: id, type, name, color, created_at, updated_at, url, app_url, schedule_url, all required non-nullable.
  • 422 contract: inspected the pinned controller rather than guessing — unknown colors are rejected up front with a field-keyed payload ({"errors": {"color": ["is not a valid color"]}}), same shape as the RecordInvalid path. Documented on the operation and pinned in per-SDK 422 tests.
  • Update body: nested {calendar: {color}} envelope; wire body pinned byte-for-byte in TS/Ruby/Python.
  • UpdateCalendar is a flagged idempotent PUT with an idempotency conformance case (Ruby skip).
  • Smithy gotcha for the record: a trailing label can't carry .json in the same segment (Literal segments must not contain { or }), so the URIs use the established suffix-less-id form.
  • Wiring: Go wrapper + accessor, TS/Ruby/Python(sync+async); getCalendar method-name override in TS/Kotlin/Swift.
  • Counts: 235 total / 122 read-only / 75 idempotent / 197 retry-eligible — the sprint's planned pre-C4 end state, matching behavior-model exactly.

Verification

Full make green (exit 0) + make kt-check-generated-drift clean; 11 Calendar conformance passes + Ruby's justified skip. Live-canary fixture for GetCalendar stays a follow-up (needs a stable dock-walk fixture-id path), noted in the registry entry.


Summary by cubic

Adds the top‑level calendars API with GetCalendar and UpdateCalendar across all SDKs, matching BC3 #12321’s show+update scope. UpdateCalendar is an idempotent PUT with 503 retries, and 422 validation is now modeled as the field‑keyed payload.

  • New Features
    • Added CalendarsService with getCalendar(id) and updateCalendar(id, { calendar: { color } }) in TypeScript, Swift, Kotlin, Go, Python, and Ruby.
    • Calendar is top‑level; URIs use /calendars/{calendarId} and expose id, type, name, color, created_at, updated_at, url, app_url, schedule_url.
    • 422 for invalid color returns {"errors":{"color":["is not a valid color"]}}, now modeled as FieldValidationError/FieldKeyedErrors; tests pin the exact wire shape.
    • UpdateCalendar flagged idempotent with an idempotency conformance case; getCalendar method-name override added; operation counts: 235 total / 122 read‑only / 75 idempotent / 197 retry‑eligible.

Written for commit 8fa64da. Summary will update on new commits.

Review in cubic

jeremy added 4 commits July 31, 2026 06:11
BC3 #12321 shipped the show+update-only calendar scope: a top-level BC5
bucketable (distinct from a project) with display metadata and a link
to its underlying schedule. Shape taken from doc/api/sections/
calendars.md at the pinned revision (verified drift-free since
e83b2733); the pinned controller's 422 contract — a field-keyed errors
payload, rejected up front for unknown enum colors — is documented on
the operation. Update body is the nested {calendar: {color}} envelope;
UpdateCalendar is a flagged idempotent PUT. 233 -> 235 operations.
Smithy note: a trailing path label cannot carry the .json suffix in the
same segment, so the URIs follow the established suffix-less-id form.
TS/Ruby/Python pin the exact {calendar: {color}} wire body and surface
the pinned controller's {errors: {color: [...]}} 422 as each SDK's
validation error; 404 covered. paths.json cases for both ops plus an
UpdateCalendar idempotency case ([503, 200] -> 2 requests), dispatch in
all five runners, Ruby's GET-only skip.
Parity 74->75 / 195->197; SPEC ceiling narrative + Appendix E; SECURITY
122 GETs / 47 PUTs; AGENTS totals — the sprint's planned pre-C4 end
state (235/122/75/197), matching behavior-model exactly. calendar flips
to absorbed-in-sdk with four smithy_refs; README row.
Copilot AI review requested due to automatic review settings July 31, 2026 13:11
@github-actions github-actions Bot added documentation Improvements or additions to documentation typescript Pull requests that update TypeScript code ruby Pull requests that update the Ruby SDK go kotlin swift spec Changes to the Smithy spec or OpenAPI conformance Conformance test suite python Pull requests that update the Python SDK labels Jul 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcebe8cdb8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread spec/basecamp.smithy Outdated
…y is

Codex caught the mismatch: the shared ValidationError requires a flat
{error} body, but the pinned calendar controller emits {"errors":
{"color": ["is not a valid color"]}}. New FieldValidationError error
shape resolves — via a single FieldKeyedErrors member, the
BookmarkStatus treatment, because a direct map member would unwrap to
the bare map and lose the errors key — to exactly the wire shape:
{errors: {field: [messages]}}. UpdateCalendar's error list swaps to it.
Error-class mapping at runtime is status-driven and unchanged (the
per-SDK 422 tests already pin ValidationError classes against this
payload); this fixes what the OpenAPI contract *describes*.
Copilot AI review requested due to automatic review settings July 31, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fa64da357

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread typescript/tests/services/calendars.test.ts
@jeremy
jeremy merged commit d04a6a3 into main Jul 31, 2026
44 of 45 checks passed
@jeremy
jeremy deleted the c8-calendar branch July 31, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conformance Conformance test suite documentation Improvements or additions to documentation go kotlin python Pull requests that update the Python SDK ruby Pull requests that update the Ruby SDK spec Changes to the Smithy spec or OpenAPI swift typescript Pull requests that update TypeScript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants