Skip to content

feat(plugins): add image resolver registry - #218

Merged
Quick104 merged 1 commit into
mainfrom
codex/image-resolver-capability
Jun 25, 2026
Merged

Quick104 merged 1 commit into
mainfrom
codex/image-resolver-capability

Conversation

@Quick104

@Quick104 Quick104 commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Part of #135.

Summary

  • rebuild plugin image resolver sources atomically from enabled plugin capabilities
  • prefer explicit image_resolver.v1 sources while preserving legacy metadata-provider image fallback
  • make resolver choice deterministic by kind, priority, installation ID, and capability ID
  • skip gRPC Unimplemented, fall through for partial results, and avoid caching empty failures

Verification

  • GOWORK=off go test ./internal/metadata ./internal/pluginhost ./internal/plugins
  • GOWORK=off go test ./internal/api/handlers -run 'Plugin|Install|Upload|Update|Delete|Capability|Image'\n- make verify-local-paths\n\n## AI use\nImplemented with Codex.

Summary by CodeRabbit

  • New Features

    • Plugin image resolution now supports dynamically reloading available resolver sources after plugin changes.
    • Added support for multiple resolver sources per plugin, with priority-based selection and fallback handling.
    • Introduced image-resolver access through plugin capabilities.
  • Bug Fixes

    • Improved resolution behavior when a source is unavailable, returns partial results, or fails temporarily.
    • Prevents empty failures from being cached, helping recovery work correctly.
  • Chores

    • Updated the plugin SDK dependency.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ce4934b-1ee4-462d-bd89-d289b840ae5a

📥 Commits

Reviewing files that changed from the base of the PR and between 5eb7a60 and 7567863.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (9)
  • cmd/silo/main.go
  • go.mod
  • internal/api/handlers/plugins.go
  • internal/metadata/image_resolver.go
  • internal/metadata/image_resolver_test.go
  • internal/pluginhost/client.go
  • internal/pluginhost/client_test.go
  • internal/plugins/service.go
  • internal/plugins/service_hot_reload_test.go

📝 Walkthrough

Walkthrough

The PR adds dynamic plugin image resolver reloading, new plugin image resolver client plumbing, expanded resolver source ordering and fallback handling, and removes direct image-resolver syncing from plugin handler flows.

Changes

Plugin image resolver reload

Layer / File(s) Summary
Image resolver client plumbing
go.mod, internal/pluginhost/client.go, internal/pluginhost/client_test.go, internal/plugins/service.go, internal/plugins/service_hot_reload_test.go
pluginhost.Client gains ImageResolver, ImageResolverClient wraps the new SDK client, plugins.Service forwards capability-specific clients, and tests cover capability gating and hot-reload fakes.
Resolver source model
internal/metadata/image_resolver.go
PluginImageResolver now stores ordered source registrations per scheme, validates schemes, accepts bulk replacement, and sorts sources by kind, priority, installation ID, and capability ID.
Batch fallback resolution
internal/metadata/image_resolver.go, internal/metadata/image_resolver_test.go
Batch resolution snapshots the ordered source slice, skips codes.Unimplemented, returns empty results when no sources exist, and tests cover explicit-versus-legacy precedence, partial batch fallthrough, and empty-result caching.
Plugin reload hook and source reload
cmd/silo/main.go
After plugin auto-update, main.go installs a lifecycle hook, performs an initial reload, lists enabled installations and capabilities, parses resolver metadata, and replaces image resolver sources.
Handler sync removal
internal/api/handlers/plugins.go
Plugin installation create, upload, enable, and apply-update paths stop syncing image resolvers directly and now only sync metadata providers; syncImageResolvers is removed.

Sequence Diagram(s)

sequenceDiagram
  participant mainGo as cmd/silo/main.go
  participant reloadPluginImageResolvers
  participant capabilityStore as capability store interface
  participant pluginImageResolver as metadata.PluginImageResolver

  mainGo->>reloadPluginImageResolvers: run lifecycle hook and initial reload
  reloadPluginImageResolvers->>capabilityStore: list enabled installations and capabilities
  reloadPluginImageResolvers->>pluginImageResolver: ReplaceSources(registrations)
  pluginImageResolver-->>reloadPluginImageResolvers: source set updated
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/image-resolver-capability

Comment @coderabbitai help to get the list of available commands.

@Quick104
Quick104 merged commit e90c87e into main Jun 25, 2026
1 check was pending
@Quick104
Quick104 deleted the codex/image-resolver-capability branch June 25, 2026 19:01
Quick104 added a commit to RXWatcher/silo-server that referenced this pull request Jul 10, 2026
…ver-capability

feat(plugins): add image resolver registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant