Skip to content

refactor(changeprovider): make the git provider pure logic over a contract - #611

Open
behinddwalls wants to merge 1 commit into
preetam/git-exec-env-composerfrom
preetam/changeprovider-pure
Open

refactor(changeprovider): make the git provider pure logic over a contract#611
behinddwalls wants to merge 1 commit into
preetam/git-exec-env-composerfrom
preetam/changeprovider-pure

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Move the git transport plumbing — the bare local copy, fetch, commit resolution, merge base, the git command environment — and the Auth contract out of the change provider extension into platform/git/repo, built on platform/git/exec. The provider now depends on a small Repository interface it defines and holds no os/exec and no credential handling: it parses the change URI, picks the stack baseline, reads the diff and author, and shapes the result, nothing more.

Auth moves with the copy it configures, resolving the review point that authentication did not belong in the change provider. The wiring's tokenAuth now implements gitrepo.Auth and SetConfig is gitrepo.SetConfig. Repository-plumbing tests move to platform/git/repo; the provider's behavior tests stay and drive a real gitrepo.Repo through the interface.

Test Plan

//platform/git/..., //submitqueue/extension/changeprovider/git/..., //service/submitqueue/orchestrator/server/... green (incl. the three-step stack-baseline test); provider.go verified free of os/exec.

Stack

  1. refactor(git): relocate platform/gitexec under platform/git #609
  2. feat(git/exec): a shared environment composer for git commands #610
  3. @ refactor(changeprovider): make the git provider pure logic over a contract #611
  4. refactor(merger): build the git command env from the shared composer #612
  5. refactor(runway): compose the checkout git env from gitexec #613

…tract

Move the git transport plumbing — the bare local copy, fetch, commit resolution, merge base, the git command environment — and the Auth contract out of the change provider extension into platform/git/repo, built on platform/git/exec. The provider now depends on a small Repository interface it defines and holds no os/exec and no credential handling: it parses the change URI, picks the stack baseline, reads the diff and author, and shapes the result, nothing more.

Auth moves with the copy it configures, resolving the review point that authentication did not belong in the change provider. The wiring's tokenAuth now implements gitrepo.Auth and SetConfig is gitrepo.SetConfig. Repository-plumbing tests move to platform/git/repo; the provider's behavior tests stay and drive a real gitrepo.Repo through the interface.
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