Repository navigation
feat(connector-slack): make ConnectorSlackPlugin's static bot token optional - #36681
Conversation
…ptional Without a token the plugin registers only the 'slack' client service for caller-held tokens and skips the flow connector, logging that once at boot. With a token, behaviour is unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzh5qSa4qh6mCPSykM6
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 4bbe4b24799fc6d32ebbab42a27ef8463c758a0d && git checkout 4bbe4b24799fc6d32ebbab42a27ef8463c758a0d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6a731859def47e2c8cefcab4d635a1c45c60c2c1 288479620743cedc42cd482b65ba2834a52f3f05 && git checkout -B drift-repro 6a731859def47e2c8cefcab4d635a1c45c60c2c1 && git merge --no-ff 288479620743cedc42cd482b65ba2834a52f3f05
node scripts/docs-audit/affected-docs.mjs --json 6a731859def47e2c8cefcab4d635a1c45c60c2c1 |
|
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W 席位核对 — ACCEPT · repo:objectstack#3 · head 2884796 · 2026-11-23T12:28Z
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W Landing · 2026-11-23T12:29Z · ACCEPT 7101143050 + contract review PASS 7101119944 at head 2884796
State: ready + auto-merge (Tier S). On MERGED, #35791 closes by |
Requested by Yibo Wang · project thread
Fixes #35791
repo:objectstack#3 · os-support-ai · session_01WGufzh5qSa4qh6mCPSykM6
Claim: seat 3 comment 7099367389 on the card, naming branch claude/project-thread-oxj1ql.
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
ConnectorSlackPluginOptionsis nowOmit<SlackConnectorOptions, 'token'>plustoken?: string, and the constructor's options argument is optional.start(): without a token (absent or empty string) the plugin logs one info line (no static bot token — flow Slack connector not registered; the 'slack' client service serves caller-held tokens only) and returns before touching the automation engine. With a token it registers theslackflow connector exactly as before.init()is unchanged: theslackclient service (createSlackClientService, already token-free since feat(messaging): Slack DM delivery — slack channel, per-person link store, approval requests by DM (Part of #34730) #35789) is registered in both compositions.SlackConnectorOptions.tokenandcreateSlackConnectorare unchanged: the connector itself still requires a token.Tests
packages/connectors/connector-slack/src/connector-slack-plugin.test.ts, new block "composed without a static bot token":{ fetchImpl }only: the automation engine is up (connector_actionregistered, positive control) and has noslackconnector; theslackclient service sends with the caller's token.new ConnectorSlackPlugin(): boots, no connector, client service present.'': exactly one info line, the registry'sregisterConnectornever called,destroy()a no-op.The existing token-ful tests (end-to-end flow post, client service, shutdown unregister) are unchanged and green, which pins the "with a token, unchanged" half.
Acceptance notes
packages/connectors/connector-slack/dist/index.d.tsexportstype ConnectorSlackPluginOptionsfrom the package entry (exports["."],files: ["dist", …]), now spelledinterface ConnectorSlackPluginOptions extends Omit<SlackConnectorOptions, 'token'> { token?: string; }andconstructor(options?: ConnectorSlackPluginOptions). Published surface, widened only: every value accepted before is still accepted. Henceyes (widening); it owes the seat's TIER_DEFAULT review of the declaration.Metadata-protocol: none: a plugin constructor option, not stored metadata. Kindnone⇒patch.""gets the skip and its log line rather than a connector that fails every call withnot_authed.Verification
Two-minute check:
pnpm --filter @objectstack/connector-slack exec vitest run src/connector-slack-plugin.test.ts, expect 7 passed.Local runs (head 2884796)
pnpm --filter '@objectstack/connector-slack^...' buildunder the verify lock:VERDICT command-exit 0.pnpm --filter @objectstack/connector-slack test && … typecheck && … build:Test Files 3 passed (3),Tests 16 passed (16),VERDICT command-exit 0.tsc --listFilesincludes the 3 test files.node scripts/ablation-replace.mjsreplacedif (!token) {withif (false as boolean) {(anchor 1 → 0, blob 67ae6dad → 0d7e87e8);src/connector-slack-plugin.test.tswentTests 4 failed | 3 passed (7), the four tokenless cases red; restored, blob == HEAD 67ae6dad,git diff HEADempty.dispatch-gates.mjs --commands, 65): 64 run with exit 0, 1 NOT MEASURED:pnpm check:dual-build-cjs-loadsexit 3 (PREREQUISITE NOT MET, 39 untouched packages withoutdist/; CI builds and runs it).check-plugin-teardown-shape --self-testfirst exited 3 on the shallow clone, re-run after fetching its pinned fixture: 48 cases pass.dispatch-gates.mjs --ran: "65 derived famil(ies) accounted for — 64 run, 1 NOT-MEASURED". Change set 132 lines, under the 3000-line human-merge threshold.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code