Skip to content

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Sep 30, 2025

Important

Increase MAX_TIMEOUT for browser sessions to 24 hours in skyvern/schemas/browser_sessions.py.

  • Behavior:
    • Increase MAX_TIMEOUT from 4 hours to 24 hours in skyvern/schemas/browser_sessions.py.
    • Affects CreateBrowserSessionRequest to allow session timeouts up to 24 hours.

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

Summary by CodeRabbit

  • New Features
    • Increased the maximum browser session timeout from 4 hours to 24 hours.
    • Validation now accepts timeouts up to 24 hours while preserving the existing minimum.
    • Default timeout remains 60 minutes.
    • Enables longer-running sessions without requiring manual intervention.

Copy link
Contributor

coderabbitai bot commented Sep 30, 2025

Walkthrough

In skyvern/schemas/browser_sessions.py, the MAX_TIMEOUT constant for CreateBrowserSessionRequest validation was increased from 4 hours to 24 hours. DEFAULT_TIMEOUT remains 60 minutes, and the timeout field constraints (ge=MIN_TIMEOUT, le=MAX_TIMEOUT) and description are unchanged.

Changes

Cohort / File(s) Summary
Schema constants and validation
skyvern/schemas/browser_sessions.py
Increased MAX_TIMEOUT from 60 * 4 (4 hours) to 60 * 24 (24 hours); no other logic or constraints changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I nibbled time from four to day,
A longer hop, yet still okay.
Sessions stretch like fields of clover,
Twenty-four to wander over.
Default stays a tidy hour—
Boundaries set, with gentle power.
Thump! The burrow clocks run slower.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title accurately and succinctly describes the primary change—expanding the maximum allowed timeout to 24 hours for browser session creation—making it directly relevant and clear for teammates reviewing history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch shu/browser_session_max_timeout_24h

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f785a17 and 31f809f.

📒 Files selected for processing (1)
  • skyvern/schemas/browser_sessions.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
{skyvern,integrations,alembic,scripts}/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

{skyvern,integrations,alembic,scripts}/**/*.py: Use Python 3.11+ features and add type hints throughout the codebase
Follow PEP 8 with a maximum line length of 100 characters
Use absolute imports for all Python modules
Document all public functions and classes with Google-style docstrings
Use snake_case for variables and functions, and PascalCase for classes
Prefer async/await over callbacks in asynchronous code
Use asyncio for concurrency
Always handle exceptions in async code
Use context managers for resource cleanup
Use specific exception classes
Include meaningful error messages when raising or logging exceptions
Log errors with appropriate severity levels
Never expose sensitive information in error messages

Files:

  • skyvern/schemas/browser_sessions.py
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: Lint Python code with Ruff (use ruff check)
Format Python code with Ruff (use ruff format)
Use type hints in Python code

Files:

  • skyvern/schemas/browser_sessions.py
skyvern/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Type check the skyvern package with mypy

Files:

  • skyvern/schemas/browser_sessions.py
**/*.{py,ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{py,ts,tsx}: Enforce a maximum line length of 120 characters
Use async/await patterns for asynchronous code

Files:

  • skyvern/schemas/browser_sessions.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Optimize new Python code in this PR
  • GitHub Check: Run tests and pre-commit hooks
🔇 Additional comments (1)
skyvern/schemas/browser_sessions.py (1)

7-7: Max timeout increase aligns with request validation

The higher ceiling cleanly fulfills the 24-hour requirement, and the existing validation/description already pick up the new constant—nothing else needed here.


Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Important

Looks good to me! 👍

Reviewed everything up to 31f809f in 29 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 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. skyvern/schemas/browser_sessions.py:7
  • Draft comment:
    Updated MAX_TIMEOUT to 24 hours. Verify that all session-related logic and resource management can handle extended durations and update tests if needed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_Sw8DNL54sto4c6Oa

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

@wintonzheng wintonzheng merged commit da0db69 into main Sep 30, 2025
9 checks passed
@wintonzheng wintonzheng deleted the shu/browser_session_max_timeout_24h branch September 30, 2025 14:53
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