refactor(outbox): nine-method Provider port and LiveProvider composite (476.A)#502
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Provideris 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.LiveProviderembeds the port plusGetPR(ten methods) and is now the boundary forgateio,reviewrun, andthreadrespond— one composite, not three structurally identical copies.Proof obligations from the design record
gitprovider.Fakeand a minimal fake in outbox tests, the GitHub client in its own tests, and app'sruntimeProvider.gitprovider.Fakeuntouched.Verification
Zero tests deleted.
go build,go vet, fullgo test ./...green unsandboxed (60 packages), repo-widegolangci-lint0 issues, architecture harness pass. +92/−10 across 7 files.The full #476 arc
internal/llmadaptersoutbox.Provider+LiveProvidercomposite