fix(slack): preserve historical v2 credential compatibility - #7363
fix(slack): preserve historical v2 credential compatibility#7363BillLeoutsakosvl346 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR adds a non-mutating read-time compatibility projection that translates preview-era Slack v2 action authentication fields into the current merged credential representation.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue identified. The compatibility transform is narrowly restricted to marked historical Slack v2 action blocks, operates without mutating its input, is applied at the principal workflow-read boundaries, preserves sanitization, and keeps compatibility-only state out of migration persistence.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/workflows/compatibility/slack-v2-auth.ts | Adds a narrowly gated, immutable projection from historical Slack v2 action-auth fields to the current canonical credential shape. |
| apps/sim/lib/workflows/persistence/utils.ts | Applies compatibility projection to normalized and deployed reads while ensuring only ordinary migrated blocks can be persisted. |
| apps/sim/lib/workflows/application/read-workflow-version.ts | Projects historical version state before presentation and preserves credential sanitization for non-privileged responses. |
| apps/sim/lib/workflows/compatibility/slack-v2-auth.test.ts | Covers custom-bot and OAuth modes, immutability, serializer output, selector context, comparison equivalence, and guarded no-op cases. |
| apps/sim/lib/workflows/application/workflow-crud.test.ts | Verifies pinned historical versions are presented canonically without mutating their stored state. |
| apps/sim/lib/workflows/persistence/utils.test.ts | Verifies deployment materialization projects legacy Slack authentication without changing the frozen snapshot. |
| apps/sim/lib/workflows/compatibility/slack-v2-auth.fixtures.ts | Defines the historical preview-era Slack v2 state used consistently across compatibility tests. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Historical Slack v2 state] --> B{Read boundary}
B --> C[Normalized draft read]
B --> D[Deployment materialization]
B --> E[Pinned version read]
C --> F[Legacy auth projection]
D --> F
E --> F
F --> G[Canonical credential state]
E --> H{Include credential values?}
H -->|No| I[Sanitize credential fields]
H -->|Yes, authorized workspace| G
C -. persist migrations only .-> J[Stored legacy state unchanged]
D -. frozen snapshot unchanged .-> J
Reviews (1): Last reviewed commit: "fix(slack): preserve historical v2 crede..." | Re-trigger Greptile
There was a problem hiding this comment.
No issues found across 7 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
Summary
slack_v2action auth fields into the current merged credential shape at read time.Historical transition:
f4d47edintroducedauthMethodpluscustomBotCredential;5be35b5replaced them with the mergedcredentialpicker.Type of Change
Testing
bunx tsc --noEmit -p apps/sim/tsconfig.jsonbun run lint:checkbun run check:api-validationbun run test:migrations-safetyReview focus: the compatibility predicate is restricted to action-mode
slack_v2blocks carrying the historicalauthMethodmarker, and persistence continues to receive only ordinary migrated blocks.Checklist
Screenshots/Videos
Not applicable; this is a read-time workflow compatibility fix.