Skip to content

Add a deterministic Git.Push workflow effect #370

Description

@taras

Story

As a workflow author, I want Git.Push to publish the current named branch as an independently reconciled external effect, so PullRequest never hides or repeats remote mutation.

Contract

Git.Push operates in the contextual Repository or Worktree established by lexical composition. It pushes the current named branch to the configured primary remote and may establish its upstream. It never force-pushes implicitly.

The effect derives stable external identity from the WorkflowRun and expansion. On replay or uncertain completion it observes remote state: a compatible remote commit is adopted, proven absence is performed, and divergence or permanent ambiguity fails. Its local filtered result is recorded through one Workspace transaction, but no transaction is claimed across SQLite and the remote forge.

Acceptance

  • Detached HEAD and an unnamed branch fail before remote mutation.
  • The remote and refspec are explicit in the effect inputs and filtered history.
  • Replaying a completed push performs no remote mutation.
  • Interruption after a successful remote update reconciles the compatible remote SHA.
  • Divergence fails without implicit force, reset, merge, or rebase.
  • A caller must opt into any future force behavior through a separate explicit contract.
  • The result includes the remote, branch, local SHA, observed remote SHA, and reconciliation outcome.
  • PullRequest can require the compatible pushed head rather than performing a hidden push.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions