Repository navigation
fix(#9571): converge only the glob repos the install preflights checked - #9574
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
repos install runs its configuration preflights (adoption, install defaults, proposed safety, effective infrastructure) through one read cache, so each glob org is listed once for all of them (#8501). Converge then expanded the same globs again through the uncached clients, so a repository created in a glob org between the two listings was converged without passing any preflight. Add ConvergeConfig.GlobClients: when set, Converge expands glob entries through that factory instead of its converge clients. repos install passes the preflight read cache, so convergence reuses the org listings the preflights checked. Every other forge read and write still goes through the uncached clients. Explicit entries, globless manifests and repo filters behave as before; the filter is the same one the preflights expanded with. Tests: a Converge unit test for GlobClients set and unset, and a repos install test where a repository appears in the org listing after the preflights list it and is not converged (fails without the fix). Note: pre-commit could not fetch its hook repositories in the sandbox (TLS failure), so the applicable hooks were run directly: gofmt, go vet ./..., whitespace/end-of-file checks, broken-symlink lint and the secret scan passed. The semgrep hook skipped itself because its pinned ruleset could not be downloaded. Six internal/cli tests (TestStartFetchService_*, TestPostScriptEnv_NoSchema*) fail in this sandbox on main as well and are unrelated. Closes #9571 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 1:18 AM UTC · Completed 1:27 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.49 |
|
Risk Assessment: moderate (2/5) DetailsCompact, well-tested bug fix by a bot with clear issue alignment and no protected paths, but touches high-churn convergence code and alters existing glob installation behavior without a feature flag. |
|
Looks good to me Labels: PR changes the repos install convergence flow. Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOltdfQ== --> Looks good to me Labels: PR changes the repos install convergence flow. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
repos installruns its configuration preflights through one read cache, so each glob org is listed once for all of them (#8501).repos.Convergethen listed the same globs again through the uncached clients. A repository created in a glob org between the two listings was converged without passing any preflight. Convergence now expands globs through the preflight read cache, so it converges only the repositories the preflights checked.Related Issue
Issue #9571. Once #9477 lands, its trace signing key planning will use the same repository set.
Changes
internal/repos/converge.go: newConvergeConfig.GlobClientsfield. When it is set,Convergeexpands glob entries through that factory instead of its converge clients. All other forge reads and writes still go through the converge clients.internal/cli/repos.go:runReposInstallpassespreflightClients(the read cache shared by the preflights) asGlobClients. Updated the comment on the cache's lifetime.internal/repos/preflight_read_cache.go: updated the doc comment. Convergence only uses the cache for org listings, which convergence never writes.RepoFilterruns behave as before: the preflights and convergence expand with the same filter. A repository removed between the listings is still in the preflighted set; convergence reports it as a failed repository when probing it fails.Testing
TestConverge_GlobClientsExpandGlobs:GlobClientsset (only its listing is converged) and unset (the converge clients expand the globs, as before).TestRunReposInstall_GlobRepoCreatedAfterPreflightsIsNotConverged: the fake org listing gainsacme/webafter the preflights have listedacme/*. Install convergesacme/apiand leavesacme/webuntouched. This test fails without the fix.go test ./internal/repos/passes.go test ./internal/cli/passes except six tests (TestStartFetchService_*,TestPostScriptEnv_NoSchema*), which also fail on unmodifiedmainin the agent sandbox.make lint:pre-commitcould not fetch its hook repositories in the sandbox, so I ran the applicable hooks directly. gofmt,go vet ./..., the whitespace and end-of-file checks, the broken-symlink lint and the secret scan passed. The semgrep hook skipped itself because it could not download its pinned ruleset.Checklist
!for breaking changes)🤖 Generated with Claude Code
Closes #9571
Post-script verification
agent/9571-converge-preflighted-globs)4c8159050583a928a261d720f32ce8b53608922e..HEAD)