Skip to content

[comp] Production Deploy#2385

Merged
tofikwest merged 9 commits intoreleasefrom
main
Mar 30, 2026
Merged

[comp] Production Deploy#2385
tofikwest merged 9 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.

github-actions bot and others added 7 commits March 25, 2026 20:35
Add `code` step type to the DSL so dynamic integrations can execute
arbitrary JavaScript alongside declarative steps — enabling 100%
coverage of all possible integration patterns (AWS SDK, Promise.all,
data transforms, JWT signing, etc.).

Add dynamic employee sync support so integrations created via the
dynamic integration system can sync employees without hand-written
TypeScript. Includes a generic sync service, sync run log persistence,
and frontend support for dynamic sync providers.

Key changes:
- New `code` DSL step with full CheckContext access (ctx.fetch, ctx.pass, etc.)
- SyncEmployee schema + interpretDeclarativeSync function
- GenericEmployeeSyncService extracting common import/deactivation pattern
- Generic POST /dynamic/:slug/employees sync endpoint
- GET /available-providers endpoint for frontend
- Sync trigger routes dynamic providers automatically
- Execution logs persisted to DB for both checks and syncs
- Agent debugging endpoints: validate, check-runs, check-run-by-id
- Frontend dynamically renders sync providers from API
- All existing sync endpoints (GWS, Rippling, JumpCloud, Ramp) unchanged

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
syncDefinition was validated by Zod and read from the DB but never
written. Both upsert and create in the controller and repository
omitted the field, silently dropping it. This would cause
syncDynamicProviderEmployees to always fail with "has no sync
definition."

Fixed in: repository create/upsertBySlug, controller upsert/create,
and seed script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…x success flag

- Parse syncDefinition through SyncDefinitionSchema.parse() before
  persisting to DB, ensuring Zod defaults (employeesPath: 'employees')
  are applied. Previously stored raw unvalidated JSON.

- Set results.success = false when errors > 0 in GenericEmployeeSyncService.
  Previously success was always true, causing the sync trigger to
  misreport partial failures as successes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n validate endpoint

The per-check CheckDefinitionSchema.safeParse loop was dead code —
validateIntegrationDefinition already validates all check definitions
via the nested Zod schema. Simplified to return valid: true with
summary when top-level validation passes. Also added checkSlugs to
the summary for agent convenience.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…plicate VariableSchema

- Upsert now sends Prisma.DbNull when syncDefinition is removed from
  the definition, instead of undefined (which Prisma skips). This
  prevents stale sync definitions from persisting after removal.

- Deduplicated VariableSchema — was defined 3 times identically.
  Now defined once and reused in CheckDefinitionSchema,
  SyncDefinitionSchema, and DynamicIntegrationDefinitionSchema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e-step-and-sync

feat(integration-platform): add code step and dynamic employee sync
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

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

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Mar 30, 2026 6:18pm
comp-framework-editor Ready Ready Preview, Comment Mar 30, 2026 6:18pm
portal (staging) Ready Ready Preview, Comment Mar 30, 2026 6:18pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 30, 2026

PR Summary

High Risk
High risk because it introduces execution of arbitrary JavaScript via new DSL code steps and adds new dynamic employee sync flows that create/deactivate members and persist detailed logs in the database.

Overview
Enables dynamic integrations to support employee sync by adding a persisted syncDefinition (new DynamicIntegration.syncDefinition JSONB column) and a new sync route (POST /v1/integrations/sync/dynamic/:providerSlug/employees) that interprets the definition and applies changes via the new GenericEmployeeSyncService (create members/users and domain-scoped deactivation with protected-role guards).

Extends the integration DSL with a new code step (async JS executed with access to ctx/scope), plus interpretDeclarativeSync and new SyncDefinition/SyncEmployee schemas; adds extensive interpreter tests and improves DSL execution logging (e.g., emit + forEach summary logs).

Improves observability and agent debugging: check runs now persist execution logs (including error stack info), internal dynamic-integration endpoints expose validation and recent check-run history, the scheduled sync trigger falls back to the dynamic sync endpoint for unknown providers, and the People UI now fetches/render/selects from available-providers to support dynamic sync providers.

Written by Cursor Bugbot for commit 9f50fde. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

tofikwest and others added 2 commits March 30, 2026 12:02
Prisma.DbNull is a runtime value, not a type. Changed from
`import type { Prisma }` to `import { Prisma }` to fix build error:
TS1361: 'Prisma' cannot be used as a value because it was imported
using 'import type'.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: use value import for Prisma (DbNull requires runtime access)
@vercel vercel bot temporarily deployed to staging – portal March 30, 2026 16:05 Inactive
@vercel vercel bot temporarily deployed to staging – app March 30, 2026 16:05 Inactive
@tofikwest tofikwest merged commit b6b20a0 into release Mar 30, 2026
13 of 14 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants