Skip to content

fix: keep earlier exit code and status message in Actor.exit() and Actor.fail() - #1190

Closed
vdusek wants to merge 4 commits into
masterfrom
fix/actor-exit-keeps-values
Closed

vdusek wants to merge 4 commits into
masterfrom
fix/actor-exit-keeps-values

Conversation

@vdusek

@vdusek vdusek commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Actor.exit() and Actor.fail() change only the values the caller passes. Omitted arguments keep what was set through the constructor or the exit_code and status_message properties, which matches the async with Actor: path. fail() without exit_code uses 1 unless a non-zero code was already set.

This is a behavior change: a bare exit() doesn't reset the exit code, status message or timeouts anymore, so code that set Actor.exit_code earlier exits with that code. The public signatures show the private _Unset default type.

Closes: #1186

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 16, 2026
@vdusek vdusek self-assigned this Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.01%. Comparing base (290af90) to head (7786fda).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1190      +/-   ##
==========================================
+ Coverage   93.00%   93.01%   +0.01%     
==========================================
  Files          54       54              
  Lines        3672     3680       +8     
==========================================
+ Hits         3415     3423       +8     
  Misses        257      257              
Flag Coverage Δ
e2e 31.73% <28.57%> (+0.01%) ⬆️
integration 51.65% <28.57%> (-0.04%) ⬇️
unit 89.75% <100.00%> (+0.02%) ⬆️

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.

@vdusek

vdusek commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Closing this. exit_code and status_message don't belong in the Actor constructor: they describe how the run ends, which isn't known when the Actor is created, and the JS SDK only takes them in exit(). Keeping the constructor values through a bare exit() needs a "not passed" marker for every argument, because None already means something for status_message and event_listeners_timeout. That adds a private type to the public signatures and special cases in fail(), which isn't worth it for values that shouldn't be set there in the first place.

The plan is to deprecate the two constructor parameters and remove them in the next major. #1186 is updated accordingly.

✍️ Drafted by Claude Code

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

Labels

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.

Deprecate exit_code and status_message in the Actor constructor

2 participants