Skip to content

Add topic Bubble Up operations - #70

Open
code-monger-givenall wants to merge 1 commit into
basecamp:mainfrom
code-monger-givenall:codex/hey-bubble-up-sdk-pr
Open

Add topic Bubble Up operations#70
code-monger-givenall wants to merge 1 commit into
basecamp:mainfrom
code-monger-givenall:codex/hey-bubble-up-sdk-pr

Conversation

@code-monger-givenall

@code-monger-givenall code-monger-givenall commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

HEY has topic-level Bubble Up routes, but the SDK only covered the bulk posting versions. This adds the missing topic operations for scheduling a custom date, canceling a scheduled Bubble Up, and bubbling a topic up now.

The schedule request matches the form HEY expects:

  • slot=custom in the query
  • date=YYYY-MM-DD in the form body
  • waiting_on=true only when requested

The service wrapper rejects invalid topic IDs and dates before making a request. The Smithy model, generated client, route coverage, behavior model, service tests, and conformance suite are updated together.

Tested against live HEY behavior for schedule, cancel, and Bubble Up now. make check passes with 130 conformance cases.


Summary by cubic

Adds topic-level Bubble Up operations to TopicsService so callers can schedule, cancel, or run Bubble Up immediately. Previously only bulk routes were supported; this adds topic routes with validation and correct form wire format.

  • Adds ScheduleBubbleUp(ctx, topicID, date, waitingOn), CancelBubbleUp(ctx, topicID), and BubbleUpNow(ctx, topicID). Schedule uses slot=custom, optional waiting_on, and an application/x-www-form-urlencoded body date=YYYY-MM-DD.
  • Validates topicID > 0 and date format; returns a usage error without sending a request on invalid input.
  • Adjusts client header/path behavior: only append .json and set JSON headers when Accept is application/json; these endpoints set Accept: */* and send form bodies to avoid .json.
  • Retry policy: cancel is idempotent and retries on 429/503 with exponential backoff; schedule and now do not auto-retry.
  • Updates Smithy and openapi.json with /topics/{topicId}/bubble_up and /topics/{topicId}/bubble_up_now, regenerates the client, adds conformance tests (including form-body assertions). No breaking changes to existing bulk Bubble Up APIs.

Written for commit d382685. Summary will update on new commits.

Review in cubic

@code-monger-givenall
code-monger-givenall force-pushed the codex/hey-bubble-up-sdk-pr branch from 65d5ef7 to 50def4b Compare August 19, 2026 17:36
@code-monger-givenall
code-monger-givenall marked this pull request as ready for review August 19, 2026 17:36
Copilot AI balanced review requested due to automatic review settings August 19, 2026 17:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds topic-level Bubble Up scheduling, cancellation, and immediate execution across the Smithy model, Go SDK, and conformance suite.

Changes:

  • Adds three topic Bubble Up operations and Go service wrappers.
  • Implements validation and form/query encoding.
  • Updates generated artifacts, route coverage, behavior metadata, and tests.

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 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
spec/route-coverage.json Registers the new routes.
spec/hey.smithy Models the three operations.
spec/excluded-routes.json Removes implemented route exclusions.
openapi.json Adds generated OpenAPI definitions.
go/pkg/hey/url-routes.json Adds generated route mappings.
go/pkg/hey/topics.go Implements public service wrappers.
go/pkg/hey/topic_bubble_up_test.go Tests requests and validation.
go/pkg/hey/client.go Supports non-JSON generated routes.
go/pkg/generated/client.gen.go Adds generated clients and response types.
conformance/tests/paths.json Adds route conformance cases.
conformance/runner/go/main.go Executes the new conformance operations.
behavior-model.json Records operation behavior metadata.
Suppressed comments (1)

spec/hey.smithy:2591

  • BubbleUpTopicNow is also declared non-idempotent, so the generated Go method bypasses doWithRetry and never retries a 429/503 despite this trait and the PR summary saying all three operations retry. Decide whether repeating “bubble up now” is safe; if it is, mark it idempotent and add a retry conformance case, otherwise remove/correct the advertised retry policy.
@heyRetry(maxAttempts: 2, baseDelayMs: 1000, backoff: "exponential", retryOn: [429, 503])

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread spec/hey.smithy Outdated
Comment thread conformance/tests/paths.json
Copilot AI review requested due to automatic review settings August 19, 2026 18:51
@code-monger-givenall
code-monger-givenall force-pushed the codex/hey-bubble-up-sdk-pr branch from 50def4b to d382685 Compare August 19, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants