Skip to content

Add to-do list template library API - #827

Merged
jeremy merged 4 commits into
basecamp:mainfrom
robzolkos:template-library-api
Sep 3, 2026
Merged

Add to-do list template library API#827
jeremy merged 4 commits into
basecamp:mainfrom
robzolkos:template-library-api

Conversation

@robzolkos

@robzolkos robzolkos commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds SDK coverage for Basecamp's deployed to-do list template library API:

  • discover the account's template library and active to-do list templates
  • start an asynchronous template copy into a project's to-do set
  • retrieve pending, processing, completed, and failed copy states
  • model and test the people-confirmation 422 response

The three Smithy operations generate service methods for TypeScript, Ruby, Swift, Kotlin, and Python. The Go SDK adds typed TemplatesService methods and conversion coverage.

Closes the SDK gap for basecamp/bc3#12953.

API provenance

  • advances BC3 master from 88549ca619e to deployed revision c680233ba0e (2026-09-02)
  • regenerates the route snapshot at 382 routes across 66 API sections
  • removes the three temporary template-library route waivers
  • records the full 111-commit range triage and the absorbed API gap

Breaking-change note

This additive API change extends Go's generated ClientInterface and ClientWithResponsesInterface. Downstream mocks or adapters that implement either interface must add the new template-library methods (or embed/delegate to the generated client). Applications that construct and use the SDK clients directly require no migration. The public service additions in the other SDKs are additive.

The PR carries the breaking label so the release process accounts for the generated Go interface expansion.

Verification

  • MISE_QUIET=1 make check
  • shared conformance coverage for all three operations across Go, Kotlin, TypeScript, Ruby, and Python
  • TypeScript, Ruby, Python, and Go service tests cover happy and error paths

The repository's Linux gate skips Swift execution; Swift generation and dispatch changes are covered by the macOS CI jobs.

@github-actions github-actions Bot added 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 python Pull requests that update the Python SDK labels Aug 27, 2026
@robzolkos robzolkos added the breaking Breaking change to public API label Sep 2, 2026
@robzolkos
robzolkos force-pushed the template-library-api branch from eca26a0 to bb41915 Compare September 2, 2026 20:15
@github-actions github-actions Bot added the conformance Conformance test suite label Sep 2, 2026
@robzolkos
robzolkos force-pushed the template-library-api branch from bb41915 to 01abdfe Compare September 2, 2026 20:16

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 65 files

You’re at about 99% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread spec/basecamp.smithy
Comment thread conformance/runner/typescript/runner.test.ts Outdated
Comment thread conformance/runner/go/main.go Outdated
Comment thread ruby/test/basecamp/services/templates_service_test.rb
Comment thread conformance/tests/template_library.json Outdated
Comment thread conformance/tests/template_library.json Outdated
Comment thread conformance/tests/template_library.json
Comment thread go/pkg/basecamp/templates.go
@robzolkos
robzolkos marked this pull request as ready for review September 2, 2026 20:32
Copilot AI balanced review requested due to automatic review settings September 2, 2026 20:33

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.

🟡 Changes recommended

The public SDK error surfaces discard confirmation people, and the TypeScript conformance runner does not preserve optional-field omission.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds Smithy-first support for the account-wide to-do list template library across all six SDKs.

Changes:

  • Models library discovery, asynchronous copy creation/status, and confirmation errors.
  • Regenerates SDK services, types, metadata, routing, and provenance.
  • Adds service and cross-SDK conformance coverage.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File summaries
File Description
typescript/tests/services/templates.test.ts Tests template-library methods and errors.
typescript/src/generated/services/templates.ts Adds generated Templates methods.
typescript/src/generated/schema.d.ts Adds generated routes and schemas.
typescript/src/generated/path-mapping.ts Maps template-library operations.
typescript/src/generated/openapi-stripped.json Updates stripped OpenAPI artifact.
typescript/src/generated/metadata.ts Adds operation retry metadata.
typescript/src/client.ts Updates API version.
typescript/scripts/generate-services.ts Configures service generation and names.
typescript/scripts/generate-path-mapping.ts Groups template-library paths.
typescript/package.json Raises the fast-uri override.
typescript/package-lock.json Locks updated fast-uri.
swift/Sources/BasecampGenerator/ServiceGrouper.swift Groups new Swift operations.
swift/Sources/BasecampGenerator/MethodNaming.swift Defines Swift method names.
swift/Sources/Basecamp/Generated/Services/TemplatesService.swift Adds generated Swift methods.
swift/Sources/Basecamp/Generated/Models/TemplateLibraryCopy.swift Models copy state.
swift/Sources/Basecamp/Generated/Models/TemplateLibrary.swift Models the library response.
swift/Sources/Basecamp/Generated/Models/CreateTemplateLibraryCopyRequest.swift Models copy requests.
swift/Sources/Basecamp/Generated/Metadata.swift Adds Swift retry metadata.
swift/Sources/Basecamp/BasecampConfig.swift Updates API version.
spec/overlays/tags.smithy Tags new operations for generation.
spec/bc3-routes.json Updates the upstream route snapshot.
spec/basecamp.smithy Defines operations, shapes, and errors.
spec/api-provenance.json Advances the BC3 provenance pin.
spec/api-gaps/template-library.md Records template-library absorption.
spec/api-gaps/subtasks-canonical-rename.md Records upstream compatibility findings.
spec/api-gaps/README.md Documents repin triage and the gap.
SPEC.md Updates counts and conformance inventory.
SECURITY.md Updates retry-operation counts.
scripts/check-idempotency-parity Updates readonly-operation expectations.
ruby/test/basecamp/services/templates_service_test.rb Tests Ruby library operations.
ruby/scripts/generate-services.rb Configures Ruby generation.
ruby/lib/basecamp/version.rb Updates API version.
ruby/lib/basecamp/generated/types.rb Adds generated Ruby types.
ruby/lib/basecamp/generated/services/templates_service.rb Adds generated Ruby methods.
ruby/lib/basecamp/generated/metadata.json Adds Ruby retry metadata.
python/tests/services/test_templates_service.py Tests Python library operations.
python/src/basecamp/generated/types.py Adds generated Python types.
python/src/basecamp/generated/services/templates.py Adds sync and async methods.
python/src/basecamp/generated/metadata.json Adds Python retry metadata.
python/src/basecamp/_version.py Updates API version.
python/scripts/generate_services.py Configures Python generation.
openapi.json Adds canonical OpenAPI coverage.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/Types.kt Adds the Kotlin request body.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/templates.kt Adds generated Kotlin methods.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/Metadata.kt Adds Kotlin retry metadata.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/BasecampConfig.kt Updates API version.
kotlin/generator/src/main/kotlin/com/basecamp/sdk/generator/Config.kt Configures Kotlin generation.
kotlin/conformance/src/main/kotlin/com/basecamp/sdk/conformance/Main.kt Dispatches Kotlin conformance cases.
go/templates/client.tmpl Generates grouped Go methods.
go/pkg/generated/client.gen.go Adds generated Go wire coverage.
go/pkg/basecamp/version.go Updates API version.
go/pkg/basecamp/url-routes.json Adds Go route metadata.
go/pkg/basecamp/templates.go Adds typed Go service methods.
go/pkg/basecamp/templates_test.go Tests Go methods and conversions.
go/pkg/basecamp/api-provenance.json Syncs Go provenance.
go/grouped-client-inventory.yml Registers grouped Go methods.
COORDINATION.md Updates the documented provenance pin.
conformance/tests/template_library.json Adds shared operation cases.
conformance/runner/typescript/runner.test.ts Dispatches TypeScript cases.
conformance/runner/swift/Sources/ConformanceRunner/Dispatch.swift Dispatches Swift cases.
conformance/runner/ruby/runner.rb Dispatches Ruby cases.
conformance/runner/python/runner.py Dispatches Python cases.
conformance/runner/go/main.go Dispatches Go cases.
behavior-model.json Adds retry and sensitivity metadata.
AGENTS.md Updates generated-operation counts.
Review details

Files not reviewed (1)

  • typescript/package-lock.json: Generated file
  • Files reviewed: 44/65 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread conformance/runner/typescript/runner.test.ts Outdated
Comment thread conformance/tests/template_library.json
@robzolkos
robzolkos force-pushed the template-library-api branch from ceb7cd9 to fd4d128 Compare September 3, 2026 02:34

@jeremy jeremy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Readiness review — to-do list template library

Verdict: ready to merge. I reviewed the spec, the six generated surfaces, the error handling, and the tests against the branch (rebased on current main, 89 files). CI is fully green and the PR is mergeable/clean; all eleven review threads are resolved.

Correctness

  • The three operations map exactly onto the three deployed BC3 routes from #12953: GET /template_library.json, POST /template_library/copies.json (201), and the copy-status read. Verbs, status codes, and the template_recording_id / destination_parent_id / optional adding_people_confirmed request shape all match.
  • The .json-suffix question on GetTemplateLibraryCopy (cubic P1) is a false positive and the disposition is right: single-resource member GET routes across the whole spec omit the suffix (projects/{id}, todos/{id}, todosets/{id}, messages/{id}, vaults/{id}, …) while only collection routes keep it. Rails accepts the optional format segment, so the normalized path is both consistent and correct.
  • adding_people_confirmed is modeled as an optional boolean, and the conformance 422 case pins its absence on the wire (requestBodyAbsent) — so omission is genuinely exercised, not silently coerced to false.

Completeness

Complete relative to the deployed API — the api-gap doc records "nothing remains missing," and the 3 operations cover the full surface (browse library, start async copy, poll to completion incl. the destination_todolist on a completed copy).

Conventions / parity

  • The 422 people-confirmation contract is surfaced as a typed error in every SDK — PeopleConfirmationRequiredError (TS/Python/Ruby/Go) and the peopleConfirmationRequired enum case (Swift) — each carrying the typed people list, while keeping the canonical validation code and 422 status so existing handlers still match. This is the hand-marshal/parse carve-out done consistently, with strict payload validation (id/name/avatar_url all required) that degrades to a generic validation error rather than throwing on a malformed entry.
  • The confirmation-person name and avatar_url are marked @basecampSensitive(pii, redact) — correct for the PII they carry.
  • Provenance is advanced (spec + Go api-provenance.json, COORDINATION.md, route snapshot), the temporary template-library waivers are removed, and the gap is marked absorbed.
  • The Go generated-interface expansion is correctly labeled breaking and, together with the Swift exhaustive-switch impact, is documented in MIGRATING.md.

Tests

Substantive, not trivial. Conformance cases assert method/path/request-body/nested response fields (destination_todolist.id) and the absent-confirmation wire shape; per-language service tests assert the typed people payload (id/name/avatar), pending-vs-completed decoding, and the 401/403/404 paths. The Go suite additionally covers errors.As unwrap compatibility and the nil-request usage guard.

Non-blocking observations

  1. The api-gap doc's "Suggested API shape" and the BC3 raw route show the copy-status path with a .json suffix, while the generated route omits it. Correct as-is (verified above), but the doc/route mismatch could confuse a future reader; a one-line note there would remove the ambiguity.
  2. The people-payload parser silently falls back to a generic ValidationError if any person entry is malformed (missing/empty name or avatar_url), dropping people. A defensible defensive choice; noting only so it's a deliberate decision rather than an accident.

Neither is a merge blocker.

@jeremy
jeremy merged commit 450285c into basecamp:main Sep 3, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change to public API conformance Conformance test suite 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.

3 participants