Skip to content

fix(addie): scrub internal dollar amounts from cost-cap message#5653

Merged
bokelley merged 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/cost-cap-member-facing-message
Jun 22, 2026
Merged

fix(addie): scrub internal dollar amounts from cost-cap message#5653
bokelley merged 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/cost-cap-member-facing-message

Conversation

@garvitkaushik-123

@garvitkaushik-123 garvitkaushik-123 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The daily cost-cap error message was leaking internal implementation details to members:

  • Raw dollar figures ($6.21, 5 USD) that mean nothing to end users
  • "Claude API" framing that exposes vendor/infra details
  • A precise countdown (~22 hours) that's overly mechanical
  • A broken /membership URL (lands on the public marketing page, not the member billing dashboard)

This PR replaces the message with a clean, member-facing string:

You've reached your daily conversation limit with Addie. Please try again tomorrow. Upgrade your membership at https://agenticadvertising.org/dashboard/membership for a higher daily limit.

For paid members, the existing "ping the team" copy is preserved since they're already at the top tier.

Also noticed and fixed the same /membership/dashboard/membership typo in organization-db.ts seat-limit messages (lines 549–550), matching the canonical URL convention used in billing-tools.ts, alerts.ts, and billing-public.ts.

Files changed

  • server/src/addie/claude-cost-tracker.ts — rewrote formatCapExceededMessage to drop internal amounts/countdown, fix URL
  • server/src/db/organization-db.ts — fixed /membership → full canonical URL in seat-limit error strings
  • server/tests/unit/claude-cost-tracker.test.ts — updated assertions to match new message shape (no dollar amounts, correct URL)
  • server/tests/unit/claude-client-cost-gate.test.ts — updated regex from usage cap to conversation limit

Test plan

  • claude-cost-tracker.test.ts — 22/22 pass
  • claude-client-cost-gate.test.ts — 4/4 pass
  • Full pre-commit suite — 4259 passed, 0 failed
  • Manually trigger the cap on a test account and confirm the message reads cleanly on Slack, web chat, and email surfaces

Closes #5633, closes #5634, closes #5639

The cap-exceeded message exposed raw USD figures and a precise countdown
that have no meaning for members, and pointed to /membership (the public
marketing page) instead of /dashboard/membership (billing management).

Replace the message with a plain-text, member-friendly string that omits
internal accounting details and uses the canonical dashboard URL — matching
the convention already used in billing-tools, alerts, and billing-public.

Also fixes the same /membership typo in organization-db seat-limit messages.

Closes adcontextprotocol#5633, closes adcontextprotocol#5634

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@aao-release-bot aao-release-bot 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.

⚠️ Argus review could not complete

The automated review encountered an issue (possibly reached max turns, timed out, or failed to post the final gh pr review). A human reviewer should take this PR.

View workflow run

This is an automated message from the Argus AI review workflow.

@bokelley

Copy link
Copy Markdown
Contributor

I’m fine with merging this one.

The change removes the internal Claude/API cost details from member-facing copy and fixes the membership dashboard URL, which is the important part. One small non-blocking wording nit: the cap is a rolling 24h window, so “try again tomorrow” may be slightly less precise than something like “try again later.” I would not block merge on that unless we want the copy to be exact about reset semantics.

@bokelley

Copy link
Copy Markdown
Contributor

Noting for the record: this bot can't push the "try again later" tweak directly — the PR head branch lives on @garvitkaushik-123's fork (garvitkaushik-123/adcp), outside this routine's write scope (adcontextprotocol/adcp only). Since @bokelley flagged it as non-blocking, leaving it for @garvitkaushik-123 to push (or a maintainer with fork-edit access) rather than holding up merge.


Triaged by Claude Code. Session: https://claude.ai/code/${CLAUDE_CODE_REMOTE_SESSION_ID}


Generated by Claude Code

@bokelley bokelley 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.

Approved. The copy removes internal cost/vendor details and fixes the dashboard membership URL. The rolling-24h wording nit is non-blocking.

@bokelley bokelley 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.

Approved. The copy removes internal cost/vendor details and fixes the dashboard membership URL. The rolling-24h wording nit is non-blocking.

@bokelley
bokelley merged commit 51599ea into adcontextprotocol:main Jun 22, 2026
13 checks passed
bokelley added a commit that referenced this pull request Jun 26, 2026
#5710)

* fix(server): use /dashboard/membership instead of /membership in CTAs

The Slack seat-usage notification and the member-profiles API error
message linked to /membership (the public marketing page) instead of
/dashboard/membership (the authenticated billing page where users
actually upgrade). Also clarified the path in the onboarding OpenAPI
description.

Same pattern as the organization-db.ts fix in PR #5653.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* build openapi registry

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Brian O'Kelley <bokelley@scope3.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants