OpenFn / OpenFn/lightning

Approve and merge (close the loop)

Open
#4,862 0 comments 0 reactions 1 assignee View on GitHub

@elias-ba is already working on this.

Since Jun 16, 2026.

branch-protection phase:2-later Sandboxes DevX
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Deferred to the branch-protection phase. For the first release, promotion is just the existing merge (#4929) with no approval step. This issue adds the approval and validation layer on top of the request object (#4861) later.

As a reviewer approving a change (org admin), I want to approve a pending promotion and have it merge into the live workflow, so that the change reaches production through the approval path, the version increments, and the source sandbox is cleaned up automatically.

Part of #4852 (Sandbox DevX epic). Builds on Promote request (#4861).

Outcome

Approving a pending promotion merges the workflow into main, bumps the live version, and archives the sandbox. This closes the round trip.

Acceptance criteria

  • Given a pending promotion, when I Approve and confirm, then the workflow merges into main, the version increments (for example v2), and the workflow is live and read-only.
  • Given the approval completed, then the source sandbox is archived (read-only, trigger disabled) via the existing scheduled deletion.
  • Given the merge, then the version history gains a promotion entry naming the actor and the source sandbox.

Scope

  • Approve action (self-serve with a confirmation for MVP), calling Sandboxes.merge(sandbox, parent, %{selected_workflow_ids: [workflow_id]}).
  • Set the promotion :merged, record a release on the main workflow, and archive the sandbox via schedule_sandbox_deletion/2.
  • Version history shows the promotion entry.

Key surfaces

Lightning.Workflows.Promotions, Sandboxes.merge/4, release recording, and the workflow channel.

Note

A required-reviewer approval policy is a future trajectory. The review object is built so it can be added without rework.

Estimate

5 story points.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.