Skip to content

feat: abort marked child runs on parent abort or failure - #1250

Open
vdusek wants to merge 3 commits into
fix/list-unnamed-child-runsfrom
fix/abort-unnamed-child-runs
Open

vdusek wants to merge 3 commits into
fix/list-unnamed-child-runsfrom
fix/abort-unnamed-child-runs

Conversation

@vdusek

@vdusek vdusek commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Part 3 of 6 of the final specification of Actor composability: "Tracking child runs", section 4. Stacked on #1249.

  • abort_with_parent works for every child run, also without a run_name. Together with a custom token it raises a ValueError, since tokens are not stored and a later process could not abort the run.
  • The SDK aborts the marked runs on the ABORTING event, and when the parent exits with a non-zero exit code: Actor.fail(), Actor.exit() with a non-zero code, or an exception that leaves async with Actor. A normal finish does not abort them.
  • Only runs with an active recorded status get the graceful abort request, all in parallel. This includes runs recorded by earlier processes, and starts in flight once they are recorded. A run resurrected outside the SDK methods keeps its terminal recorded status, so the abort skips it.
  • The SDK stops waiting after 10 seconds, and Actor.exit() waits up to this limit. The ABORTING event and the exit that follows it share one abort.
  • After the abort starts, a call that would start a new run with abort_with_parent=True raises a RuntimeError. A call that returns a recorded run is not affected.
  • For a named call, abort_with_parent is bool | None = None. True or False replaces the recorded value, and None keeps it. A new run records None as False.

Closes: #1128

✍️ Drafted by Claude Code

@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 Nov 12, 2026
@vdusek vdusek self-assigned this Nov 12, 2026
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.04%. Comparing base (96ccede) to head (874e37b).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           fix/list-unnamed-child-runs    #1250      +/-   ##
===============================================================
+ Coverage                        94.01%   94.04%   +0.03%     
===============================================================
  Files                               54       54              
  Lines                             4029     4050      +21     
===============================================================
+ Hits                              3788     3809      +21     
  Misses                             241      241              
Flag Coverage Δ
e2e 31.18% <23.21%> (+0.03%) ⬆️
integration 50.34% <25.00%> (-0.04%) ⬇️
unit 91.40% <100.00%> (+0.04%) ⬆️

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 added this pull request to stack #1252 November 12, 2026 11:46
@vdusek
vdusek force-pushed the fix/abort-unnamed-child-runs branch from 862df5a to 2b565c4 Compare November 12, 2026 11:51
@vdusek vdusek changed the title fix: support abort_with_parent for unnamed child runs fix: improve abort_with_parent handling of child runs Nov 12, 2026
@vdusek
vdusek removed this pull request from stack #1252 November 20, 2026 16:33
@vdusek
vdusek force-pushed the fix/abort-unnamed-child-runs branch from 2b565c4 to bcb7762 Compare November 20, 2026 16:34
@vdusek
vdusek added this pull request to stack #1274 November 20, 2026 16:35
@vdusek
vdusek force-pushed the fix/abort-unnamed-child-runs branch from bcb7762 to 9c926b6 Compare November 20, 2026 17:52
@vdusek
vdusek marked this pull request as ready for review November 20, 2026 17:58
@vdusek
vdusek requested review from Pijukatel and barjin November 20, 2026 17:58
@vdusek
vdusek force-pushed the fix/abort-unnamed-child-runs branch from 8846b44 to 1dc980e Compare November 27, 2026 14:12
@vdusek
vdusek removed this pull request from stack #1274 November 27, 2026 14:16
@vdusek
vdusek added this pull request to stack #1286 November 27, 2026 14:16
@vdusek vdusek changed the title fix: improve abort_with_parent handling of child runs feat: abort marked child runs on parent abort or failure Nov 27, 2026
@vdusek vdusek removed the adhoc Ad-hoc unplanned task added during the sprint. label Nov 28, 2026

This branch has not been deployed

No deployments
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.

Abort child runs when the parent is gracefully aborted

1 participant