Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1270 +/- ##
==========================================
+ Coverage 93.90% 94.00% +0.09%
==========================================
Files 54 54
Lines 3906 4020 +114
==========================================
+ Hits 3668 3779 +111
- Misses 238 241 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
force-pushed
the
feat/child-run-registry
branch
from
November 20, 2026 17:52
b7b6745 to
253a205
Compare
vdusek
marked this pull request as ready for review
November 20, 2026 17:58
Pijukatel
reviewed
Nov 23, 2026
This was referenced Nov 25, 2026
vdusek
added a commit
that referenced
this pull request
Nov 27, 2026
`Actor.call_task` gets the `logger` argument that `Actor.call` already has. By default it redirects the log and the status messages of the task run to the log of the parent Actor. `logger=None` turns it off, and a custom logger receives the redirected lines. - The API client's `TaskClient.call` cannot redirect the log, so `Actor.call_task` starts the task with `TaskClient.start` and waits for the run through the run client. The start request keeps `timeout='no_timeout'`, as in `TaskClient.call`. - A named task call streams the log of a new run from the start, and only the new lines of a reattached run, the same as a named `Actor.call`. - If the redirect cannot be set up, the call logs a warning and waits for the run without its log. The run is already started at that point. - Concurrent named calls that share one run redirect its log once. This also holds for a named `Actor.call`. Changes for existing Actors: - The default is `'default'`, the same as for `Actor.call`. So an Actor that calls a task gets the log lines of the task run in its own log. - With a logger, `Actor.call_task` returns about 6 seconds after the run finishes or `wait` runs out, because the status message redirect of the API client waits that long for the last message. `Actor.call` has the same delay. Pass `logger=None` to avoid it. The JS SDK does not redirect the log of a task run. A `logger` argument on `TaskClient.call` in both API clients would be the better place for this, and the SDK would then only pass it on. The PR is independent of the child runs stack (#1270 and the PRs on top of it). Both change `Actor.call_task`, so the one that merges second needs a rebase. *✍️ Drafted by Claude Code*
vdusek
force-pushed
the
feat/child-run-registry
branch
from
November 27, 2026 14:12
2d30204 to
48e6d35
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of 6 that implement the final specification of Actor composability: "Tracking child runs", section 3, and "Named child runs". It changes the named child runs released in 4.2.0, which are experimental.
Registry
Actor.start,Actor.call,Actor.start_task, andActor.call_taskis recorded, with or without arun_name.{"runs": {"<kind>:<value>": record}}underAPIFY_ACTOR_CHILD_RUNSin the default key-value store. A run without a name has the keyrun:<run ID>, and a named run hasname:<run name>. A record hasrunId,status, andabortWithParent, and a named run also haschecksum. The JS SDK uses the same format.__ACTOR_CHILD_RUNSis not read.Actor.callwithout arun_namestarts the run and waits for it in the SDK, so the run is recorded while it runs.Tracker
Actor(child_run_tracker=...).'default'keeps the registry in the default key-value store. A customChildRunTrackerwithlist_runs()andstore_run(key, record)can keep it elsewhere, for example encrypted.Noneturns tracking off, and the SDK then neither reads nor writes the registry.Actor.child_runsraises aRuntimeError, andrun_nameandabort_with_parentraise aValueError.Actor(disable_excessive_child_run_warning=True)mutes it.Named runs
{id, type, input, options}as canonical JSON (RFC 8785).optionshas onlybuild,forcePermissionLevel, andwebhooks, so a call with another memory, timeout, or charge limit returns the recorded run.run_nameused again with a different Actor, task, input, or one of these options raises aValueError.Actor.child_runsA list with one entry per record, in recording order, including the records of earlier processes:
Notes for the release
Actor.child_runswas adictof run clients by run name.abort_with_parentstill needs arun_namein this PR. feat: abort marked child runs on parent abort or failure #1250 lifts that.Reattaching to child run "name:scrape-eu".Resurrecting child run "%s"is gone, andChild run "%s" no longer exists, starting a new run in its placeis new (warning).Child run features.!, because the feature is experimental.Closes: #1129
✍️ Drafted by Claude Code