Skip to content

fix(#9571): converge only the glob repos the install preflights checked - #9574

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/9571-converge-preflighted-globs
Open

fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/9571-converge-preflighted-globs

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

repos install runs its configuration preflights through one read cache, so each glob org is listed once for all of them (#8501). repos.Converge then 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: new ConvergeConfig.GlobClients field. When it is set, Converge expands 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: runReposInstall passes preflightClients (the read cache shared by the preflights) as GlobClients. 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.
  • Explicit entries, globless manifests and RepoFilter runs 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

  • Tests added/updated for new or modified logic
    • TestConverge_GlobClientsExpandGlobs: GlobClients set (only its listing is converged) and unset (the converge clients expand the globs, as before).
    • TestRunReposInstall_GlobRepoCreatedAfterPreflightsIsNotConverged: the fake org listing gains acme/web after the preflights have listed acme/*. Install converges acme/api and leaves acme/web untouched. 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 unmodified main in the agent sandbox.
  • make lint: pre-commit could 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

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — not applicable: autonomous agent commit
  • I wrote this contribution myself and can explain all changes in it — written by the code agent

🤖 Generated with Claude Code


Closes #9571

Post-script verification

  • Branch is not main/master (agent/9571-converge-preflighted-globs)
  • Secret scan passed (gitleaks — 4c8159050583a928a261d720f32ce8b53608922e..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

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>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:18 AM UTC · Completed 1:27 AM UTC

Commit: 15ef22e · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.49

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 17, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Compact, 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.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge component/install CLI install and app setup labels Nov 17, 2026
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch was previously deployed

1 inactive deployment
dev — 15ef22e4 Deployed Nov 17, 2026 by fullsend-ai-coder[bot] via behaviour #20444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/install CLI install and app setup ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repos install: convergence lists glob orgs again after the preflights

1 participant