fix(session-tools-core): strip host python/uv cache vars from non-python runtime env - #1012
Open
agisota wants to merge 2 commits into
Open
fix(session-tools-core): strip host python/uv cache vars from non-python runtime env#1012agisota wants to merge 2 commits into
agisota wants to merge 2 commits into
Conversation
…: silence stale koffi warning; fix(shared): Windows-style path semantics by path style in isPathWithinDirectory - oauth-callback-url.test.ts leaked a 404-everywhere fetch stub into every test file running after it in the shared bun:test process (top-level assignment, no restore) — wrap in beforeAll/afterAll. - oauth-relay.test.ts replaced fetch in beforeEach without restore — capture original and restore in afterAll. - build/common.ts: koffi is optional for current Pi SDK (>= 0.80.x vendors its own Windows VT helper); log instead of warn when absent. - mode-manager: v0.7.0 symlink hardening resolved Windows-style paths (C:\..., UNC) with POSIX resolve() on POSIX hosts, folding backslashes into one literal component; the nearest-existing-ancestor realpath walk then escaped to cwd and every check returned false. Detect drive-letter/UNC paths and give them Windows semantics on any host; keep realpath hardening for native paths only.
…hon runtime env createScriptRuntimeEnv spreads process.env and only redirected UV_CACHE_DIR/XDG_CACHE_HOME/PYTHONPYCACHEPREFIX for python3, so a host exporting UV_CACHE_DIR leaked it into node/python runtime envs. Hermetic env is the stated purpose of the wrapper; strip the three vars for non-python languages.
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.
createScriptRuntimeEnvspreadsprocess.envand только перенаправлялUV_CACHE_DIR/XDG_CACHE_HOME/PYTHONPYCACHEPREFIXдля python3. На хостах, где эти переменные экспорчены глобально, они утекали в env для non-python рантаймов (node и прочие) — именно такую стабильную нефлаки-поломку и показал тестdoes not add python-specific cache vars for node runtime.Фикс: для non-python языков три python-кэш-переменные удаляются из env. wrapper заявляет про hermetic/deterministic subprocess env — его единственные вызовы (
script-sandbox,transform-data) являются обёртками изоляции и контракт синхронизирован.Верификация
packages/session-tools-coreполный пакет bun test — 89 тестов, 0 fail.git show upstream/main:...vs pre-fix).