Skip to content

Project-scope messagetypes on the bucket-scoped SDK; absorb bump-range surface (Fixes #567) - #570

Merged
jeremy merged 7 commits into
mainfrom
project-messagetypes
Jul 27, 2026
Merged

Project-scope messagetypes on the bucket-scoped SDK; absorb bump-range surface (Fixes #567)#570
jeremy merged 7 commits into
mainfrom
project-messagetypes

Conversation

@jeremy

@jeremy jeremy commented Jul 27, 2026

Copy link
Copy Markdown
Member

Problem

Message types (categories) are bucket-scoped in the BC3 API, but the SDK modeled them account-scoped — all five `bc messagetypes` operations 404 in production today (#567).

Changes

Commit 1 — SDK bump + messagetypes scoping (Fixes #567)

  • Bump SDK `3d4ec395922c` → `bb363c847b92` (`v0.9.1-0.20260727173625-bb363c847b92`, API provenance bc3 `c30869317168`, 2026-07-26)
  • All five `messagetypes` commands gain `--in`/`--project` scoping (gauges convention); validation stays ahead of project resolution; every breadcrumb carries the resolved `--in`
  • New unit tests pin exact method + path for the five-operation matrix (`GET/POST /buckets/{id}/categories.json`, `GET/PUT/DELETE /buckets/{id}/categories/{id}`) with a recording stub transport that rejects unmatched routes, plus validation-order tests
  • e2e: sibling-standard missing-project and `--project` empty-value tests; smoke passes `-p "$QA_PROJECT"`

Commit 2 — absorb additive SDK surface in the bump range

  • `notifications bubbleups [--page]` — Bubble Ups successor surface (basecamp-sdk#426), `GET /my/readings/bubble_ups.json`
  • `notifications list --limit-bubble-ups` — caps inline bubble-ups at 2 via `GetWithOptions(WithLimitBubbleUps())`, surfaces uncapped counts in the summary
  • `tools create --visible-to-clients` — tri-state create-time client visibility (basecamp-sdk#419); options struct now allocated whenever the flag is set so an explicit `false` reaches the wire; unit tests cover all three wire states
  • Model-only door/timeline fields (basecamp-sdk#431//run_analysis #424) flow through `--json` — no CLI change

Commit 3 — docs

  • API-COVERAGE.md: SDK summary rewrite, bucket-scoped message_types note, new BC5 Bubble Ups row (per the BC5-split rule) with reconciled totals, dock_tools visibility note
  • SKILL.md: `notifications bubbleups`, `--limit-bubble-ups`, `tools create --visible-to-clients`

Verification

  • `bin/ci` fully green (fmt/vet/lint/unit/e2e/surface/skill-drift/bare-groups/provenance/tidy)
  • Live against production (these 404ed before):
    • `messagetypes list -p 40475900` → `7 message types`
    • `messagetypes show 97730618 -p 40475900` → `🔥 Andon Cord`
    • `notifications bubbleups --json` → `13 bubble-up(s)`
    • `notifications list --limit-bubble-ups --json` → `52 notification(s), 2 of 13 bubble-up(s)`

Fixes #567


Summary by cubic

Scopes messagetypes to projects to match the bucket-scoped API, fixing production 404s (Fixes #567). Adds Bubble Ups listing and a compact notifications option; tools create can set client visibility, and notification totals are correct when the compact option is used.

  • New Features

    • notifications bubbleups lists all Bubble Ups (paginated). notifications list --limit-bubble-ups caps inline Bubble Ups at 2 and shows uncapped counts.
    • tools create --visible-to-clients sets client visibility at create time (chat and kanban_board only).
    • Bumped github.com/basecamp/basecamp-sdk/go to v0.9.1 for bucket-scoped MessageTypes, Bubble Ups, and tool visibility.
  • Bug Fixes

    • messagetypes are now project-scoped. All list/show/create/update/delete commands require --in/--project and call /buckets/{id}/categories…, resolving 404s.
    • Notifications: headline totals now use uncapped Bubble Up counts with --limit-bubble-ups; kept --limit-bubble-ups on the next-page breadcrumb; removed the unusable read breadcrumb from notifications bubbleups.
    • Tests: recording transport now closes request bodies per RoundTripper contract.

Written for commit 62e3ed5. Summary will update on new commits.

Review in cubic

jeremy added 3 commits July 27, 2026 11:45
…SDK (Fixes #567)

Message types (categories) are bucket-scoped in the BC3 API, but the SDK
modeled them account-scoped, so every messagetypes command 404ed in
production. Bump the SDK to bb363c847b92 (basecamp/basecamp-sdk#393),
which moves MessageTypesService onto /buckets/{id}/categories…, and give
all five commands --in/--project scoping per the gauges convention.

Validation stays ahead of project resolution (resolution fetches
/projects.json even for numeric IDs), and every breadcrumb carries the
resolved --in. Unit tests pin the exact method + path for all five
operations with a recording stub transport that rejects unmatched
routes, plus validation-order coverage. e2e gains the sibling-standard
missing-project and empty-flag tests; smoke passes -p on both
messagetypes invocations.
…range

Two new SDK capabilities land in the 3d4ec395922c..bb363c847b92 range
beyond the messagetypes reshape:

- Bubble Ups successor surface (basecamp/basecamp-sdk#426):
  'notifications bubbleups' pages through all current and scheduled
  bubble-ups via GET /my/readings/bubble_ups.json, and
  'notifications list --limit-bubble-ups' caps the inline feed at 2
  while surfacing the uncapped counts in the summary.

- Create-time client visibility on Tools.Create
  (basecamp/basecamp-sdk#419): 'tools create --visible-to-clients'
  passes the tri-state pointer, allocating the options struct whenever
  the flag is explicitly set so an explicit false reaches the wire.
  Honored only by chat and kanban_board tool types.

Unit tests cover the dedicated endpoint, the limit_bubble_ups query
param, and all three visible_to_clients wire states.
Rewrite the SDK version summary for v0.9.1-0.20260727173625-bb363c847b92,
note the bucket-scoped categories API on the message_types row, add a new
BC5 Bubble Ups row (per the BC5-split rule) with reconciled summary
totals, and note create-time visible_to_clients on dock_tools. The skill
documents 'notifications bubbleups', '--limit-bubble-ups', and
'tools create --visible-to-clients'.
Copilot AI review requested due to automatic review settings July 27, 2026 18:45
@github-actions github-actions Bot added commands CLI command implementations sdk SDK wrapper and provenance tests Tests (unit and e2e) skills Agent skills docs deps bug Something isn't working labels Jul 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad89acb82b

ℹ️ 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 internal/commands/notifications.go
…dcrumb

Following the next breadcrumb from a --limit-bubble-ups listing silently
dropped the cap, restoring scheduled bubble-ups on subsequent pages.
Carry the flag through and pin it with a breadcrumb test.

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

This PR updates the CLI to match newly bucket-scoped SDK/API behavior for message types by making messagetypes project-scoped (fixing production 404s), and absorbs additional SDK surface by adding Bubble Ups notifications support and create-time client visibility for tool creation.

Changes:

  • Bump github.com/basecamp/basecamp-sdk/go and update SDK provenance to the new revision/API sync.
  • Scope messagetypes operations to --in/--project and add unit + e2e coverage for the bucket-scoped routes.
  • Add notifications bubbleups plus notifications list --limit-bubble-ups, and add tools create --visible-to-clients (tri-state wire behavior) with tests and docs/surface updates.

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 17 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
skills/basecamp/SKILL.md Documents new Bubble Ups command/flag and tools create --visible-to-clients behavior.
internal/version/sdk-provenance.json Updates pinned SDK/API provenance metadata for the bump.
internal/commands/tools.go Adds --visible-to-clients to tool creation and ensures explicit false can be sent.
internal/commands/tools_test.go Adds unit tests covering tri-state visible_to_clients wire contract.
internal/commands/notifications.go Adds Bubble Ups subcommand and --limit-bubble-ups option path + summaries/breadcrumbs.
internal/commands/notifications_test.go Adds recording-transport based tests for the Bubble Ups endpoint and query param behavior.
internal/commands/messagetypes.go Makes message types project-scoped and forwards resolved bucket ID into SDK calls.
internal/commands/messagetypes_test.go Adds recording-transport tests pinning the 5-operation bucket-scoped route matrix + validation order.
internal/commands/commands.go Updates command catalog to include notifications bubbleups.
go.sum Updates dependency checksums for the SDK bump.
go.mod Bumps the Basecamp SDK module version.
e2e/tools.bats Adds e2e validation coverage for tools create --visible-to-clients missing --type.
e2e/smoke/smoke_notifications.bats Adds smoke coverage for notifications bubbleups (allowlisted when endpoint unavailable).
e2e/smoke/smoke_communication.bats Updates messagetypes smoke tests to pass project scoping.
e2e/smoke/.qa-allowlist Updates allowlist notes for per-project messagetypes and adds Bubble Ups allowlist entry.
e2e/messagetypes.bats Adds e2e tests for missing-project and empty --project value cases.
API-COVERAGE.md Updates coverage matrix and SDK summary for bucket-scoped message types and Bubble Ups/tools visibility.
.surface Updates CLI surface snapshot for new commands/flags.

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

Comment thread internal/commands/messagetypes.go Outdated
Comment thread internal/commands/messagetypes_test.go Outdated
Comment thread internal/commands/notifications_test.go
Copilot AI review requested due to automatic review settings July 27, 2026 18:52

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ca3b29d3c

ℹ️ 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 internal/commands/notifications.go Outdated

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread internal/commands/notifications_test.go

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 17 out of 18 changed files in this pull request and generated no new comments.

… extract shared recording test harness

notifications read resolves IDs from the notification feed
(/my/readings.json), not the dedicated Bubble Ups endpoint, so the read
breadcrumb on bubbleups failed for any bubble-up outside the feed's
first page. Remove it and pin the absence with a breadcrumb test.

Move the recording-transport helpers out of messagetypes_test.go into a
dedicated recording_test.go with its own token provider, making the
notifications tests' dependency explicit and dropping the cross-file
coupling on messages_test.go. Also align the messagetypes --in help text
with the accepted inputs (ID or name).
Copilot AI review requested due to automatic review settings July 27, 2026 19:23
@github-actions github-actions Bot added the breaking Breaking change label Jul 27, 2026
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

⚠️ Potential breaking changes detected:

  • Renamed and repurposed 'messagetypes' command to require the --project or --in flags, breaking any existing usage where these flags were not previously required.
  • Changed API for listing, showing, creating, updating, and deleting message types to include project resolution, breaking scripts or tools relying on the prior API structure.
  • Introduced 'bubbleups' subcommand under the 'notifications' command, which could cause changes in user workflows but does not break scripts.
  • Added '--limit-bubble-ups' flag to 'notifications list' command with changes to output structure, potentially affecting scripts parsing the notifications output.
  • Added '--visible-to-clients' flag to 'tools create', which is backward-compatible but changes the expected payload for client visibility, potentially impacting integrations depending on consistent behavior.

Review carefully before merging. Consider a major version bump.

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 18 out of 19 changed files in this pull request and generated 1 comment.

Comment thread internal/commands/notifications.go
The headline notification total was computed from the capped bubble_ups
array and the omitted scheduled_bubble_ups array, undercounting relative
to the non-limited mode. Use BubbleUpsCount/ScheduledBubbleUpsCount for
the total when the cap is active, and pin the arithmetic in the
breadcrumb test.
Copilot AI review requested due to automatic review settings July 27, 2026 19:39
@github-actions github-actions Bot removed the breaking Breaking change label Jul 27, 2026

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 18 out of 19 changed files in this pull request and generated 1 comment.

Comment thread internal/commands/recording_test.go
Copilot AI review requested due to automatic review settings July 27, 2026 19:48
@github-actions github-actions Bot added the breaking Breaking change label Jul 27, 2026

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 18 out of 19 changed files in this pull request and generated no new comments.

@jeremy
jeremy merged commit a7542d4 into main Jul 27, 2026
27 checks passed
@jeremy
jeremy deleted the project-messagetypes branch July 27, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change bug Something isn't working commands CLI command implementations deps docs sdk SDK wrapper and provenance skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project-scope the five bc messagetypes commands (basecamp-sdk #393 / #368)

2 participants