fix(slack): normalize approval user ids#84671
Conversation
|
Codex review: needs real behavior proof before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. source-reproducible: current main leaves lowercase Slack approver IDs lowercase and later compares them exactly against normalized Slack sender IDs. I did not run tests because this review is read-only and test commands can create artifacts. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the shared Slack ID normalization after maintainer review with redacted live Slack proof, and keep the secret-file compatibility change only if maintainers intentionally want the non-throwing OpenClaw helper contract preserved. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main leaves lowercase Slack approver IDs lowercase and later compares them exactly against normalized Slack sender IDs. I did not run tests because this review is read-only and test commands can create artifacts. Is this the best way to solve the issue? Yes, the Slack fix uses the existing Slack approver parser as the narrow shared normalization point and covers exec, plugin, target, and interaction paths. The remaining issue is proof and maintainer approval, not a better implementation shape. Label justifications:
Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 1a7669bc63a0. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
* fix(slack): normalize approval user ids * chore(openrouter): satisfy spread fallback lint * fix(ci): unblock status and secret-file checks
Summary
user:,slack:, and mention forms.Verification
node scripts/run-vitest.mjs extensions/slack/src/exec-approvals.test.ts extensions/slack/src/approval-auth.test.tsnode scripts/run-vitest.mjs extensions/slack/src/monitor/events/interactions.test.tsnode scripts/run-vitest.mjs src/auto-reply/reply/commands-approve.test.tsnode scripts/run-vitest.mjs extensions/slack/src/exec-approvals.test.ts extensions/slack/src/approval-auth.test.ts extensions/slack/src/monitor/events/interactions.test.ts -- --reporter verbosenode scripts/run-vitest.mjs src/commands/status.summary.redaction.test.ts src/infra/secret-file.test.ts -t "redactSensitiveStatusSummary|readSecretFileSync"node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfo --pretty falsenode scripts/run-oxlint.mjs src/infra/secret-file.ts src/commands/status.summary.redaction.test.ts extensions/openrouter/provider-routing.ts extensions/slack/src/exec-approvals.ts extensions/slack/src/exec-approvals.test.ts extensions/slack/src/approval-auth.test.ts extensions/slack/src/monitor/events/interactions.test.tsgit diff --checkReal behavior proof
Behavior addressed: Slack approvals denied when configured approver ids used lowercase Slack user ids while Slack events delivered uppercase user ids.
Real environment tested: Local OpenClaw Codex worktree on Node/Vitest, exercising Slack approval auth helpers plus the Slack block-action interaction entrypoint used by approval buttons.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs extensions/slack/src/exec-approvals.test.ts extensions/slack/src/approval-auth.test.ts;node scripts/run-vitest.mjs extensions/slack/src/monitor/events/interactions.test.ts;node scripts/run-vitest.mjs src/auto-reply/reply/commands-approve.test.ts;node scripts/run-vitest.mjs extensions/slack/src/exec-approvals.test.ts extensions/slack/src/approval-auth.test.ts extensions/slack/src/monitor/events/interactions.test.ts -- --reporter verbose;node scripts/run-oxlint.mjs extensions/openrouter/provider-routing.ts extensions/slack/src/exec-approvals.ts extensions/slack/src/exec-approvals.test.ts extensions/slack/src/approval-auth.test.ts extensions/slack/src/monitor/events/interactions.test.ts;git diff --check.Evidence after fix: The Slack interaction suite drives approval button payloads through the Slack block-action handler with uppercase Slack event users and lowercase configured approver ids. The exec/plugin auth suites cover lowercase configured approver ids matching uppercase Slack senders, lowercase sender ids matching uppercase configured allow lists, and rejection of
C...channel-like ids across raw, prefixed, and mention forms.Observed result after fix: Targeted Vitest suites passed, including the combined Slack approval proof run with
Test Files 3 passed (3)andTests 56 passed (56); targeted oxlint passed withFound 0 warnings and 0 errors; source-test type graph passed; whitespace check passed.What was not tested: Cross-workspace Slack OAuth/app installation drift; this proof targets the Slack event/authorization boundary in OpenClaw rather than revalidating Slack's platform delivery.