feat(bubble-ups): wrap bubbling a recording up and down

Merged
JE
3mo ago
+2401-40

What

Adds the per-recording write side of Bubble Up (the BC5 successor to
"save") to all six SDKs. Until now only the read side existed — GetBubbleUps
models the account-user /my/readings/bubble_ups.json list; there was no way to
bubble a single recording up or pop it back down.

Two operations, both answering 204 No Content with no body from
Recordings::BubbleUpsController:

  • CreateBubbleUp → POST /recordings/{recordingId}/bubble_up.json — with
    an optional at timing field.
  • DeleteBubbleUp → DELETE /recordings/{recordingId}/bubble_up.json.

Both are naturally idempotent (bubbling an already-bubbled recording, or popping
an absent one, is a set-membership no-op that still answers 204). This mirrors
the DeleteBookmark precedent, which ships off the identical 204 shape, and
the PinMessage/UnpinMessage pair (POST/DELETE 204, empty output).

New BubbleUps tag → BubbleUpsService across all six SDKs via the default
tag→service fallback (zero generator overrides). Go gets the hand-written
wrapper + AccountClient.BubbleUps() accessor; TS/Ruby/Python get their
hand-written client accessors; Swift/Kotlin accessors are generated.

The at field — a bc3 behavior finding

at controls timing. "now" bubbles up immediately; a scheduling keyword
("today", "tomorrow", "weekend", "next_week") or an ISO8601 date
(e.g. "2026-09-10") schedules it to resurface later.

bc3 currently requires at. Reading::Bubbleupable#bubble_up routes
"now" to bubble_up_now, but every other value — including a nil from an
omitted param — flows to Reading::BubbleUpSchedule#bubble_up_at=, whose else
branch calls Date.iso8601(value), and Date.iso8601(nil) raises. So the
operator-verified "optional, now-vs-scheduled" contract holds for scheduling but
omitting at errors server-side today — callers must send "now" for the
immediate case. The field is still modeled optional (not @required) so a
one-line bc3 default (params[:at] ||= "now") would make omission mean "now"
with no SDK change. Flagged as a suggested bc3 follow-up in the gap entry.

Route spelling

Modeled at the canonical flat /recordings/{id}/bubble_up.json, consistent
with the whole recording_actions family the SDK already ships flat (bookmark,
spotlight, pin, position). resource :bubble_up (bc3 config/routes.rb:232)
sits in concern :recording_actions, included flat at the CANONICAL
resources :recordings (:276) and separately bucket-scoped at :918. The
sibling resource :position in the same concern has a test/api test proving
the concern's flat routes answer on the API host.

bc3's doc/api documents neither spelling yet, so the two routes are waived
in spec/bc3-route-allowlist.yml (sdk_routes_absent_from_bc3_docs) with
routes.rb + controller evidence. Documenting the create/destroy contract in
bc3 doc/api would let both waivers drop.

Remaining API gap — per-recording status GET

GET /recordings/{id}/bubble_up.json (the show action) is not absorbable
and stays a gap. Recordings::BubbleUpsController#show renders
app/views/recordings/bubble_ups/show.json.jbuilder, which lives outside
app/views/api/; restrict_view_paths_to_api_root limits the API host to that
root, so the template is unrenderable there — the same trap that condemned
GetRecording. The head :no_content create/destroy sidestep it (no template).
Tracked as partial-coverage in
spec/api-gaps/recording-bubble-up-write.md, with the bc3 fix noted (add an
app/views/api/recordings/bubble_ups/show.json.jbuilder, then a GetBubbleUp
op + BubbleUpStatus shape close it).

Tests & checks

  • Conformance (all six runners): paths.json — create-with-at,
    create-omitting-at (asserts the SDK leaves it off the wire), delete;
    idempotency.json — both retry on 503 (Ruby GET-only-retry skips recorded in
    zero-skip-roster.yml).
  • Unit tests: Go wrapper (create at present/absent, delete, 4xx) + Ruby /
    Python / TypeScript service tests.
  • Green: smithy build, six-language make generate, all parity gates
    (idempotency, write-semantics, retry-metadata, service-inventory,
    operation-assignment, bucket-flat, grouped-client, bc3-route-parity,
    validate-api-gaps, doc-constants), Go/TS/Ruby/Python/Kotlin drift + unit +
    conformance, Swift drift + SDK/runner build.
  • Not run locally: Swift XCTest execution (needs full Xcode; the Command
    Line Tools lack XCTest — SDK and conformance runner both compile clean) and
    lint-actions (a local zizmor version flags pre-existing .github/workflows
    uses: ./… findings identically on origin/main; no workflow files changed).
    Both pass in CI.

Release note: Features (enhancement).

Tracks Basecamp card 10264451804.


Summary by cubic

Adds the per-recording write side of Bubble Up to all six SDKs: CreateBubbleUp (POST) and DeleteBubbleUp (DELETE) at /recordings/{recordingId}/bubble_up.json. Previously only the read side existed (GetBubbleUps); now a recording can be bubbled up and popped back down.

Both operations return 204 with no body and are naturally idempotent, so retrying on 503 is safe. CreateBubbleUp accepts an optional at timing field; bc3 currently rejects an omitted at server-side, so send "now" for immediate bubble-up. The field is modeled optional so a future bc3 default could make omission mean "now" without SDK changes.

New Features

  • Adds a BubbleUps service to Go, TypeScript, Ruby, Python, Swift, and Kotlin, with Python async coverage.
  • Conformance now asserts at reaches the wire when provided and is absent when omitted; adds idempotency coverage and unit tests for create (with and without at) and delete.

Remaining gap

  • GET /recordings/{recordingId}/bubble_up.json stays uncovered because bc3's show template is outside the API view path; tracked as partial coverage.
  • The two write routes are allowlisted for bc3 route parity because bc3's doc/api doesn't document them yet.