feat(#5620): support mixed-forge manifests with per-repo client resolution - #5623
Conversation
|
🤖 Finished Review · ✅ Success · Started 1:50 AM UTC · Completed 2:04 AM UTC |
Site previewPreview: https://42fd622b-site.fullsend-ai.workers.dev Commit: |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runReviewFindingsLow
Prior review findings addressed in this revision:
Previous run (2)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous run (3)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous run (4)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous runReviewFindingsMedium
Low
Prior review findings addressed in this revision:
Previous run (5)ReviewFindingsMedium
Low
Prior review findings addressed in this revision:
Previous run (6)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous runReviewFindingsMedium
Low
Labels: PR modifies repos management code (install, status, sync, upgrade, init, uninstall) and forge client abstraction layer Previous run (7)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous run (8)ReviewFindingsMedium
Low
Labels: PR modifies repos management code (install, status, sync, upgrade, init, uninstall) and forge client abstraction layer Previous run (9)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous run (10)ReviewFindingsMedium
Low
Prior review findings addressed in this revision:
Previous run (11)ReviewFindingsMedium
Low
Prior review findings addressed in this revision:
Previous run (12)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous runReviewFindingsMedium
Low
Labels: PR modifies repos management code (install, status, sync, upgrade, init, uninstall) and forge client abstraction layer Previous run (13)ReviewFindingsLow
Prior review findings addressed in this revision:
Previous run (14)ReviewFindingsMedium
Low
Labels: PR modifies repos management code (install, status, sync, upgrade, init, uninstall) and forge client abstraction layer |
2459a59 to
2f4f854
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 2:20 AM UTC · Completed 2:36 AM UTC |
2f4f854 to
9f5ffa2
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 2:40 AM UTC · Completed 2:55 AM UTC |
9f5ffa2 to
c9c184a
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 3:01 AM UTC · Completed 3:17 AM UTC |
Superseded by updated review
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 3:52 AM UTC · Completed 4:09 AM UTC |
17d1ef8 to
fd24afb
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 4:14 AM UTC · Completed 4:34 AM UTC |
…ution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
fd24afb to
b656786
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 11:33 AM UTC · Completed 11:47 AM UTC |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 11:56 AM UTC · Completed 12:09 PM UTC |
There was a problem hiding this comment.
Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:
internal/cli/repos.go(file-level): Line 1617 · [low] fail-open
checkAllForgeScopes skips scope checking for all non-GitHub forges (forgeName != repos.ForgeGitHub). For GitLab-only manifests, no token scope validation occurs before destructive operations. Intentional because GitLab does not support scope introspection, but misscoped GitLab tokens fail later with unclear per-repo errors. See also: [logic-error] finding at this location.
internal/cli/repos_test.go:2044: [low] behavior-change
TestReposDiffCmd_GitLabNoToken_WithRepos asserts require.NoError when a manifest has forge: gitlab, actual repos, and no GITLAB_TOKEN. The diff command exits 0 because per-repo forge client errors are surfaced as warnings rather than fatal errors. While this is the intended design, CI pipelines consuming the exit code would see success even though all repos failed to be examined.
|
🤖 Finished Retro · ✅ Success · Started 12:43 PM UTC · Completed 12:56 PM UTC |
Retro: PR #5623 — Mixed-forge manifest supportOverall assessment: The workflow performed well. The code agent delivered all 12 design steps from issue #5620 in a single 25-file commit (735 additions, 396 deletions) within 28 minutes. The review agent caught 3 genuine medium-severity bugs across 9 review cycles, and the human domain expert (ggallen) drove all fixes via 7 force-pushes over ~11 hours. The PR merged successfully. Timeline
Review agent performanceGenuine bugs caught (3): (1) False positive (1): Cycle 1 flagged Accepted design limitations (recurring): 4–5 low findings (e.g., Evidence for existing issues
Autonomy readiness observationThe review agent demonstrated strong value on this PR: it caught 3 genuine medium bugs (including 2 regressions introduced by the human's own fixes), with only 1 false positive. The human's final approval at 11:54 UTC added no findings beyond what the agent had already surfaced. For this class of change (Go interface refactoring with forge-specific code paths), the review agent performed at or above human review level. This is a single data point and the human was deeply involved as the domain expert, so this should not be over-indexed. Agents repoAgent definitions resolved from |
Summary
Introduces
ForgeClientFactoryinterface with lazy per-forge client creation so mixed-forge manifests (GitHub + GitLab repos in a singlerepos.yaml) route API calls through the correct forge-specific client at runtime. Previously,forgeClientFromManifestcreated a single client fromdefaults.forge, causing GitLab entries to silently route through the GitHub API.Changes
ForgeClientFactoryinterface (internal/repos/forge_config.go):ConfigFor(forgeName) (ForgeConfig, error)returns aForgeConfigwith a liveClient, forge-specific patterns, and workflow pathsforgeClientFactoryimplementation (internal/cli/forge_client.go): lazily creates and caches per-forge clients withsync.Mutexfor concurrent safety; at most 2 clients per command (GitHub + GitLab)ForgeConfig.Clientfield: eachForgeConfignow carries its own API client, eliminating the need to passclientandfcas separate parametersResolvedConfig.ForgeConfigfield: makesResolvedConfigthe single per-repo object with owner, repo, client, and patternsUpgrade,Status,BatchInstall,Diff,Sync,Uninstall,Init,AddToManifest,ExpandGlobsnow acceptForgeClientFactoryinstead offorge.ClientupgradeRepo,checkRepoStatusetc. takeResolvedConfiginstead of 5-9 separate parametersManifest.Validate()rejects manifests where the same owner has entries with different forges (a GitHub org and GitLab group with the same name are different entities)docs/guides/getting-started/repo-management.mdTesting
internal/repos/...tests pass (6.2s, with-race)internal/cli/...tests pass for repos commandsgo build ./...— full project compiles cleanlygo vet ./internal/repos/... ./internal/cli/...— no issuesnewTestClientFactorywrapsFakeClientfor backward-compatible test patternsCloses #5620
Post-script verification
agent/5620-mixed-forge-clients)896bb57d9f55d9aa6567e537fd92022e65e430e1..HEAD)