Conversation
Wire pinnedImageTag through the full provision flow so pinned users get their specific image version instead of :latest.
Code Review SummaryStatus: No New Issues Found | Recommendation: Merge OverviewThis PR adds version pinning support to KiloClaw, allowing admins to pin specific users to specific image tags during provision. The implementation is thorough and well-structured:
All previously identified issues (35 inline comments) have been addressed in subsequent commits:
Other Observations (not in diff)
Files Reviewed (14 files)
|
src/app/admin/components/KiloclawVersions/KiloclawVersionsPage.tsx
Outdated
Show resolved
Hide resolved
| } else { | ||
| // Pinned tag not found in KV or Postgres — use the tag directly but metadata is unknown. | ||
| // Clear version metadata to avoid stale values from a previous provision. | ||
| console.warn( |
There was a problem hiding this comment.
What does this correspond to? As in, where did this tag come from if we don't know about it?
There was a problem hiding this comment.
The tag comes from the admin panel — an admin sets a version pin for a user via the Pins tab, which stores the image tag in the kiloclaw_version_pins Postgres table. When that user's instance is provisioned, the cloud app reads their pin and passes pinnedImageTag to the worker.
The tag might not be found in KV or the catalog if:
- The catalog was cleared/rebuilt and the tag wasn't re-synced
- The image was pushed directly to the Fly registry without going through
registerVersionIfNeeded()(e.g. a manualdocker push) - Race condition during first deploy of a new version
In all these cases, the tag is still valid in the Fly registry — we just don't have metadata (version, variant, digest) for it. Provision proceeds with the raw tag and Fly resolves it. The warn log makes this visible for investigation.
… so it's clearly visible in logs.
feat: KiloClaw Phase 2 — provision pin support and admin UI
Wire pinnedImageTag through the full provision flow so pinned users get their specific image version instead of :latest.
Provision flow:
Admin UI:
Safety:
Dev tooling: