Uh oh!
There was an error while loading. Please reload this page.
feat(agents): skip archived repos in drift tooling - #465
Merged
antoinetoussaint-byte merged 2 commits intoAug 23, 2026
Conversation
Archived repos are frozen — they can never publish another tag or release, so their pins can't advance. The drift tooling had no archived awareness and would still report them as "N versions behind" (agent list/versions, codefly ci) and file chore issues against them (status release --create-issues) that nobody can act on. - Add pkg/gh: one shared GitHub client + token path + Archived() helper (fails safe: any lookup error is treated as not-archived). - cmd/agents/versions.go: collectInventory short-circuits archived repos to 0-behind, reporting only pinned + local-cache versions. Routed via a repoArchived seam matching the existing fetch seams. - cmd/status/release.go: gate chore-issue creation on the clone's origin remote being non-archived (org-agnostic; zero extra API calls on display). - Tests for the archived drift guard and GitHub remote URL parsing; existing drift tests made hermetic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reconcile with the go-github migration (#457/#458) that landed pkg/gh first: drop the duplicated Token/Client from gh.go and keep only the Archived helper on top of the shared gh.NewClient; reuse release.go's agentRepository/parseGitHubRemote for the archived-issue gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Summary
Archived GitHub repos are frozen — they can never publish another tag or release, so their pins can't advance. Our fleet drift tooling had no archived awareness and would:
agent list/agent versionsandcodefly cidrift, andchore:issues against them viastatus release --create-issues— issues nobody can act on.This came up because
service-minioandservice-s3are now archived (see #452). This change makes the tooling ignore any archived repo automatically, now and for future archives — no hardcoded skip-list.Changes
pkg/gh— a single shared GitHub client + token-resolution path +Archived(ctx, owner, repo)helper. This is the shared client package Migrate agent-release publishing fromghCLI to go-github API #457/Migrate GitOps PR + chore-issue flows fromghCLI to go-github API #458 call for; seeded here so those migrations can build on it.Archivedfails safe: any lookup error (missing repo, rate limit, no auth) returnsfalse, so we only ever skip on a confirmed archived flag and never silently hide a live repo.cmd/agents/versions.go—collectInventoryshort-circuits archived repos: it reports only pinned + locally-cached versions and no remote sources, so drift computes 0 behind. Routed through arepoArchivedseam matching the existingfetchReleases/fetchTagstest seams.cmd/status/release.go— gates chore-issue creation on the clone'soriginremote being non-archived (org-agnostic; zero extra API calls on plain display, only on the--create-issuespath). Prints⏭ Skipping archived repo ….Tests
TestArchivedRepoReportsNoDrift— archived repo ⇒ 0 behind, and asserts the remote source list is never even fetched.TestParseGitHubRemote— https / ssh /.git/ non-GitHub / garbage remotes.repoArchivedoff the network).go build ./...,go vet, and the touched package tests are green.Cost / tradeoff
One
Repositories.Getper distinct agent on the drift path (deduped per run) and per would-be-issue on the status path. Offline / unauthenticated degrades to today's behavior.Related
ghCLI to go-github API #457 / Migrate GitOps PR + chore-issue flows fromghCLI to go-github API #458 —pkg/ghis the start of the shared GitHub-client consolidation those issues track (migrating the remainingghCLI shell-outs to go-github is still their scope).🤖 Generated with Claude Code