feat(projects): expose starred and star_url on Project

Merged
JE
3mo ago
+178-20

What

Project gains two members:

  • starred (optional Boolean) — true only when the project carries a star on the current user's home page. New on the wire in bc3#13042, which made GET /projects.json emit it beside bookmarked and GET /projects/{id}.json emit both.
  • star_url (optional String) — the bucket stars collection (/buckets/{id}/stars.json). The projects partial has always emitted it and the docs show it, but the spec never modeled it (Folder had it; Project didn't).

Both optional, matching bookmarked / bookmark_url. All six SDKs regenerated; the Go hand-written Project wrapper maps both through projectFromGenerated.

Semantics the tests pin

A star is a flag on a pin (Bucket::Pin#starred), so starred implies bookmarked — never the reverse. The shared fixtures (spec/fixtures/projects/list.json + get.json) and each SDK's project tests carry the pinned-but-unstarred combination, the one a decoder that conflates the flags gets wrong.

Provenance

bc3#13042 (abdcdc61ef) is already inside the current provenance pin; the pin does not move. The range triage in spec/api-gaps/README.md had recorded that range as needing no new Smithy member — it read the partial's dock filter and missed the members the index/show templates add around it. Corrected there in the established one-correction style. No route change, so spec/bc3-routes.json is untouched (verified with bc3-routes-check against a bc3 checkout at the pin).

Note: the field is live on the API only once bc3 master deploys; SDKs decode its absence as the usual optional-member nil/omitted before then.

Tracking: Basecamp card

Checks

Run locally and green: smithy-check, behavior-model-check, url-routes-check, bc3-route-parity (+ self-test), bc3-routes-check (with bc3 checkout), check-fixture-coverage, check-projected-examples, doc-constants-check, provenance/version sync checks, validate-api-gaps, all drift gates, go-check, ts-check, rb-check, py-check, kt-check, conformance for Go/Kotlin/TypeScript/Ruby/Python (+ runner tests), parity gates, check-fixture-execution --partial.

Not runnable here (CommandLineTools without XCTest): the Swift test lanes — swift-check tests, conformance-swift, and the full six-runner check-fixture-execution. swift build (SDK + generator + public-API consumer) passes locally; CI is authoritative for the Swift test lanes and lint-actions.


Summary by cubic

Adds starred and star_url as optional fields on Project in the API spec and all six SDKs, so SDK consumers can now distinguish a starred project from one that's merely bookmarked. Both fields are already emitted by the API, so this is non-breaking.

Behavior

  • starred is true only when the project carries a star on the current user's home page, and it implies bookmarked — never the reverse.
  • star_url points to the bucket stars collection (/buckets/{id}/stars.json).
  • Fixtures and SDK tests pin the bookmarked-but-unstarred combination so decoders that conflate the two flags fail.
  • Corrects the api-gaps triage that had missed these members from the bc3#13042 change.