Skip to content

fix: respect explicit zero custom_after_sleep in metamorph and reboot#971

Draft
vdusek wants to merge 1 commit into
masterfrom
fix/custom-after-sleep-zero
Draft

fix: respect explicit zero custom_after_sleep in metamorph and reboot#971
vdusek wants to merge 1 commit into
masterfrom
fix/custom-after-sleep-zero

Conversation

@vdusek

@vdusek vdusek commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

  • Actor.metamorph() and Actor.reboot() used a falsy check on custom_after_sleep, so an explicit timedelta(0) was treated as unset and silently replaced with the 5-minute default (Configuration.metamorph_after_sleep).
  • Changed both checks to is None, so an explicit zero now skips the after-sleep entirely, while omitting the argument (or passing None) still uses the default.
  • Added unit tests covering both methods, asserting that no sleep happens for timedelta(0) and that the underlying API call is still made.

🤖 Generated with Claude Code

The falsy check treated an explicit timedelta(0) as unset and silently replaced it with the
5-minute default. Check for None instead so callers can opt out of the after-sleep entirely.
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jun 11, 2026
@vdusek vdusek self-assigned this Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.01%. Comparing base (2cc5602) to head (f6c047a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #971      +/-   ##
==========================================
+ Coverage   89.91%   90.01%   +0.09%     
==========================================
  Files          49       49              
  Lines        3085     3085              
==========================================
+ Hits         2774     2777       +3     
+ Misses        311      308       -3     
Flag Coverage Δ
e2e 35.98% <0.00%> (ø)
integration 56.95% <0.00%> (-0.04%) ⬇️
unit 78.83% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants