Okay - now we know that moved things along. Here's the same patch changes for the latest 4.0.x branch.
Trying a different approach to last time.
cweagans is included via the acquia/cohesion package. This change instead attempts to allow-plugin for for cweagans and then install the dev/require-dev package after.
If this works, it would mean acquia/cohesion composer dev dependency will need to be managed through drupalci.yml rather than composer.json.
Just try 3.9.x branch first.
Yeah - so cannot patch the drupalci.yml file. Because Jenkins loads this file before the patch is applied and therefor not honoured by the Jenkins test.
To test this change, you'd need to apply the changes directly to repo branch rather than a patch. Rollback/reset the commit if it does not work.
Attempting a patch to update the drupalci build file. - start with 3.9.x as not 100% sure this will work.
During investigation of Nick's patch to set allow-plugin true for cweagans, it was noted that the build was failing before even attempting to set allow-plugin true.
I've found some references that suggest we may be able to add the entire build file with unset default values which will enable us to move Nick's commands further up the build file and thus running within the assemble_codebase step before composer install.
Creating this build file on my local drupalci instance resolved the cweagan error.
I found once the testing commenced, there were some failing tests though - likely unrelated.