-
Notifications
You must be signed in to change notification settings - Fork 823
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
TOTP code db + agent support for fetching totp_code from db #784
Conversation
<!-- ELLIPSIS_HIDDEN --> | 🚀 | This description was created by [Ellipsis](https://www.ellipsis.dev) for commit b9b2ccac68229959264888b7141bbaa74f9e100f | |--------|--------| ### Summary: This PR adds a `totp_codes` table and updates models, functions, and templates for TOTP verification using a `totp_identifier`. **Key points**: - Add `totp_codes` table via Alembic migration. - Introduce `TOTPCodeModel` with fields: `totp_code_id`, `totp_identifier`, `organization_id`, `task_id`, `workflow_id`, `content`, `code`, `source`, `created_at`, `modified_at`, `expired_at`. - Add `totp_identifier` column to `tasks`, `workflow_runs`, `workflows` tables. - Create indices for `created_at`, `expired_at`, `totp_identifier` in `totp_codes` table. - Update `create_task` and `create_workflow` functions to handle `totp_identifier`. - Modify `TaskBlock` and `Workflow` classes to include `totp_identifier`. - Update `poll_verification_code` function to use `totp_identifier`. - Modify `cloud/prompts/cloud/parse-verification.j2` to include `reasoning` and `code_found` fields. ---- Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev) <!-- ELLIPSIS_HIDDEN -->
There was a problem hiding this 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 0b248e9 in 30 seconds
More details
- Looked at
566
lines of code in13
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. skyvern/webeye/actions/handler.py:1997
- Draft comment:
Ifget_totp_codes
already filters out expired codes, this check might be redundant. Consider removing it to improve performance slightly. - Reason this comment was not posted:
Confidence changes required:30%
The function_get_verification_code_from_db
inskyvern/webeye/actions/handler.py
has a potential issue with the expiration check. The checktotp_code.expired_at < datetime.utcnow()
might not be necessary if theget_totp_codes
function already filters out expired codes. This could lead to redundant checks and slight performance inefficiency.
Workflow ID: wflow_eWcpSbmB5K3JHoOz
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this 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! Incremental review on 0b248e9 in 35 seconds
More details
- Looked at
565
lines of code in13
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. skyvern/webeye/actions/handler.py:1941
- Draft comment:
Consider adding a maximum number of iterations or a maximum wait time to prevent potential infinite loops in thepoll_verification_code
function. - Reason this comment was not posted:
Confidence changes required:50%
The functionpoll_verification_code
inskyvern/webeye/actions/handler.py
has a potential issue with the timeout logic. The current implementation checks if the current time exceeds the timeout, but it does not handle the case where the loop might run indefinitely if the timeout is not reached. It would be better to ensure that the loop exits after a certain number of iterations or a maximum wait time to prevent potential infinite loops.
Workflow ID: wflow_fsiTeESpaspUkkvu
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this 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! Incremental review on 931092d in 16 seconds
More details
- Looked at
75
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. alembic/versions/2024_09_08_2159-c5848cc524b1_create_totp_codes_table_and_add_task_.py:35
- Draft comment:
Themodified_at
column should be nullable to allow for initial creation without modification. Consider settingnullable=True
. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is relevant to the changes made in the diff, as it addresses a potential issue with the 'modified_at' column being non-nullable. Making 'modified_at' nullable could be a valid suggestion to prevent issues during initial record creation. The comment is actionable and clear, suggesting a specific change to the code.
The comment might be considered speculative if the current implementation is intentional and the 'modified_at' field is always expected to have a value. However, the suggestion is practical and could prevent potential issues.
Even if the current implementation is intentional, the suggestion to make 'modified_at' nullable is a common practice to avoid issues during initial creation. It's a valid point to consider.
Keep the comment as it provides a clear and actionable suggestion related to the changes made in the diff.
Workflow ID: wflow_DN6NbqyBG8IfgMSu
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary:
This PR adds a
totp_codes
table and updates models and functions to support TOTP verification with atotp_identifier
.Key points:
totp_codes
table via Alembic migration.TOTPCodeModel
with fields:totp_code_id
,totp_identifier
,organization_id
,task_id
,workflow_id
,content
,code
,source
,created_at
,modified_at
,expired_at
.totp_identifier
column totasks
,workflow_runs
,workflows
tables.created_at
,expired_at
,totp_identifier
intotp_codes
table.create_task
andcreate_workflow
functions to handletotp_identifier
.TaskBlock
andWorkflow
classes to includetotp_identifier
.poll_verification_code
function to usetotp_identifier
.cloud/prompts/cloud/parse-verification.j2
to includereasoning
andcode_found
fields.Generated with ❤️ by ellipsis.dev