Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryFixed validation schema mismatch in the copilot training API endpoint. The previous schema validated operations with fields ( The corrected schema now properly validates:
This aligns with the Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client as Training Modal
participant API as /api/copilot/training
participant Zod as Schema Validator
participant Indexer as Agent Indexer
Client->>API: POST training data
Note over Client,API: { title, prompt, input, output, operations }
API->>Zod: Validate request body
Note over Zod: TrainingDataSchema checks:<br/>- operations array<br/>- operation_type (string)<br/>- block_id (string)<br/>- params (optional)
alt Invalid Schema
Zod-->>API: Validation error
API-->>Client: 400 Bad Request
else Valid Schema
Zod-->>API: Validated data
API->>Indexer: POST /operations/add
Note over API,Indexer: Forwarded with x-api-key header
alt Indexer Success
Indexer-->>API: 200 OK
API-->>Client: Success response
else Indexer Error
Indexer-->>API: Error status
API-->>Client: Forward error status
end
end
|
waleedlatif1
pushed a commit
that referenced
this pull request
Nov 10, 2025
waleedlatif1
pushed a commit
that referenced
this pull request
Nov 12, 2025
waleedlatif1
pushed a commit
that referenced
this pull request
Nov 12, 2025
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
Fix validation schmea
Type of Change
Testing
How has this been tested? What should reviewers focus on?
Checklist