Skip to content

Regenerate openapi client #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

juho-y
Copy link
Contributor

@juho-y juho-y commented Jun 12, 2025

Adds new fields to execution log details and execution log list

Summary by CodeRabbit

  • New Features

    • Introduced an endpoint to invite users via email to view a specific judge, supporting up to 10 email addresses per request.
  • Improvements

    • Enhanced execution log APIs with more detailed tracking, including new fields for executed item name, version, and type.
    • Expanded execution type options for filtering logs.
    • Added the ability to filter execution logs by executed item ID.
  • Removals

    • Removed some nested objects and unused fields from execution log responses.

Adds new fields to execution log details and execution log list
Copy link

coderabbitai bot commented Jun 12, 2025

Walkthrough

The OpenAPI specification was updated to refine execution log tracking and introduce a new judge invitation endpoint. Enhancements include new and modified schemas for execution logs, expanded execution type values, a new filter parameter, and a dedicated endpoint for inviting users to judges via email, with corresponding schema definitions.

Changes

File(s) Change Summary
openapi.yaml Added POST /v1/judges/{id}/invite/ endpoint with JudgeInviteRequest schema; updated /v1/execution-logs/ GET parameters (added executed_item_id, revised execution_type, removed skill_data_id); revised ExecutionLogDetails, ExecutionLogList, and related schemas to track executed items, add fields, and remove nested objects.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    participant EmailService

    Client->>API: POST /v1/judges/{id}/invite/ (emails, judge_url)
    API->>EmailService: Send invitations to provided emails
    EmailService-->>API: Confirmation of sent emails
    API-->>Client: Success or error response
Loading
sequenceDiagram
    participant Client
    participant API
    participant DB

    Client->>API: GET /v1/execution-logs/?executed_item_id&execution_type
    API->>DB: Query logs filtered by executed_item_id and execution_type
    DB-->>API: Return filtered execution logs
    API-->>Client: Return execution log list with new fields
Loading

Poem

A hop and a skip, new fields in the log,
Invite your friends—no need for a jog!
With executed items now tracked with care,
And judge invites flying swiftly through air.
Rabbits rejoice as the API grows,
Sending more carrots wherever it goes! 🥕


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
openapi.yaml (4)

807-815: Align enum and description order for execution_type.

The enum entries and the bullet list in the description are out of sync. Reorder both to match, for example:

enum:
  - evaluator
  - experiment
  - judge
  - skill
description: |-
  * `evaluator` – evaluator
  * `experiment` – experiment
  * `judge` – judge
  * `skill` – skill

2505-2525: Add descriptions for new log-detail properties.

The executed_item_id, executed_item_name, executed_item_version_id, and execution_type properties lack description fields. Document each for clarity:

executed_item_id:
  type: string
  format: uuid
  readOnly: true
  nullable: true
  description: UUID of the item (skill, evaluator, judge, experiment) that was executed.

executed_item_name:
  type: string
  readOnly: true
  description: Name of the executed item.

executed_item_version_id:
  type: string
  format: uuid
  readOnly: true
  nullable: true
  description: Version ID of the executed item, if applicable.

execution_type:
  type: string
  readOnly: true
  description: Type of execution performed.

2549-2552: Document the prompt_template field.

The prompt_template property needs a description to explain its purpose:

prompt_template:
  type: string
  readOnly: true
  description: Template used to generate the execution prompt.

2931-2950: Provide an example for JudgeInviteRequest.

Including a usage example will help client implementers:

JudgeInviteRequest:
  type: object
  properties: ...
  required:
    - emails
    - judge_url
  example:
    emails:
      - "alice@example.com"
      - "bob@example.com"
    judge_url: "https://app.rootsignals.ai/judges/123e4567-e89b-12d3-a456-426614174000"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04923e7 and 360bb81.

⛔ Files ignored due to path filters (20)
  • src/root/generated/openapi_aclient/api/execution_logs_api.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient/api/judges_api.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient/models/__init__.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient/models/execution_log_details.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient/models/execution_log_details_skill.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient/models/execution_log_list.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient/models/execution_log_list_skill.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient/models/judge_invite_request.py is excluded by !**/generated/**
  • src/root/generated/openapi_aclient_README.md is excluded by !**/generated/**
  • src/root/generated/openapi_client/api/execution_logs_api.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/api/judges_api.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/__init__.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/execution_log_details.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/execution_log_details_judge.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/execution_log_details_objective.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/execution_log_details_skill.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/execution_log_list.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/execution_log_list_skill.py is excluded by !**/generated/**
  • src/root/generated/openapi_client/models/judge_invite_request.py is excluded by !**/generated/**
  • src/root/generated/openapi_client_README.md is excluded by !**/generated/**
📒 Files selected for processing (1)
  • openapi.yaml (8 hunks)
🔇 Additional comments (1)
openapi.yaml (1)

2582-2586: Revisit required declarations for nullable fields.

You’ve added executed_item_* and prompt_template to the required list even though they are nullable and readOnly. Confirm whether these should truly be mandatory or if they should be optional.

Also applies to: 2592-2593

Comment on lines +1297 to 1332
/v1/judges/{id}/invite/:
post:
operationId: judges_invite_create
description: Send email invites to view a specific judge (up to 10 recipients)
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this judge.
required: true
tags:
- judges
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JudgeInviteRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/JudgeInviteRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/JudgeInviteRequest'
required: true
security:
- publicApiKey: []
responses:
'200':
content:
application/json:
schema:
description: Invitations sent successfully
description: ''
/v1/judges/generate/:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid response schema for invite endpoint.

The 200 response under POST /v1/judges/{id}/invite/ defines only a description under schema, which is not a valid schema object. At minimum, specify a type, for example:

responses:
  '200':
    description: Invitations sent successfully
    content:
      application/json:
        schema:
          type: object
          properties: {}

Or reference a concrete response schema.

🤖 Prompt for AI Agents
In openapi.yaml around lines 1297 to 1332, the 200 response for the POST
/v1/judges/{id}/invite/ endpoint has an invalid schema definition that only
includes a description without a proper schema object. To fix this, replace the
current schema under application/json with a valid schema object by either
specifying a type (e.g., type: object with properties) or referencing an
existing response schema. Also, move the description out of the schema and place
it directly under the response code level.

Comment on lines +2611 to +2624
evaluation_context:
type: object
properties:
name:
contexts:
type: array
items:
type: string
expected_output:
type: string
description: The evaluation context used in the execution. Only included
when explicitly requested with include=evaluation_context parameter.
nullable: true
readOnly: true
executed_item_id:
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Inconsistent optional fields in list schema and required array.

  • The evaluation_context, executed_item_*, and llm_output fields are documented as “only included when explicitly requested” but are listed in required.
  • Remove these from required or adjust descriptions to reflect that they may be omitted.
  • Also, add description entries for executed_item_* properties to match the details in the list response.

Also applies to: 2625-2650, 2681-2684

🤖 Prompt for AI Agents
In openapi.yaml around lines 2611 to 2624, the fields evaluation_context,
executed_item_*, and llm_output are marked as required but their descriptions
say they are only included when explicitly requested, causing inconsistency.
Remove these fields from the required array or update their descriptions to
indicate they may be omitted. Additionally, add description entries for
executed_item_* properties to provide detailed explanations consistent with the
list response. Apply similar fixes to lines 2625-2650 and 2681-2684.

Comment on lines +797 to 802
- in: query
name: executed_item_id
schema:
type: string
format: uuid
- in: query
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Missing required and description for new query parameter.

The executed_item_id parameter is added without an explicit required: false flag or a descriptive text. For consistency and better client generation, include:

- name: executed_item_id
  in: query
  required: false
  description: Filter execution logs by the UUID of the executed item.
  schema:
    type: string
    format: uuid
🤖 Prompt for AI Agents
In openapi.yaml around lines 797 to 802, the new query parameter
executed_item_id is missing the required and description fields. Add required:
false and a description explaining it filters execution logs by the UUID of the
executed item to improve clarity and client generation. Update the parameter
definition to include these fields explicitly.

@juho-y juho-y requested a review from kkjarvis June 12, 2025 14:15
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