Repository navigation
Conversation
Hooks into WorkOS organization_membership.{created,updated,deleted}
webhooks to add/remove members from a Slack user group (@aao-members),
making AgenticAdvertising.org members visually identifiable in workspace
conversations.
The user group is auto-created on first use if it doesn't exist. Ops
can pin the group ID and handle via SLACK_MEMBER_USER_GROUP_ID /
SLACK_MEMBER_USER_GROUP_HANDLE env vars. Requires usergroups:read +
usergroups:write scopes on the bot token.
https://claude.ai/code/session_01MaC9AaSiVtFaVbbJFeN5a3
- Drop include_disabled param from getSlackUserGroups (bool false serializes as string "false" which Slack treats as truthy) - Move addMemberBadge call outside if(workosUser) block so badge is assigned even when WorkOS user fetch fails - Guard removeMemberBadge against empty member list (Slack rejects usergroups.users.update with zero users) https://claude.ai/code/session_01MaC9AaSiVtFaVbbJFeN5a3
|
Confirmed: Slack user groups don't show a visual badge next to usernames — they only matter for @-mentions. The actual mechanism for "badges" in Slack is overlaying an icon onto the user's profile photo and uploading it via Updated scope for this PR (or split into a stacked follow-up): Keep the user-group plumbing from this PR — it's useful infrastructure for member-wide @-mentions. Add the photo-overlay layer as the actual visual badge. Implementation outline
Asset needed from productA 256×256 (or vector → render) PNG of the AAO badge with transparent background. The badge itself is the load-bearing visual — needs design review before backfill. Suggested splitIf this PR is getting too big, keep the user-group plumbing here and rename the PR/changeset to "feat(server): Slack Reference: https://www.reddit.com/r/Slack/comments/1fwo9nt/badges_for_slack/ — confirms there's no native badge API; photo overlay is the convention. |
…roup @-mention scope Per @bokelley's review: Slack user groups don't show visual badges — they only enable member-wide @-mentions. Renaming addMemberBadge / removeMemberBadge to addToMemberUserGroup / removeFromMemberUserGroup, and updating log messages and changeset accordingly. Photo-overlay badge (users.setPhoto) is a separate follow-up that needs a design asset and consent/admin-settings decision first. https://claude.ai/code/session_017Ypq6RvZxi7gpP6WY873pw
@aao-members user group for member @-mentions
|
Good catch — taking the split path. User groups are @-mention infrastructure only; you're right that the visual badge requires photo overlay. What just shipped on this branch (commit 010f861):
What's deferred to a follow-up:
Once those land, the implementation outline you wrote is solid. The One heads-up: the Generated by Claude Code |
|
Acknowledged — the rename to Admin-token note captured: when the photo-overlay follow-up starts, the scope check in No changes needed on this PR from the comment. Triaged by Claude Code. Session: https://claude.ai/code/session_01CGRda5StGzhtRsokW4tEUs Generated by Claude Code |
|
Refining the scope — we can build the photo-overlay infrastructure independently of the badge asset and the opt-in policy. Both layers should ship in this PR; only the placeholder badge needs to be swapped for the final design later. Decoupling
The placeholder asset can be a generated 256×256 SVG with "AAO" text + the existing brand color so the compositing/upload path is exercisable end-to-end before the real asset ships. The diff between placeholder and real-asset versions is one binary file swap. Status of the user-group plumbingKeep it.
Closes #2340 once both layers are in. The asset swap and toggle-flip are ops decisions that don't block the merge. |
Ships the second independent Slack member-identity layer requested in
PR review: composite an AgenticAdvertising.org badge onto a member's
Slack profile photo, fully gated by the auto_apply_aao_badge toggle
(default OFF — no production effect until ops flips it).
Key pieces:
- sharp-based compositing (photo-badge.ts); placeholder SVG badge now,
swap for final asset via aao-member-badge.png later
- DB migration 448 adds original_photo_url, badge_photo_applied_at,
badge_applied_photo_url, badge_opt_out to slack_user_mappings
- badge_applied_photo_url stores the post-upload CDN URL so the daily
reconcile job can detect when a member changes their own photo
without stacking the overlay on an already-composited image
- SSRF guard in fetchImageBuffer rejects non Slack CDN hostnames
- apply/revert on organization_membership.{created,updated,deleted}
- auto_apply_aao_badge toggle in admin settings (default OFF)
- backfill endpoint (POST /api/admin/slack/apply-member-badge-backfill)
requires toggle to be ON; dry_run=true available for counting
- per-user opt-out via /aao badge off slash command and admin API
- daily member-badge-reconcile job re-applies badge after photo change
https://claude.ai/code/session_01LD4FXUvaYs1bbjbUJBZuw5
|
Done — photo-badge infrastructure is now in the branch alongside the user-group layer. What was added (commit 49313bf):
Expert-review fixes applied before push:
Ops checklist before enabling:
Both layers close #2340. The badge asset swap and toggle-flip are separate ops decisions that don't block merge. Generated by Claude Code |
|
Noted — photo-badge layer received. The expert-review fixes (stacking bug root cause, SSRF guard, Generated by Claude Code |
|
Acknowledged — thank you for the pass. PR is parked in draft pending the ops checklist gate. No further bot action on this thread until the source issue is re-triggered or the ops checklist items are checked off. Generated by Claude Code Generated by Claude Code |
|
Sunsetting — triage-bot draft sat 3 weeks with broken-links failing; source issue #2340 remains open and can be re-triggered with |
* chore(deps): migrate to @adcp/sdk 17.0.0-beta.0 (AdCP 3.3 beta)
Move to @adcp/sdk 17.0.0-beta.0, which pins the signed AdCP 3.3.0-beta.0
bundle and retains stable 3.2.7, 3.1.29 and 3.0.25 bundles. Move
@adcp/reporting-storage to 0.2.1-beta.0, the beta-train release whose peer
range accepts SDK 17 (0.1.0 requires ^16.0.0 and left the tree invalid).
- catalog runner: forward the SDK-native fixture_preparation phase in the
private audit record instead of a repo-shaped {disposition, phase}. The
supplied-hook refusal stays: SDK 16.5 added the preparation authorizer
(#3389), but this adapter's capability preflight still precedes it
(adcp-client#3435).
- learner and production guidance names the stable SDK on npm latest
(16.5.0); the choose-your-SDK page states SDK 17 beta support for the 3.3
beta. tests/helpers/sdk-checkpoint.cjs encodes the rule.
- tests: discovery failure is terminal since SDK 16.5 (adcp-client#3392);
context_key is echoed (#3396); the identity33 house-authority fix shipped
(#3388); a prerelease pin needs the exact advertised preview.
- SDK response-conformance baseline re-recorded under 17.0.0-beta.0 with
identical evidence apart from the version.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(training-agent): keep SDK 17 storyboard and preparation evidence native
- Routed requires: [multi_agent] storyboards: the runner's http loopback
made identity.brand_json_url schema-invalid (3.2+ needs https), and SDK
16.5+ fails discovery for capability-gated storyboards on invalid
capabilities. A harness-only TRAINING_AGENT_IDENTITY_URL keeps the public
https identity for those runs; deployments never set it.
- Catalog runner: when a native result omits producer records, fill the
SDK-native fixture_resolutions and fixture_preparation (protected captures
stripped) instead of a repo-shaped per-record failure.
- Reporting tests assert SDK 16.5+ native failed-preparation evidence.
- Known limitations: SDK #3395 is fixed upstream by adcp-client#3439, not
yet released.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs(reference): add changeset for the SDK known-limitations update
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(training-agent): let test harnesses that disable rate limits skip the buyer OAuth limiter
SDK 17 opens more MCP sessions per client, which pushed the buyer OAuth
integration test's loopback traffic past the per-IP 60/min buyer limiter.
createTrainingAgentRouter({ disableRateLimit: true }) now also skips that
limiter; production keeps it (default on, unit-tested).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Closes #2340
Hooks into WorkOS
organization_membership.{created,updated,deleted}webhooks to automatically add and remove members from a Slack user group (@aao-members), making AgenticAdvertising.org members visually identifiable in workspace conversations. The group is created on first use if it doesn't exist. Ops can pin the group ID or override the handle viaSLACK_MEMBER_USER_GROUP_ID/SLACK_MEMBER_USER_GROUP_HANDLEenv vars.Non-breaking justification: additive server-side change only — new Slack API calls and webhook side-effects. No schema changes, no wire-format changes, no public API changes. Existing behavior is unchanged if
ADDIE_BOT_TOKENlacksusergroups:*scopes (ops must approve updated app manifest before this activates).Deploy note: existing members at deploy time are not backfilled — they join
@aao-memberson their next membership event, or a workspace admin can manually add them.Pre-PR review:
membershandle collision (→aao-members+ env var override), outer badge-error log level promoted towarn, missing changeset,date_deleteguard in group resolution. Remaining nits: read-then-write race is acknowledged (low-risk for internal tooling, no distributed lock needed at this scale)include_disabled: falsebool serialization bug (removed param, Slack default is false),addMemberBadgemoved outsideif (workosUser)guard, empty-array guard added toremoveMemberBadgeto avoid Slackinvalid_userserrorSession: https://claude.ai/code/session_01MaC9AaSiVtFaVbbJFeN5a3
Generated by Claude Code