Skip to content

feat: add registry CLI search and add - #493

Open
Shayne Boyer (spboyer) wants to merge 1 commit into
mainfrom
spboyer-squad-17-registry-cli-search-add
Open

feat: add registry CLI search and add#493
Shayne Boyer (spboyer) wants to merge 1 commit into
mainfrom
spboyer-squad-17-registry-cli-search-add

Conversation

@spboyer

Copy link
Copy Markdown
Member

Summary

  • Add waza registry with search and add subcommands.
  • Add project registries: config defaults/schema for registry index sources.
  • Append minimal ref: grader entries to eval.yaml and scaffold waza.lock entries pending resolver integration.
  • Document registry commands in README, docs guide, and site CLI reference.

Notes

Validation

  • go test ./...
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.10.1 run

Not run

  • cd site && npm run build — blocked because npm ci could not fetch playwright-core from the configured package proxy/public registry in this environment (E404 then ENOTCONN).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ce4d4f5a-0d76-488c-abe3-40e386c431ac
Copilot AI review requested due to automatic review settings July 28, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces an initial (“Phase 1”) registry workflow to help users discover shared artifacts and append remote grader preset references into an eval, while scaffolding configuration/schema support for registry index sources.

Changes:

  • Add waza registry command group with search and add subcommands (stubbed registry/resolution logic pending #15).
  • Add project config + JSON schema support for registries: sources (including defaults) and extend schema parity/config tests.
  • Document the new commands across README, GUIDE, and the site CLI reference.
Show a summary per file
File Description
site/src/content/docs/reference/cli.mdx Adds CLI reference docs for waza registry, including flags and examples.
schemas/config.schema.json Adds registries config schema with default public source.
README.md Documents registry commands and flags in the main README.
internal/projectconfig/schema_parity_test.go Ensures schema defaults match Go defaults for registries.
internal/projectconfig/config.go Adds Registries to project config defaults/merge/validation.
internal/projectconfig/config_test.go Adds coverage for registries defaults and load behavior.
internal/config/registry.go Introduces RegistrySource and default registry sources.
docs/GUIDE.md Adds a guide section explaining registry presets and usage.
cmd/waza/root.go Wires the new registry command into the CLI root.
cmd/waza/cmd_registry.go Defines the waza registry command and help text.
cmd/waza/cmd_registry_test.go Adds tests for command wiring, search output, add behavior, and program-grader confirmation.
cmd/waza/cmd_registry_search.go Implements registry search (currently with stubbed catalog).
cmd/waza/cmd_registry_add.go Implements registry add to update eval YAML + scaffold waza.lock.

Review details

  • Files reviewed: 13/13 changed files
  • Comments generated: 4
  • Review effort level: Low

Comment on lines +148 to +153
tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0)
fmt.Fprintln(tw, "REF\tKIND\tDESCRIPTION\tSTARS") //nolint:errcheck
for _, result := range results {
fmt.Fprintf(tw, "%s\t%s\t%s\t%d\n", result.Ref, result.Kind, result.Description, result.Stars) //nolint:errcheck
}
tw.Flush() //nolint:errcheck
return fmt.Errorf("%s field modules must be a list", lockPath)
}

modules.Content = append(modules.Content, registryLockEntry(resolved, trusted))
Comment on lines +151 to +156
key, value, ok := strings.Cut(raw, "=")
if !ok || strings.TrimSpace(key) == "" {
return nil, fmt.Errorf("invalid --set %q: expected key=value", raw)
}
setNestedValue(entry, strings.Split(strings.TrimSpace(key), "."), scalarNode(strings.TrimSpace(value)))
}
Comment on lines +390 to +397
for i, registry := range cfg.Registries {
if strings.TrimSpace(registry.Name) == "" {
return fmt.Errorf("registries[%d].name must not be empty", i)
}
if strings.TrimSpace(registry.URL) == "" {
return fmt.Errorf("registries[%d].url must not be empty", i)
}
}
@spboyer

Copy link
Copy Markdown
Member Author

High-signal review notes before merge:

  1. currently writes -only grader entries that fail today’s eval schema/runtime unless support is merged first ( still requires + ). We should either gate this command behind landing, or land schema/runtime support in the same integration sequence.

  2. writes first and second. If lock write fails, repo is left partially mutated. Please make this transactional (stage both then commit both, or rollback eval on lock failure).

  3. still returns a stub catalog (understood for Phase 1 scaffolding). Please keep the TODO explicit in help/output so users don’t assume live index data.

I’m keeping this as the canonical #17 branch once (1) and (2) are addressed in-branch or via explicit dependency gating.

@spboyer

Copy link
Copy Markdown
Member Author

Correction (formatting):

High-signal review notes before merge:

  1. registry add currently writes ref-only grader entries that fail today’s eval schema/runtime unless ref support is merged first (schemas/eval.schema.json still requires type + name). We should either gate this command behind feat: Go-module-style grader/eval references #15 landing, or land schema/runtime support in the same integration sequence.
  2. registry add writes eval.yaml first and waza.lock second. If lock write fails, repo is left partially mutated. Please make this transactional (stage both then commit both, or rollback eval on lock failure).
  3. registry search still returns a stub catalog (understood for Phase 1 scaffolding). Please keep the TODO explicit in help/output so users don’t assume live index data.

Keeping this as the canonical #17 branch once (1) and (2) are addressed.

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.

feat: Composable eval construction from registry graders

3 participants