Skip to content

feat(slack): pinned seed ids and X-OAuth-Scopes on auth.test - #229

Closed
0xChathurinda wants to merge 1 commit into
vercel-labs:mainfrom
0xChathurinda:feat/slack-seed-pinned-ids
Closed

feat(slack): pinned seed ids and X-OAuth-Scopes on auth.test#229
0xChathurinda wants to merge 1 commit into
vercel-labs:mainfrom
0xChathurinda:feat/slack-seed-pinned-ids

Conversation

@0xChathurinda

Copy link
Copy Markdown

Summary

Two small Slack fidelity additions that test suites pointing a real app at the emulator need:

  1. Pinned ids in the seed. slack.users[].user_id and slack.channels[].channel_id are now honoured, so a fixture and the application under test can agree on an id without a lookup at start (the mirror channel id an app reads from an env var, the bot user id it pins). Ids are still generated when omitted; a pinned id that already exists is left alone rather than duplicated.
  2. X-OAuth-Scopes on auth.test. Slack reports the token's granted scopes in that response header, and SDKs and setup checks read it to decide which methods they may call. The emulator sent no header, so every scope looked missing.

Testing

src/__tests__/seed-ids.test.ts covers pinned vs generated ids, users.lookupByEmail resolving the pinned user, duplicate-id protection, and the scopes header. pnpm --filter @emulators/slack test, type-check and lint pass. Seed examples in the package and root READMEs show the new keys.

Seed users and channels may now carry `user_id` / `channel_id`, so a fixture
and the application under test can agree on an id without a lookup at start
(a mirror channel id in an env var, a bot user id a client pins). Ids are
still generated when omitted, and a pinned id that already exists is left
alone rather than duplicated.

auth.test now returns the token's scopes in the `X-OAuth-Scopes` response
header, as Slack does. SDK setup checks and permission probes read that
header to decide which methods they may call; without it every scope looked
missing.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

@0xChathurinda is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@0xChathurinda
0xChathurinda deleted the feat/slack-seed-pinned-ids branch September 7, 2026 02:00
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