Skip to content

fix: improve abort_with_parent handling of child runs - #1250

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

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

TLDR

  • abort_with_parent works for child runs started without a run_name. Until now it raised a ValueError.
  • A call that does not set abort_with_parent keeps the recorded value.
  • While the parent is being aborted, the SDK no longer resurrects or restarts a child run that was aborted with the parent.

abort_with_parent for child runs without a name

  • The flag is stored in the record under the implicit key, and on ABORTING each marked run gets one graceful abort request, like the named ones.
  • A start that is still in flight when the parent starts aborting holds the lock of its key, so the abort waits for it and then aborts its run.

Recorded value

  • abort_with_parent now defaults to None.
  • True or False replaces the recorded value. None keeps it, and a new run is not aborted with the parent.
  • A run that replaces a FAILED or missing one keeps the recorded value when the call does not set it.

Calls while the parent is being aborted

  • A run counts as marked when the call passes abort_with_parent=True, or when the call does not set it and the record has it.
  • For a marked run, the call raises a RuntimeError and does not start, resurrect or reattach anything.
  • A recorded run that already SUCCEEDED is still returned, since nothing starts.
  • A call without abort_with_parent used to resurrect a child that the SDK had just aborted with the parent. It now raises the same RuntimeError.

Stacked on #1249: it targets fix/list-unnamed-child-runs and moves to master once #1249 merges. Split out of #1154.

✍️ 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 93.92%. Comparing base (5ca3e05) to head (2b565c4).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           fix/list-unnamed-child-runs    #1250      +/-   ##
===============================================================
- Coverage                        93.95%   93.92%   -0.03%     
===============================================================
  Files                               54       54              
  Lines                             3836     3834       -2     
===============================================================
- Hits                              3604     3601       -3     
- Misses                             232      233       +1     
Flag Coverage Δ
e2e 31.29% <11.11%> (+0.04%) ⬆️
integration 51.06% <11.11%> (+0.02%) ⬆️
unit 91.13% <100.00%> (-0.01%) ⬇️

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

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

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.

1 participant