Repository navigation
Conversation
The nested run inherited customParallelIterations, so no partition ever ran it. Its chain state lived on the run and was shared by every partition, and each nested run got a fresh cookie jar. - run the nested request once, sequentially - keep the runRequest chain per script execution and pass it to nested runs - give nested requests the calling partition's cookie jar - abort a stopped partition's in-flight nested runs Co-Authored-By: Claude <[email protected]>
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (26.31%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## develop #1565 +/- ##
============================================
- Coverage 77.54% 46.77% -30.77%
============================================
Files 51 51
Lines 4338 4361 +23
Branches 1223 1234 +11
============================================
- Hits 3364 2040 -1324
- Misses 731 2156 +1425
+ Partials 243 165 -78
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:
|
Co-Authored-By: Claude <[email protected]>
After run.abort, timeout.global still calls done once more, so the spy's second call ran mocha's done() again and failed the hook on slower CI runners. The product double-completion is fixed separately in #1559 (2c4489c). Co-Authored-By: Claude <[email protected]>
Kart03
marked this pull request as ready for review
October 15, 2026 14:53
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.
Summary
pm.execution.runRequesthangs in runs that usecustomParallelIterations(one partition per virtual user, driven throughrun.startParallelIteration). Runs that don't use partitions (the app's collection runner, newman,maxConcurrency: 1) are unaffected and behave as before.There were three separate problems:
...self.options, so it inheritscustomParallelIterations: true.PartitionManager#createPartitionsthen creates no partitions and nothing starts one for the nested run.donenever fires; the caller'sawait pm.execution.runRequest(...)waits forever.state.nestedRequest(root item, root cursor, call stack, vault flag) lives on the run, so every partition shares one slot.runRequestmakes the others' top-level scripts look nested, anddelete this.state.nestedRequestat the end of one script races with another partition's in-flight call. The run hangs.RequestCookieJar.Changes
customParallelIterations: falseandmaxConcurrency: 1: it runs once, for the script that called it.event.commandcreates anestedRequestScopefor each script execution and passes it torunNestedRequest. The top-level script starts its chain on its firstrunRequest, and the chain is passed to the nested run explicitly (nestedRequestoption), so nested levels share it and partitions never do. The existingrun-collection-request.test.jspasses unchanged.requester.cookieJarset to the caller's jar: the partition's own jar withrequester.perPartitionCookieJar, otherwise the run's shared jar. An explicit jar already wins over per-partition jars (Runconstructor), and deeper nested runs inherit it throughrequester. Non-partitioned runs keep their requester options unchanged.Partitiontracks the nested runs its scripts started (nestedRuns).stopSinglePartitioncallsPartition#abortNestedRuns, which aborts them, refuses new ones from the stopped occupant, and gives the reused index a fresh set.CHANGELOG.yaml:unreleasedentry.Behaviour change for partitioned runs
This changes what existing partitioned runs (
customParallelIterations/maxConcurrency > 1) see frompm.execution.runRequest, on purpose:perPartitionCookieJar, else the run's shared jar). So cookies a nested request sets, such as from a login, are visible to the caller, and the nested request sends the caller's cookies.Runs without partitions are unchanged: same requester options, and no jar unless one is passed explicitly.
Validation
npm run test-unit: 572 passing, 10 pending.npm run test-integration: 1915 passing, 33 pending, 0 failing.test/integration/runner-spec/run-collection-request-parallel.test.js(14 tests, local HTTP server):runRequestconcurrently: one nested request per partition, logs (nested ones included) tagged to their own partitionrunRequestinsiderunRequest: depth limit enforced per partition and reported on that partition's root requestrequester.cookieJaris shared with nested requests; with no jar, nested requests keep their own (today's behaviour)requester.perPartitionCookieJar: nested requests send the calling partition's cookies, cookies they receive land in its jar, no per-partition-jar warningrunRequest: the run completes, the stopped occupant can't start new nested requests, the next occupant gets its own chaintest/unit/partition-manager.test.jsforstopSinglePartitionaborting nested runs..eslintrcandtest/.eslintrc(clean).npm run test-lintitself doesn't run in my checkout because it's a worktree nested inside another clone, and ESLint picks up the parent's.eslintrctoo (Plugin "n" was conflicted).pm.execution.runRequestand checks cookies both ways passed every assertion (134/134 and 133/133). With 7.56.1 the same run made 3 requests and no assertions, i.e. it hung.Notes
customParallelIterationsrun ended withrun.abortcallsdonea second time withcallback timed outoncetimeout.globalelapses (3 minutes by default), because only_process's completion clears that timer. Reproduced ondevelopwithtimeout.global: 500. The new integration test ignores the second call, likeperPartitionCookieJar.test.jsdoes. Happy to fix it separately.Generated with Claude Code