Update dock tool creation to current bucket-scoped API#327
Conversation
Spec Change Impact
Checklist of SDKs needing updates:
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the CloneTool operation to use a bucket-scoped endpoint across all SDKs and conformance tooling.
Changes:
- Switched CloneTool endpoint from
/dock/tools.jsonto/buckets/{bucketId}/dock/tools.jsonand threadedbucketIdthrough generated clients. - Updated language SDK method signatures (TS/Swift/Ruby/Python/Kotlin/Go) and related tests/conformance runners.
- Regenerated OpenAPI/Smithy-derived artifacts (schema, path mapping, metadata).
Reviewed changes
Copilot reviewed 12 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| typescript/tests/services/tools.test.ts | Updates ToolsService clone test to include bucketId and verify bucket-scoped path. |
| typescript/src/generated/services/tools.ts | Changes clone signature to accept bucketId and posts to bucket-scoped endpoint. |
| typescript/src/generated/services/index.ts | Reorders/relocates ToolsService export. |
| typescript/src/generated/schema.d.ts | Adds bucket-scoped CloneTool path/operation typing and removes flat path. |
| typescript/src/generated/path-mapping.ts | Maps CloneTool to the bucket-scoped path and removes flat mapping. |
| typescript/src/generated/openapi-stripped.json | Adds bucket-scoped CloneTool path and removes the flat endpoint. |
| typescript/src/generated/metadata.json | Refreshes generated timestamp and relocates CloneTool retry metadata. |
| swift/Sources/Basecamp/Generated/Services/ToolsService.swift | Updates clone signature to include bucketId and uses bucket-scoped path. |
| spec/basecamp.smithy | Updates CloneTool HTTP URI to include bucketId label and adds required bucketId to input. |
| ruby/test/basecamp/services/tools_service_test.rb | Updates clone test to stub bucket-scoped endpoint and pass bucket_id. |
| ruby/lib/basecamp/generated/types.rb | Updates generated timestamp comment. |
| ruby/lib/basecamp/generated/services/tools_service.rb | Updates clone method to require bucket_id and post to bucket-scoped endpoint. |
| ruby/lib/basecamp/generated/metadata.json | Refreshes generated timestamp and relocates CloneTool retry metadata. |
| python/src/basecamp/generated/services/tools.py | Updates sync/async clone methods to require bucket_id and use bucket-scoped path. |
| openapi.json | Moves CloneTool endpoint under /{accountId}/buckets/{bucketId}/dock/tools.json. |
| kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/tools.kt | Updates clone signature to include bucketId and uses bucket-scoped path. |
| kotlin/conformance/src/main/kotlin/com/basecamp/sdk/conformance/Main.kt | Reads bucketId from path params for CloneTool conformance dispatch. |
| go/pkg/generated/client.gen.go | Regenerates Go client to require bucketId for CloneTool request builders and interfaces. |
| go/pkg/basecamp/tools_test.go | Adds test asserting Tools.Create posts to bucket-scoped dock path. |
| go/pkg/basecamp/tools.go | Changes ToolsService.Create to accept bucketID and calls generated CloneTool with bucketId. |
| conformance/tests/paths.json | Updates CloneTool conformance case to include bucket-scoped path and pathParams.bucketId. |
| conformance/runner/typescript/runner.test.ts | Updates CloneTool runner to pass bucketId to client.tools.clone. |
| conformance/runner/ruby/runner.rb | Updates CloneTool runner to pass bucket_id from path params. |
| conformance/runner/python/runner.py | Updates CloneTool runner to pass bucket_id from path params. |
| conformance/runner/go/main.go | Updates CloneTool runner to pass bucketID into account.Tools().Create. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fixed — addressed the Go review feedback by deriving the expected bucket path from bucketID and recording the destination bucket in Tools.Create operation metadata. |
There was a problem hiding this comment.
2 issues found across 25 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Fixed — addressed the issues identified by cubic: CloneTool operation metadata uses the destination bucket, and the Python conformance runner accepts omitted CloneTool titles. |
Review carefully before merging. Consider a major version bump. |
7bc2869 to
7c6551d
Compare
7c6551d to
7e713d9
Compare
|
Unblock recipe now that #390 has repinned provenance to bc3
After that this should go green without any provenance work. |
…reate-bucket-scope-20260601145434 * origin/main: (28 commits) Upstream sync: repin provenance to bc3 ba105ba7 (2026-07-22), register post-train contracts, codify pin semantics (basecamp#390) ci: pin conformance uv sync to the matrix Python; parse the fan-in gate (basecamp#388) BC5 readiness: pairwise BC4↔BC5 + check-bc5-compat orchestrator + scheduled CI (basecamp#308) CI: fold conformance suites into their language test jobs (basecamp#387) Fix TypeScript SDK Content-Type on GET requests (basecamp#384) BC5 launch reconciliation: registry refresh for the shipped BC5 API train (basecamp#325) BC5 readiness: cross-language wire-replay decoders (basecamp#301) BC5 readiness: Go wrapper forward-compat audit + field-level drift check (basecamp#309) BC5 readiness: TypeScript live wire-capture canary (basecamp#294) BC5 readiness: forward-compat spec, briefs, parity lint (basecamp#293) deps(ts): bump brace-expansion from 5.0.2 to 5.0.7 in /typescript (basecamp#386) typescript: bump fast-uri, brace-expansion, js-yaml overrides for fresh advisories (basecamp#385) deps(actions): bump the actions group with 6 updates (basecamp#382) deps(ruby): bump the bundler-dependencies group in /ruby with 2 updates (basecamp#379) deps(kotlin): bump the gradle-dependencies group (basecamp#383) deps(go): bump github.com/oapi-codegen/oapi-codegen/v2 in /go (basecamp#381) deps(ts): bump the npm-dependencies group in /typescript with 2 updates (basecamp#380) deps(smithy): bump the smithy-gradle-dependencies group (basecamp#378) deps(go): bump github.com/oapi-codegen/runtime (basecamp#377) Todos Update/Edit/Replace: merge-safe writes across all 6 SDKs (basecamp#375) ... # Conflicts: # go/pkg/basecamp/api-provenance.json # go/pkg/basecamp/version.go # go/pkg/generated/client.gen.go # kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/BasecampConfig.kt # openapi.json # python/src/basecamp/_version.py # ruby/lib/basecamp/generated/metadata.json # ruby/lib/basecamp/generated/types.rb # ruby/lib/basecamp/version.rb # spec/api-provenance.json # spec/basecamp.smithy # swift/Sources/Basecamp/BasecampConfig.swift # typescript/src/client.ts # typescript/src/generated/metadata.ts # typescript/src/generated/openapi-stripped.json
Summary
CreateToolposts to/{accountId}/buckets/{bucketId}/dock/tools.jsonwithtool_typeand optionaltitle.CreatevalidatestoolTypeclient-side (usage error before any HTTP request), mirroring theUpdateguard; test coverage rounded out across Go, Ruby, Python, and TypeScript (omit-title and validation-error cases).mainpost-Upstream sync: repin provenance to bc3 ba105ba7 (2026-07-22), register post-train contracts, codify pin semantics #390 by merge (author commits preserved verbatim); all generated artifacts regenerated at the current provenance boundary.Ref: basecamp/basecamp-cli#471
Breaking changes
CloneTool→CreateTool. No deprecation alias is provided (pre-1.0 hard rename, per repo convention).POST /{accountId}/buckets/{bucketId}/dock/tools.json(bucket-scoped) replaces the legacy flat clone endpoint.{tool_type, title?}replaces the clone shape (source_recording_id-based). There is no source-tool parameter anymore.BC4 compatibility note
The
tool_typecreate contract is BC5-only:fivebranch dropped thesource_recording_idrequirement (477049c0d7, 2026-03-18) and added create-by-type (c1a59bf1a9, 2026-04-23).fivemerged to bc3masterin1d08f11882at 2026-05-25T23:36:59Z — the same day basecamp-cli#471 was reported (2026-05-25T09:22:54Z, ~14h earlier), so the reporter's clone-shape observations matched what was served at that moment.masterimplementstool_typecreation (re-verified at the pinned provenance revisionba105ba7:Docks::ToolsController,config/routes.rb, andtest/api/docks/tools_controller_api_test.rbasserttool_type+title→ 201 on the bucket-scoped route).origin/four(BC4, tracked bycompatibility.bc3-fourprovenance) still unconditionally requiressource_recording_id—CreateToolwith onlytool_typewill 400 against BC4. Registered in the api-gaps registry (Record dock tool create contract change in api-gaps registry #389,spec/api-gaps/dock-tool-create-contract.md); upstream docs follow-up filed as bc3#12364.Source of truth
Validated against bc3
masterat the current SDK provenance pin (ba105ba7, 2026-07-22, set by #390). This PR makes no provenance changes — the dock-tools contract it models was verified unchanged between the original validation revision (ae96a694) and the current pin, andmake sync-statusis clean at the pin.SDK API shape
Tools().Create(ctx, bucketID, toolType, opts)—toolTyperequired (usage error if empty), valid values documented on the methodclient.tools.create(bucketId, { toolType, title? })account.tools.create(bucket_id:, tool_type:, title:)account.tools.create(bucket_id=..., tool_type=..., title=...)account.tools.create(bucketId, CreateToolBody(toolType = ..., title = ...))tools.create(bucketId:request:)withCreateToolRequest(toolType:title:)Verification
Post-integration, at the merged head:
make check— full root suite, passing clean locally at this head (0086c09b): smithy-check, behavior-model-check, provenance-check, sync-spec-version/api-version checks, go/kt/py drift checks, go-check, ts-check, rb-check, kt-check, swift-check, py-check, conformance (all five runners: Go, TypeScript, Python, Ruby, Kotlin), url-routes/bucket-flat parity, api-gaps validationmake sync-status— clean at theba105ba7pin (no unabsorbed dock-tools deltas onmasterorfour)Unblocks the SDK portion of
basecamp-cli#471.