Skip to content
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

x/fix task execution #482

Merged
merged 4 commits into from
Sep 2, 2024
Merged

x/fix task execution #482

merged 4 commits into from
Sep 2, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Sep 2, 2024

  • feat: Update typespec
  • fix(agents-api): Fix tests. 100% passing
  • feat: Add error message to execution if failed

🚀 This description was created by Ellipsis for commit 7722e8b

Summary:

Enhanced task execution by updating typespecs, fixing tests, and adding error handling across multiple files.

Key points:

  • feat: Update typespec
  • fix(agents-api): Fix tests. 100% passing
  • feat: Add error message to execution if failed
  • Updated instructions field in agents-api/agents_api/autogen/Agents.py to default to an empty list.
  • Added output and error fields to CreateExecutionRequest and Execution in agents-api/agents_api/autogen/Executions.py.
  • Modified jobs and docs fields in BaseChatResponse in agents-api/agents_api/autogen/Chat.py to be read-only.
  • Introduced SchemaCompletionResponseFormat and SimpleCompletionResponseFormat in agents-api/agents_api/autogen/Chat.py.
  • Updated TransitionType and ExecutionStatus in agents-api/agents_api/autogen/openapi_model.py to include new states like init_branch and finish_branch.
  • Enhanced validate_transition_targets function in agents-api/agents_api/models/execution/create_execution_transition.py to handle new transition types.
  • Refactored task_to_spec function in agents-api/agents_api/common/protocol/tasks.py to handle task specifications more robustly.
  • Updated tests in agents-api/tests/test_execution_workflow.py to cover new execution scenarios and error handling.
  • Added migration script agents-api/migrations/migrate_1725153437_add_output_to_executions.py to update the database schema for executions.
  • Updated TypeScript SDK models in sdks/ts/src/api/models to reflect changes in API response formats and execution handling.

Generated with ❤️ by ellipsis.dev

Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 3395093 in 1 minute and 49 seconds

More details
  • Looked at 2114 lines of code in 61 files
  • Skipped 2 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. agents-api/agents_api/autogen/Agents.py:44
  • Draft comment:
    Changing the default value of 'instructions' from an empty string to an empty list may lead to unexpected behavior if other parts of the codebase expect a string by default. Ensure that this change is intentional and that all dependent code is updated accordingly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment points out a potential issue with changing the default value type, which could affect other parts of the codebase. This is a valid concern as it involves a change in data type, which might not be caught by a build system. The comment is actionable as it suggests ensuring that the change is intentional and that dependent code is updated.
    The comment could be seen as speculative since it assumes there might be an issue without confirming it. However, changing a default value type is a significant change that warrants attention.
    While the comment could be seen as speculative, it addresses a real risk associated with changing the data type of a default value, which is a valid concern.
    The comment should be kept as it highlights a potential issue with changing the default value type, which is a significant change that could affect the codebase.
2. agents-api/agents_api/autogen/Agents.py:82
  • Draft comment:
    Changing the default value of 'instructions' from an empty string to an empty list may lead to unexpected behavior if other parts of the codebase expect a string by default. Ensure that this change is intentional and that all dependent code is updated accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
3. agents-api/agents_api/autogen/Agents.py:117
  • Draft comment:
    Changing the default value of 'instructions' from an empty string to an empty list may lead to unexpected behavior if other parts of the codebase expect a string by default. Ensure that this change is intentional and that all dependent code is updated accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
4. agents-api/agents_api/autogen/Agents.py:155
  • Draft comment:
    Changing the default value of 'instructions' from an empty string to an empty list may lead to unexpected behavior if other parts of the codebase expect a string by default. Ensure that this change is intentional and that all dependent code is updated accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
5. agents-api/agents_api/autogen/Agents.py:193
  • Draft comment:
    Changing the default value of 'instructions' from an empty string to an empty list may lead to unexpected behavior if other parts of the codebase expect a string by default. Ensure that this change is intentional and that all dependent code is updated accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
6. agents-api/agents_api/autogen/Chat.py:71
  • Draft comment:
    Changing the 'tools' field from a nullable list to a non-nullable list with a default empty list may lead to unexpected behavior if other parts of the codebase expect a nullable list by default. Ensure that this change is intentional and that all dependent code is updated accordingly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is speculative, suggesting potential issues without certainty. It also asks the author to ensure the change is intentional, which violates the rule against asking for confirmation of intent. The change is clear and does not necessarily require a comment unless it is certain that it will cause issues.
    I might be underestimating the potential impact of changing a nullable list to a non-nullable list. This could indeed cause issues if other parts of the codebase rely on the previous behavior.
    The rules specify not to make speculative comments or ask for confirmation of intent. The comment does not provide a definite issue, so it should be removed.
    The comment should be removed because it is speculative and asks for confirmation of intent, which violates the review rules.

Workflow ID: wflow_8SyijRaXyaLUPmiY


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 7722e8b in 29 seconds

More details
  • Looked at 169 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_aqUkl7Ffan9M05fN


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

developer_id=context.execution_input.developer_id,
execution_id=context.execution_input.execution.id,
task_id=context.execution_input.task.id,
data=transition_info,
update_execution_status=True,
)

return transition

async def mock_transition_step(
context: StepContext,
Copy link
Contributor

Choose a reason for hiding this comment

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

The mock_transition_step function should return a Transition object to match the return type of transition_step.

@whiterabbit1983 whiterabbit1983 merged commit d761ab0 into dev-tasks Sep 2, 2024
2 of 5 checks passed
@whiterabbit1983 whiterabbit1983 deleted the x/fix-task-execution branch September 2, 2024 14:57
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.

2 participants