fix(coding-agent): apply allow-remote overrides for self-update via npm 12 - #69
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Upstream comment draft (discussion PrimeIntellect-ai#2163): Investigated this report and produced a candidate fix, validated on a fork of this repository. Root cause, fix and validation from the working notes:
Diff: main...fix/npm12-self-update-allow-remote-8586885732343917656 The change passes not posted (daily cap reached (2/2)) |
Acknowledged. |
Root cause: npm >= 12 defaults
allow-remotetonone, which rejects installations directly from a release tarball URL. The self-update command previously did not provide any policy override when using the direct package artifact spec, which caused the update process to abort with anEALLOWREMOTEerror.Fix: Updated
makeSelfUpdateCommandStepto accept an optionalenvargument and merge it into the step execution inrunSelfUpdate. When detecting a direct package artifact update via npm, it injectsnpm_config_allow_remote=allandnpm_config_allow_scripts=<tarball_path>as environment variables, mirroring the behavior added toinstall.shin PrimeIntellect-ai#1992.Validation: Ran a focused regression test
2163-npm12-self-update.test.tsvia Vitest asserting the correctenvproperties are attached to the command step for direct tarball updates and excluded for registry specs. Also rannpm run checkwhich passed.Upstream discussion: PrimeIntellect-ai#2163
PR created automatically by Jules for task 8586885732343917656 started by @awhite0030