Add codefly agent versions + agent list for pin resolvability (#104) - #105
Merged
AntoineToussaint merged 3 commits intoJul 23, 2026
Conversation
Surface, per agent, every known version and whether each is actually usable — not just tagged. `codefly agent versions <publisher/name>` unions git tags, GitHub release assets (for the CI os/arch), OCI manifests, the workspace pin, and the local cache into one table, and reports latest-tag vs latest-resolvable so the module-saas-starter#3 gap (a tag with no downloadable artifact) is obvious. `codefly agent list` gives the workspace-wide "are all my pins publishable?" view. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
💳 Subscription Requiredcodefly-dev has used all free reviews this month. |
🤖 CodeAnt AI — Review Status
Updated in place by CodeAnt AI · last 5 reviews |
Comment on lines
+74
to
+83
| func (inv inventory) versionResolvable(version string) bool { | ||
| if version == "latest" { | ||
| return inv.LatestResolvable != "" | ||
| } | ||
| for _, entry := range inv.Versions { | ||
| if entry.Version == version { | ||
| return entry.Sources.resolvable() | ||
| } | ||
| } | ||
| return false |
There was a problem hiding this comment.
Suggestion: versionResolvable compares the pinned version string verbatim against normalized inventory versions, so pins written as vX.Y.Z are incorrectly reported as unresolvable even when the same version exists as X.Y.Z. Normalize non-latest input (trim v and semver-normalize) before matching, so resolvability checks are consistent with buildInventory. [logic error]
Severity Level: Major ⚠️
- ⚠️ `agent versions` shows resolvable v-prefixed pins as unresolvable.
- ⚠️ `agent list` misreports pinned resolvability status.
- ⚠️ Workspace publishability diagnostics become misleading for operators.Steps of Reproduction ✅
1. Configure a workspace service that pins an agent version as `v0.0.74`, so
`service.Agent.Version` is `v0.0.74` when loaded via `workspace.LoadServices` in
`pinnedVersions()` at `cmd/agents/versions.go:335-349`.
2. Run `codefly agent versions <publisher/name>` for that agent; `VersionsCmd.RunE` at
`cmd/agents/versions.go:92-111` calls `collectInventory(ctx, agent, pinnedVersions(ctx,
agent))`, passing the raw pinned version string `v0.0.74`.
3. Inside `buildInventory()` at `cmd/agents/versions.go:170-245`, each source version
(including the pinned `v0.0.74`) is normalized via
`semver.Parse(strings.TrimPrefix(version, "v"))`, and the canonical value (e.g., `0.0.74`)
is stored in `entry.Version` and `inv.Versions`, while `inv.Pinned` retains the original
`v0.0.74` string.
4. `renderInventory()` at `cmd/agents/versions.go:486-516` prints each pin using
`fmt.Printf("pinned -> %s (resolvable: %s)\n", pin, yesNo(inv.versionResolvable(pin)))` at
line 514; `versionResolvable()` at lines 74-83 compares the raw `pin` (`v0.0.74`) to
normalized `entry.Version` (`0.0.74`) and never matches, causing
`entry.Sources.resolvable()` to be ignored and the pin to be reported as `resolvable: no`
even when a GitHub release asset or OCI manifest exists for that version.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** cmd/agents/versions.go
**Line:** 74:83
**Comment:**
*Logic Error: `versionResolvable` compares the pinned version string verbatim against normalized inventory versions, so pins written as `vX.Y.Z` are incorrectly reported as unresolvable even when the same version exists as `X.Y.Z`. Normalize non-`latest` input (trim `v` and semver-normalize) before matching, so resolvability checks are consistent with `buildInventory`.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix…se marks - List OCI registry tags via the distribution-spec tags/list endpoint so a version published only to OCI still surfaces (was invisible when it wasn't also tagged/released/cached). - `agent versions` pins the spec to :latest before parsing so the core "no version specified" warning no longer fires on the bare form. - `agent list` skips a service that fails to load with a warning instead of aborting the whole publishability overview. - Warn on the latest tag only when that tag is itself unresolvable, not on any string difference from latest-resolvable. - Absent tag/pinned/cache cells render "-" (n/a) instead of ✗ (error); nil version list marshals to [] not null. - Cross-check test pins githubSource to manager.DownloadURL as the single source of truth for the owner/repo mapping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
💳 Subscription Requiredcodefly-dev has used all free reviews this month. |
The column previously showed ✗ for a version whose release ships assets only for the host arch (not linux_amd64), which reads as "no artifact" while local-cache shows ✓ for the same version. Now the release's actual platform set is captured and rendered: "✓ <platforms>" when the CI asset is present, "✗ (<platforms>)" when only non-CI assets exist, plain "✗" when the release has no downloadable asset. Resolvability is unchanged — still the CI-platform asset (or OCI). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
💳 Subscription Requiredcodefly-dev has used all free reviews this month. |
AntoineToussaint
deleted the
issue-104-agent-command-to-list-agent-versions-resolvability-latest
branch
July 23, 2026 16:48
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.
User description
Closes #104.
Summary
codefly agent versions <publisher/name>: one table unioning git tags, GitHub release assets (for the CI os/arch), OCI manifests, the workspace pin, and the local cache — plus alatest tagvslatest resolvableline that makes the module-saas-starter#3 gap explicit (a newer tag with no published artifact).codefly agent list: the workspace-wide "are all my pins publishable?" view, one row per distinct pinned agent with its pinned/resolvable/latest columns. The interactive counterpart of the ci: pre-flight validation that pinned agent versions are downloadable #101 pre-flight gate.--jsonfor scripting; GitHub reads useGITHUB_TOKEN/GH_TOKENwhen present so the many-requestlistpath doesn't hit the unauthenticated rate limit.Notes
linux_amd64, or an OCI manifest whenAGENT_REGISTRYis set). A tag alone is not resolvable.Test plan
go build ./...go vet ./cmd/...go test ./cmd/agents/— new unit tests cover source-union flagging, latest-tag-beats-latest-resolvable, OCI-driven resolvability, non-semver tag skipping, local-cache scanning, workspace summarization (with inventory caching), and the auth transportcodefly agent versions codefly.dev/redisand--helpfor both commands; verified graceful degradation on GitHub rate-limit🤖 Generated with Claude Code
CodeAnt-AI Description
Show which agent versions exist and which can actually be used
What Changed
codefly agent versions <publisher/name>to list all known versions of one agent, with clear marks for tags, downloadable releases, OCI availability, the current workspace pin, and the local cachecodefly agent listto show every agent pinned in the workspace, whether the pinned version is usable, and which modules use itGITHUB_TOKENorGH_TOKENwhen available, reducing failures when checking many agentsImpact
✅ Faster pin checks✅ Clearer version mismatch warnings✅ Fewer rate-limit failures when listing many agents🔄 Retrigger CodeAnt AI Review
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.