Skip to content

Remove phantom Todoset fields#202

Closed
jeremy wants to merge 1 commit intomainfrom
robzolkos/remove-phantom-todoset-fields
Closed

Remove phantom Todoset fields#202
jeremy wants to merge 1 commit intomainfrom
robzolkos/remove-phantom-todoset-fields

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 18, 2026

Summary

  • Remove completed_count, on_schedule_count, and over_schedule_count from the Todoset model across all SDKs (Go, TypeScript, Ruby, Swift, Kotlin)
  • The Basecamp API never populates these fields — BC3 doesn't compute them, they're absent from the API docs, and the SDK was surfacing misleading zeros

Breaking change

This removes three public fields from the Todoset type in all five SDKs. At v0.6.0 this is easier to justify, but it still deserves explicit breaking-change labeling. Any consumer referencing these fields will get a compile/type error on upgrade — though such code was already working against values that were always zero.

Affected surfaces:

  • Go: Todoset struct in go/pkg/basecamp/todosets.go
  • TypeScript: Todoset type in typescript/src/generated/schema.d.ts
  • Ruby: Todoset class in ruby/lib/basecamp/generated/types.rb
  • Swift: Todoset struct in swift/Sources/Basecamp/Generated/Models/Todoset.swift
  • Kotlin: Todoset data class in kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/Todoset.kt

Changes

Surgical removal through all layers: Smithy spec → OpenAPI → fixture → all 5 SDKs + hand-written Go wrapper + tests.

Test plan

  • smithy-check
  • go-check-drift, Go tests
  • kt-check-drift, Kotlin metadata compile
  • TS typecheck + tests
  • Ruby tests
  • Swift build

Summary by cubic

Remove three phantom fields from the Todoset model across all SDKs to match the Basecamp API and remove misleading zero values. This is a breaking change removing completed_count, on_schedule_count, and over_schedule_count from generated types and the Go wrapper.

  • Refactors

    • Removed the fields from the Smithy spec, OpenAPI, and fixtures; regenerated Go/TypeScript/Ruby/Swift/Kotlin SDKs and updated the hand-written Go wrapper/tests.
    • Cleaned up generated clients and metadata; no behavior change beyond field removal.
  • Migration

    • Delete any references to the removed fields; the API does not provide these counts.
    • Use completed and completed_ratio, or compute counts via todolists/todos endpoints if needed.

Written for commit 591ef7a. Summary will update on new commits.

…er_schedule_count

These three fields were defined in the Smithy spec and test fixture but
the Basecamp API never returns them. The BC3 app doesn't compute them
and they're absent from the API docs. The SDK deserialized them as zero
values (0), which was misleading — e.g. completed_count showed 0 even
when a project had fully-completed todolists.

Removed from the Smithy spec, fixture, hand-written Go wrapper/tests,
and regenerated all language SDKs (Go, TypeScript, Ruby, Kotlin, Swift).
Copilot AI review requested due to automatic review settings March 18, 2026 20:48
@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 labels Mar 18, 2026
@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Summary
- **Removed Fields**: Phantom fields from `Todoset` have been removed.

### Impact
- **Breaking Change**: Yes, this is a breaking change as it removes fields from `Todoset`.
- **SDKs Requiring Regeneration**: All SDKs will need regeneration to reflect this change.

### Checklist for SDK Updates:
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift

Please ensure all SDKs are updated accordingly, as this change will affect any existing code depending on the removed fields.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes three previously exposed Todoset fields (completed_count, on_schedule_count, over_schedule_count) across the spec, fixtures, and all generated SDKs because the Basecamp API does not populate them (they were always misleading zeros).

Changes:

  • Removed the three phantom fields from the Smithy spec and OpenAPI outputs.
  • Updated fixtures and regenerated/updated all SDK models (Go, TypeScript, Ruby, Swift, Kotlin) to drop the fields.
  • Updated Go wrapper conversion and tests to align with the new Todoset shape.

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.

Reviewed changes

Copilot reviewed 5 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/basecamp.smithy Removes the three fields from the source spec for Todoset.
openapi.json Removes the three properties from the canonical OpenAPI schema.
spec/fixtures/todosets/get.json Removes the fields from the Todoset fixture payload.
go/pkg/generated/client.gen.go Regenerated Go client model with the fields removed.
go/pkg/basecamp/todosets.go Removes fields from the hand-written Todoset wrapper + mapping from generated type.
go/pkg/basecamp/todosets_test.go Updates tests to stop asserting removed fields.
typescript/src/generated/openapi-stripped.json Removes the three properties from the stripped OpenAPI used by TS generation.
typescript/src/generated/schema.d.ts Removes the three fields from the TS Todoset type surface.
typescript/src/generated/metadata.json Updates generation metadata for the TS artifacts.
ruby/lib/basecamp/generated/types.rb Removes accessors/parsing/serialization of the three fields in Ruby Todoset.
ruby/lib/basecamp/generated/metadata.json Updates generation metadata for the Ruby artifacts.
swift/Sources/Basecamp/Generated/Models/Todoset.swift Removes the three properties and initializer parameters from Swift Todoset.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/Todoset.kt Removes the three properties from Kotlin Todoset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 13 files

Copy link
Copy Markdown

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

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: 591ef7a47b

ℹ️ 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
Comment on lines 1321 to 1324
todolists_url: String
completed_ratio: String
completed: Boolean
completed_count: Integer
on_schedule_count: Integer
over_schedule_count: Integer
app_todolists_url: String
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update API provenance for this upstream spec sync

Because this change is explicitly syncing the Todoset shape to match upstream BC3/API behavior, AGENTS.md requires a matching spec/api-provenance.json update and make provenance-sync. Leaving provenance untouched means the repo still records the old bc3-api/bc3 SHAs as the conformance baseline, so make sync-status and later audits will compare future diffs against the wrong upstream revision.

Useful? React with 👍 / 👎.

@jeremy
Copy link
Copy Markdown
Member Author

jeremy commented Mar 18, 2026

Duplicate of #193 — opened by mistake on the wrong branch.

@jeremy jeremy closed this Mar 18, 2026
@jeremy jeremy deleted the robzolkos/remove-phantom-todoset-fields branch March 18, 2026 20:54
@jeremy jeremy requested a review from Copilot March 18, 2026 20:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes three “phantom” count fields from the Todoset model across the spec, fixtures, OpenAPI, and all generated SDKs so the SDKs no longer surface misleading zero values for fields the Basecamp API never returns.

Changes:

  • Removed completed_count, on_schedule_count, and over_schedule_count from the Smithy spec, OpenAPI artifacts, and fixture.
  • Regenerated/updated Todoset types across Go, TypeScript, Ruby, Swift, and Kotlin to match the updated schema.
  • Updated Go wrapper + tests to reflect the slimmer Todoset shape.

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.

Reviewed changes

Copilot reviewed 5 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/basecamp.smithy Removes the three count fields from the source model definition.
openapi.json Removes the three properties from the canonical OpenAPI schema.
spec/fixtures/todosets/get.json Removes the phantom fields from the Todoset fixture payload.
go/pkg/generated/client.gen.go Drops the three fields from the generated Go Todoset model.
go/pkg/basecamp/todosets.go Removes the three fields from the handwritten Go wrapper model + mapping.
go/pkg/basecamp/todosets_test.go Removes assertions that depended on the phantom fixture fields.
typescript/src/generated/openapi-stripped.json Keeps the stripped OpenAPI in sync (properties removed).
typescript/src/generated/schema.d.ts Drops the three fields from the generated TypeScript type surface.
typescript/src/generated/metadata.json Regeneration timestamp update.
ruby/lib/basecamp/generated/types.rb Removes accessors/parsing/serialization for the three fields.
ruby/lib/basecamp/generated/metadata.json Regeneration timestamp update.
swift/Sources/Basecamp/Generated/Models/Todoset.swift Removes the three properties from the generated Swift model + initializer.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/Todoset.kt Removes the three properties from the generated Kotlin data class.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeremy jeremy requested a review from Copilot March 18, 2026 20:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes three Todoset “count” fields (completed_count, on_schedule_count, over_schedule_count) that the Basecamp API never populates, eliminating misleading always-zero values across the spec, fixtures, and all generated SDKs (plus the handwritten Go wrapper/tests).

Changes:

  • Removed the three fields from Smithy, OpenAPI (full + stripped), and the todoset fixture.
  • Regenerated/updated Todoset models in TypeScript, Ruby, Swift, Kotlin, and Go generated client.
  • Updated the Go handwritten Todoset wrapper + unmarshalling test to match the new shape.

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.

Reviewed changes

Copilot reviewed 5 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
typescript/src/generated/schema.d.ts Drops the three phantom count properties from the TS Todoset type surface.
typescript/src/generated/openapi-stripped.json Removes the count properties from the stripped OpenAPI schema used by TS generation.
typescript/src/generated/metadata.json Refreshes generation timestamp for TS artifacts.
swift/Sources/Basecamp/Generated/Models/Todoset.swift Removes the three count fields from the Swift Todoset model + initializer.
spec/fixtures/todosets/get.json Deletes count fields from the canonical todoset fixture response.
spec/basecamp.smithy Removes the three members from the Smithy Todoset structure (source of truth).
ruby/lib/basecamp/generated/types.rb Removes accessors/serialization for the three fields from Ruby Todoset type.
ruby/lib/basecamp/generated/metadata.json Refreshes generation timestamp for Ruby artifacts.
openapi.json Removes the three count properties from the full OpenAPI spec output.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/Todoset.kt Removes the three count properties from the Kotlin Todoset data class.
go/pkg/generated/client.gen.go Removes the three fields from the generated Go Todoset model.
go/pkg/basecamp/todosets_test.go Removes assertions for fields that no longer exist in Todoset unmarshalling.
go/pkg/basecamp/todosets.go Removes fields from handwritten Go Todoset and updates conversion from generated model.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go kotlin 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