Skip to content

feat: add registry broker delegation client - #8

Merged
kantorcodes merged 3 commits into
mainfrom
feat/sdk-delegation-client
Mar 29, 2026
Merged

kantorcodes merged 3 commits into
mainfrom
feat/sdk-delegation-client

Conversation

@kantorcodes

Copy link
Copy Markdown
Member

Summary

  • add typed Registry Broker delegation request/response support
  • add coverage for the new /delegate endpoint parsing
  • add a runnable delegation example and document it in the examples index

Verification

  • go test ./pkg/registrybroker -run 'TestDelegate|TestCovSearchEndpoints|TestCovBuildSearchQuery'
  • go test ./examples/registry-broker-delegation
  • go run ./examples/registry-broker-delegation

Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the Delegate method to the RegistryBrokerClient, enabling users to request delegation plans for specific tasks. It includes a new runnable example in examples/registry-broker-delegation, comprehensive type definitions for delegation requests and responses, and associated unit tests. Review feedback suggests standardizing CLI error handling in the example by using stderr, expanding test coverage for environment variable utilities, and implementing mechanisms to capture unknown JSON fields for better forward compatibility.

Comment thread examples/registry-broker-delegation/main.go
Comment thread examples/registry-broker-delegation/main_test.go
Comment thread pkg/registrybroker/types.go
@kilo-code-bot

kilo-code-bot Bot commented Mar 29, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental Changes (commit 743ef84)

Lint-only fixes since last review:

  • Range loop: pointer access instead of value copy in main.go
  • Parameter shorthand in getEnvOrDefault
  • Extracted repeated string literal to const preservedValue in test
  • Switched to fmt.Fprintf for test HTTP response writing
  • return nil, nil → return JSONObject{}, nil for nil-safety in extractUnknownFields

All previous review findings remain resolved.

Files Reviewed (3 changed files)
  • examples/registry-broker-delegation/main.go — lint fix (range loop + param shorthand)
  • pkg/registrybroker/delegation_plan_test.go — lint fix (const extraction + fmt.Fprintf)
  • pkg/registrybroker/types.go — lint fix (JSONObject{} instead of nil)

Reviewed by mimo-v2-pro-20260318 · 87,873 tokens

Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
@kantorcodes
kantorcodes merged commit eaad16b into main Mar 29, 2026
13 checks passed
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