Skip to content

refactor(outbox): nine-method Provider port and LiveProvider composite (476.A)#502

Merged
rianjs merged 1 commit into
mainfrom
refactor/476-provider-ports
Jul 11, 2026
Merged

refactor(outbox): nine-method Provider port and LiveProvider composite (476.A)#502
rianjs merged 1 commit into
mainfrom
refactor/476-provider-ports

Conversation

@rianjs

@rianjs rianjs commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Closes #476 — steps 1+2 (Track A) of the approved recommendation from the design record. Track B (LLM adapter extraction) landed as #499, so this PR completes the issue.

Step 1 — narrow outbox

outbox.Provider is a consumer-owned port declaring exactly the nine methods outbox uses: ListInlineThreads, ListReviews, ListIssueComments, PostInlineComment, ReplyToThread, ResolveThread, PostIssueComment, SubmitReview, Capabilities. No atomic CommentWriter/ReviewReader-style capability interfaces, per the design record.

Step 2 — narrow the live orchestration boundary

outbox.LiveProvider embeds the port plus GetPR (ten methods) and is now the boundary for gateio, reviewrun, and threadrespond — one composite, not three structurally identical copies.

Proof obligations from the design record

  • Compile-time assertions: gitprovider.Fake and a minimal fake in outbox tests, the GitHub client in its own tests, and app's runtimeProvider.
  • A minimal port-only fake drives a real rollup post, proving the unrelated identity/diff/file methods are unnecessary to outbox.
  • The existing credential-routing test passes unchanged: reads use the repository provider; capabilities and writes use the posting provider.
  • Track A stops here — no per-method capability interfaces, gitprovider.Fake untouched.

Verification

Zero tests deleted. go build, go vet, full go test ./... green unsandboxed (60 packages), repo-wide golangci-lint 0 issues, architecture harness pass. +92/−10 across 7 files.

The full #476 arc

…omposite (476.A)

outbox.Provider declares exactly the nine provider methods outbox uses;
outbox.LiveProvider embeds it plus GetPR and becomes the orchestration
boundary for gateio, reviewrun, and threadrespond. Compile-time
assertions cover gitprovider.Fake, the GitHub client, and app's
runtimeProvider; a minimal port-only fake proves the unrelated identity/
diff/file methods are unnecessary. Credential routing is unchanged:
reads stay on the repository provider, capabilities and writes on the
posting provider.
@rianjs rianjs merged commit 3784364 into main Jul 11, 2026
10 checks passed
@rianjs rianjs deleted the refactor/476-provider-ports branch July 11, 2026 13:14
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.

Narrow interface seams: GitProvider use-case ports and llm contract/adapter split

1 participant