Add to-do list template library API - #827
Conversation
eca26a0 to
bb41915
Compare
bb41915 to
01abdfe
Compare
There was a problem hiding this comment.
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
There was a problem hiding this comment.
🟡 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 rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto 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.
ceb7cd9 to
fd4d128
Compare
jeremy
left a comment
There was a problem hiding this comment.
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 thetemplate_recording_id/destination_parent_id/ optionaladding_people_confirmedrequest shape all match. - The
.json-suffix question onGetTemplateLibraryCopy(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_confirmedis 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 tofalse.
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
422people-confirmation contract is surfaced as a typed error in every SDK —PeopleConfirmationRequiredError(TS/Python/Ruby/Go) and thepeopleConfirmationRequiredenum case (Swift) — each carrying the typedpeoplelist, while keeping the canonicalvalidationcode 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
breakingand, 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
- The api-gap doc's "Suggested API shape" and the BC3 raw route show the copy-status path with a
.jsonsuffix, 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. - The people-payload parser silently falls back to a generic
ValidationErrorif any person entry is malformed (missing/emptynameoravatar_url), droppingpeople. A defensible defensive choice; noting only so it's a deliberate decision rather than an accident.
Neither is a merge blocker.
Summary
Adds SDK coverage for Basecamp's deployed to-do list template library API:
422responseThe three Smithy operations generate service methods for TypeScript, Ruby, Swift, Kotlin, and Python. The Go SDK adds typed
TemplatesServicemethods and conversion coverage.Closes the SDK gap for basecamp/bc3#12953.
API provenance
masterfrom88549ca619eto deployed revisionc680233ba0e(2026-09-02)Breaking-change note
This additive API change extends Go's generated
ClientInterfaceandClientWithResponsesInterface. 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
breakinglabel so the release process accounts for the generated Go interface expansion.Verification
MISE_QUIET=1 make checkThe repository's Linux gate skips Swift execution; Swift generation and dispatch changes are covered by the macOS CI jobs.