summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/tests/test_sdk_install_timeout.py
AgeCommit message (Collapse)Author
2026-11-10security-guidance: name the temp folder test for what it requiresmhegazy/sg-pip-temp-real-dirClaude
Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-10security-guidance: keep the pip temp folder to a real folder of this userClaude
Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-03security-guidance: pause for an hour after an SDK install times outMohamed Hegazy
A pip install that runs out of time (a connection too slow to fetch the SDK wheel inside the 120s limit) was retried at every SessionStart and every 5 minutes from the tool hooks, downloading most of the wheel each time. A pip timeout now starts a one-hour cooldown, in the venv build and in the --target fallback. A timeout while creating the venv does not. The skipped runs report the existing SKIP_COOLDOWN outcome, with sdk_timeout_cooldown set so they can be told from signal-kill cooldowns. Refs #6979
2026-11-03security-guidance: keep pip's downloads out of the system temp dirMohamed Hegazy
pip keeps each wheel it downloads in a pip-unpack-* folder under the temp dir and removes it only on a normal exit. The SDK bootstrap kills pip at its 120s timeout, so on a slow connection every attempt left its download in the system temp dir, and attempts repeat while the SDK is missing. Both pip installs (venv and --target fallback) now run with a temp folder of their own under the plugin's state dir. It is removed when the attempt ends, however it ends. A folder left by a bootstrap that was itself killed is removed by a later bootstrap run. Refs #6979