Skip to content

[fix] Enable durable Stop by default - #6584

Merged
mmabrouk merged 1 commit into
release/v0.115.0from
fix/durable-stop-default-on
Sep 5, 2026
Merged

[fix] Enable durable Stop by default#6584
mmabrouk merged 1 commit into
release/v0.115.0from
fix/durable-stop-default-on

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Sep 5, 2026

Copy link
Copy Markdown
Member

Enable durable Stop when AGENTA_SESSIONS_DURABLE_STOP is unset or empty. An explicit false still selects legacy cancellation and its 300-second watchdog threshold; the enabled default uses 90 seconds. Update the OSS/EE example comments to match.

Tests

18 focused cancellation-configuration and orphan-watchdog tests pass. Ruff format/check and diff whitespace checks pass. Existing browser QA already exercised the enabled path on both previews; this changes only the fallback configuration and adds no migration.

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agenta-documentation Ready Ready Preview Sep 5, 2026 4:57pm UTC

Request Review

@mmabrouk

mmabrouk commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: Independent review passed; corrected both stale environment-example comments. All 18 focused configuration/watchdog tests pass. @coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: cb0171c9-70ff-4a5f-8ca6-0663ef7a7165

📥 Commits

Reviewing files that changed from the base of the PR and between e3ef284 and 1a8f02e.

📒 Files selected for processing (5)
  • api/oss/src/utils/env.py
  • api/oss/tests/pytest/unit/sessions/test_orphan_sweep_thresholds.py
  • api/oss/tests/pytest/unit/sessions/test_session_cancel_feature_flag.py
  • hosting/docker-compose/ee/env.ee.dev.example
  • hosting/docker-compose/oss/env.oss.dev.example

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Behavior Changes

    • Sessions now use durable-stop behavior by default when the setting is unset or empty.
    • Set the durable-stop setting to false to retain legacy cancellation behavior.
  • Documentation

    • Updated environment configuration guidance to reflect the new default behavior.

Walkthrough

Durable Stop is now enabled by default when AGENTA_SESSIONS_DURABLE_STOP is unset. Tests cover default, empty, enabled, and legacy-disabled values. Development environment comments now describe the updated default.

Changes

Session stop default

Layer / File(s) Summary
Default session stop behavior
api/oss/src/utils/env.py, api/oss/tests/pytest/unit/sessions/*
The default Durable Stop setting now produces a 90-second running threshold. The legacy false setting remains at 300 seconds, and the idle threshold remains 1,800 seconds.
Environment example documentation
hosting/docker-compose/ee/env.ee.dev.example, hosting/docker-compose/oss/env.oss.dev.example
Comments now state that Durable Stop is enabled by default and that false selects legacy cancellation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1a8f0

Sessions now use Durable Stop by default unless explicitly disabled, with the legacy cancellation path retained for false. The updated behavior and watchdog thresholds are covered without an identified current-head merge risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: enabling Durable Stop by default.
Description check ✅ Passed The description accurately explains the default behavior, legacy flag behavior, watchdog thresholds, documentation updates, and test results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/durable-stop-default-on

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@mmabrouk
mmabrouk merged commit 362d1a7 into release/v0.115.0 Sep 5, 2026
38 of 39 checks passed
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

@mmabrouk I will review pull request #6584.

⚠️ Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6584.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6584-fcacc5b
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-09-05T17:07:55.115Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant