Skip to content

fix(content): require explicit authorized Slack artist selection - #1130

Draft
sidneyswift wants to merge 2 commits into
mainfrom
cosmo/content-explicit-artist
Draft

sidneyswift wants to merge 2 commits into
mainfrom
cosmo/content-explicit-artist

Conversation

@sidneyswift

@sidneyswift sidneyswift commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Current-main successor to the relevant artist-selection scope in #437 and #382. Those historical PRs remain untouched. No old branch is merged or retargeted.

  • Remove fixed requester and artist IDs from the Slack content handler.
  • Resolve requester only through explicit server-configured signed Slack workspace/member → Recoup account bindings; no prompt/email/display-name or other-bot fallback.
  • Require one explicitly mentioned full artist name from that account's direct/organization artist roster. Reject missing, unmatched, multiple extracted names, duplicate names, directory-slug collisions, path-changing directory names, revoked access, changed slugs and incomplete/erroring roster queries.
  • Authorize before attachment/public-blob handling or generation. Keep both repository lookup paths bound to the requester account.
  • Preserve existing flags, batch fan-out, polling, callbacks and generation/publishing pipeline.

Release prerequisite — draft

Configure verified SLACK_CONTENT_ACCOUNT_BINDINGS before enabling new requests. This is an explicit grant; an administrator must verify each workspace/member and intended Recoup account. No grants, credentials or production configuration have been changed by this PR. No mapping is inferred from the former constants. Without bindings all new requests intentionally fail closed; in-flight callback handling remains configured normally.

Operator instructions and a placeholder-only example: lib/agents/content/README.md and .env.example.

Verification

  • TDD: 24 handler regressions failed against unchanged main, then passed after the fix (external network denied).
  • 226 content/identity/account/webhook tests + 267 content/authorization/agent compatibility tests pass with external network denied.
  • Installed Slack adapter identity parsing exercised directly; both team and team_id forms covered.
  • Independent native review: no actionable introduced defects; 40 focused tests independently passed. Four later added tests additionally cover missing repository, partial/all-failed batches and polling failure. Eight path-modifier regressions failed before the added directory guard and passed afterward; delta independently reviewed.
  • Repository lint and full formatting pass; final path-guard delta also passes scoped lint/format. Full unit/response-contract, lint, formatting, OAuth compatibility CI and Vercel preview pass on final head 87e44fa8daaea77e15a6ca4e82f14dc0580e29c4. CodeRabbit skips draft PRs; the review result above is the independent native review, not that status.
  • Repository-wide TypeScript is not clean on main. Same-checkout/dependency comparison: 216 baseline diagnostics vs 195 candidate diagnostics, no new normalized diagnostics; none in the changed feature files. This is not a claim that global typecheck passes.

Limits

No live Slack message, database query, model/provider content generation, public blob upload or hosted acceptance test was performed. Natural-language extraction is still the existing AI parser: literal-name and authorization checks do not prove semantic intent for arbitrary negated/style-reference/multi-subject prompts. Multiple extracted artists are rejected. No REST content-create authorization behavior is changed.

Not merged; production unchanged.

@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api Ready Ready Preview Oct 25, 2026 12:16am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
Preview — 87e44fa8 Deployed Oct 25, 2026 by vercel[bot]
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.

1 participant