Skip to content

fix(slack): preserve historical v2 credential compatibility - #7363

Open
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
investigate/historical-selector-schemas
Open

fix(slack): preserve historical v2 credential compatibility#7363
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
investigate/historical-selector-schemas

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • Project preview-era slack_v2 action auth fields into the current merged credential shape at read time.
  • Apply the projection to normalized drafts, deployment snapshots, and pinned version views so selector hydration, comparison, forking, and runtime all receive canonical state.
  • Keep database rows and frozen deployment snapshots unchanged; no migration or schema change is included.

Historical transition: f4d47ed introduced authMethod plus customBotCredential; 5be35b5 replaced them with the merged credential picker.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Testing

  • 313 focused tests across compatibility, persistence, version reads, comparison, selector context, serializer, and fork reconciliation
  • bunx tsc --noEmit -p apps/sim/tsconfig.json
  • bun run lint:check
  • bun run check:api-validation
  • bun run test:migrations-safety

Review focus: the compatibility predicate is restricted to action-mode slack_v2 blocks carrying the historical authMethod marker, and persistence continues to receive only ordinary migrated blocks.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the Contributor License Agreement

Screenshots/Videos

Not applicable; this is a read-time workflow compatibility fix.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 1, 2026 6:47pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a non-mutating read-time compatibility projection that translates preview-era Slack v2 action authentication fields into the current merged credential representation.

  • Applies compatibility handling to normalized draft reads, deployment materialization, and pinned version reads.
  • Keeps normalized rows and frozen deployment snapshots unchanged by persisting migrated blocks before compatibility projection.
  • Adds focused fixtures and tests covering selector hydration, serialization, comparison, sanitization boundaries, and snapshot immutability.

Confidence Score: 5/5

The 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.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "fix(slack): preserve historical v2 crede..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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