Skip to content

add the acutal api#97

Merged
balanceiskey merged 2 commits intohumanlayer:mainfrom
allisoneer:add-api-responseUrl
May 13, 2025
Merged

add the acutal api#97
balanceiskey merged 2 commits intohumanlayer:mainfrom
allisoneer:add-api-responseUrl

Conversation

@allisoneer
Copy link
Copy Markdown
Contributor

@allisoneer allisoneer commented May 13, 2025

Important

Enhance task creation API to handle unknown fields and deprecated fields, and update UUID generation logic in task controller.

  • API Enhancements:
    • In server.go, createTask() now reads raw request data for validation and checks for unknown fields using a strict JSON decoder.
    • Handles both responseURL and deprecated responseUrl fields, with responseURL taking precedence.
  • UUID Generation:
    • In task_controller.go, createHumanContactRequest() sets runID to a fixed value "test" and shortens callID to 7 characters.
  • Misc:
    • Minor formatting change in retryWithBackoff() in task_controller.go.

This description was created by Ellipsis for aa04207. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Copy Markdown
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.

Caution

Changes requested ❌

Reviewed everything up to aa04207 in 1 minute and 53 seconds. Click for details.
  • Reviewed 114 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. acp/internal/controller/task/task_controller.go:823
  • Draft comment:
    Truncating the UUID to 7 characters for callID may cause collisions. Consider using a longer substring to ensure uniqueness.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The comment is about a real change in the code where a UUID is being truncated. The concern about collisions is valid from a theoretical perspective. However, this appears to be used for human contact requests where the ID just needs to be unique enough for a short time period. With 7 hex chars, we get 16^7 = ~268 million possibilities, which is likely sufficient for this use case. The code comment suggests this was an intentional tradeoff for brevity. I may be underestimating the importance of guaranteed uniqueness in this system. If these IDs are stored long-term or used across a large distributed system, collisions could cause real problems. While collisions are theoretically possible, the context suggests this is for human contact requests where temporary uniqueness is sufficient. The intentional comment about making it "half as long" indicates the tradeoff was considered. The comment should be deleted. While technically correct about collision possibility, the tradeoff appears intentional and the current length is likely sufficient for the use case.
2. acp/internal/controller/task/task_controller.go:906
  • Draft comment:
    Minor formatting change: trailing comma added in retryWithBackoff signature. Verify that this style fits the project guidelines.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50% None
3. acp/internal/server/server.go:181
  • Draft comment:
    Strict JSON schema validation via DisallowUnknownFields is a good practice, though it involves double decoding. Confirm the performance impact is acceptable.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm the performance impact of a specific change, which is against the rules. It does not provide a specific suggestion or point out a clear issue with the code. Therefore, it should be removed.
4. acp/internal/server/server.go:210
  • Draft comment:
    Handling both 'responseURL' and deprecated 'responseUrl' fields ensures backward compatibility. Ensure API documentation marks 'responseUrl' as deprecated.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. acp/internal/controller/task/task_controller.go:820
  • Draft comment:
    Consider updating the comment to use 'runID' instead of 'runId' for consistency with the variable name.
  • Reason this comment was not posted:
    Comment was on unchanged code.
6. acp/internal/controller/task/task_controller.go:486
  • Draft comment:
    Consider renaming 'toolCallRequestId' to 'toolCallRequestID' for consistency and clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_sbJqtesugaKyYwxb

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

runID := uuid.New().String()
callID := uuid.New().String()
// Make runId be agent name
runID := "test"
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.

Hard-coded runID = "test" instead of dynamically using the agent name. Confirm this placeholder is intended for production.

@balanceiskey balanceiskey merged commit e617d34 into humanlayer:main May 13, 2025
1 of 4 checks passed
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