Conversation
Bundled 7-Zip 26.01 rejects Node's corepack/npm/npx links because their relative targets contain parent segments, aborting AI Toolkit setup. Extract only the Unix Node prerequisite through a constrained TAR/GZip reader that preserves file permissions and defers links until their archive-extracted regular targets exist. Reject traversal, existing links, link chains, hard links and special files. Cover these boundaries and the Linux/macOS Node layouts with 28 regression cases. Other archive consumers retain their 7-Zip checks. Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
Member
Author
|
Closing in favor of a follow-up fix. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
AI Toolkit installation on Linux fails before Python setup because bundled 7-Zip 26.01 rejects Node 20.19.3's relative
corepack,npm, andnpxlinks as dangerous, exiting with code 2. This reproduces with the real upstream Linux Node archive.Route only Unix Node installation through a constrained TAR/GZip extractor. It preserves executable file permissions, extracts regular files first, then creates relative links to files extracted from the same archive. It rejects escaping and absolute paths, existing symlinks/junctions, missing targets, directory links, link chains, hard links, and special files. Other archive consumers and Windows Node installation retain their existing behavior.
Fixes #1767.
Alternatives considered
Verification
link/..segments.nodejs;node --version=v20.19.3,npm/npx=10.8.2,corepack=0.32.0. All three links resolve and Node retains mode0755.TestGetInstalledExtensionsLiteAsync,FormatChangelogTest,FormatChangelogWithChannelTest) reproduce on unchanged public main604387e5and concern newline-sensitive comparisons.d17c257f: full suite 629 passed, 0 failed, 21 skipped; application build, CLA, and license compliance all passed.git diff --checkpassed.Full AI Toolkit dependency installation and visual UI behavior were not verified. This repair covers the failing Node prerequisite stage. Extraction may leave partial files on failure and assumes no concurrent hostile filesystem writer.