Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implement registerHumaAPI on Server to register all 12 endpoints with Huma, and humaXxx handler methods that replicate the exact behavior of the old handleXxx functions using typed input/output structs from huma_types.go. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Match the old handler's HTTP 201 Created response for POST /api/comment, which creates a new resource. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Huma v2 does not support pointer types for query parameters. Changed ListJobsInput, GetReviewInput, and ListCommentsInput to use value types with sentinel defaults (-1 or 0 for "not provided"). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete 12 old HTTP handler functions and 5 request/response types from server.go that are now served by Huma-registered endpoints. Move shared types (CancelJobRequest, RerunJobRequest, etc.) to huma_types.go. Update all test files to route through the mux instead of calling handlers directly, and adjust expected status codes where Huma validation differs (422 vs 400 for type errors). Fix ListBranchesInput Repo field to use explode tag for proper repeated query parameter parsing (?repo=a&repo=b). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The old handleJobOutput streaming mode (stream=1) was not used by the TUI or CLI -- they use /api/stream/events and /api/job/log instead. Remove the dead Stream field from the Huma input type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Enhance TestHumaOpenAPISpec to validate that each path has the expected HTTP method (GET or POST), not just that the path exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use -1 defaults for ID fields (id, job_id, commit_id) so explicit zero values trigger lookups matching legacy behavior. Use a distinct sentinel for limit so explicit limit=-1 is treated as unlimited. Make Stats a pointer with omitempty so single-job responses omit it. Move /api/job/output back to HandleFunc to preserve stream=1 NDJSON contract — Huma's typed response model cannot express the streaming mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Collaborator
Author
|
"The finding is invalid. query:"repo,explode" is the correct Huma syntax for repeated query parameters per https://huma.rocks/features/request-inputs/, and the endpoint is tested." |
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.
Summary
map[string]anyresponses with structured Go types that generate an OpenAPI spec automatically.HandleFuncto Huma endpoints with typed inputs/outputs, pointer-based optional query params, and proper HTTP status codes. Remove old handler functions.beforeparameter) to the ListJobs endpoint for efficient backward paging through large result sets.🤖 Generated with Claude Code