Skip to content

fix(native): reject unsupported libc, isolate Python env, recover failed installs - #80

Merged
RockChinQ merged 1 commit into
mainfrom
fix/native-install-environment
Dec 2, 2026
Merged

RockChinQ merged 1 commit into
mainfrom
fix/native-install-environment

Conversation

@RockChinQ

Copy link
Copy Markdown
Member

Fixes for native-install failures seen in lbctl telemetry over the last 24 h (v0.6.5; v0.6.6 has the same code paths).

Failure Cause Change
uv: fork/exec …/uv: no such file or directory (Alpine), onnxruntime unsatisfiable (CentOS 7) No musl wheels; no CPython 3.12 wheels that work below glibc 2.27 New CheckNativeLibc preflight fails before any file is written and points to --driver docker. Systems it cannot identify still proceed
uninstall fails forever with Unit … not loaded The install failed before the systemd unit was created, so systemctl stop exits 5 Skip stop/disable when the unit file is absent and nothing is running
Windows Failed to install: <pkg with console script> / os error -2147024786 Likely antivirus holding the new launcher .exe (a later manual retry succeeded); this code was not in the retry list Retried like the other file-lock errors; sharing violation -2147024864 and 110 are also added
Core imports pydantic from another application's venv and crashes PYTHONPATH inherited from the shell that ran lbctl Drop PYTHONPATH, PYTHONHOME and __PYVENV_LAUNCHER__ from the native environment
webauthn>=3.0.0 depends on cbor2>=6.1.2 and cbor2==5.6.5 uv reads [tool.uv] from a pyproject.toml above the caller's directory Run uv from the tools directory. User-level uv config still applies

Verification

  • The four regression tests that compile on the parent (d30d337) fail there and pass here. go test ./... passes on Linux.
  • Alpine 3.23 and CentOS 7 containers: the parent fails midway and leaves a partial deployment; this branch exits at preflight with no deployment directory created.
  • The glibc threshold comes from resolving langbot==4.11.9 with uv 0.9.11: Ubuntu 18.04 (2.27) resolves; Amazon Linux 2 (2.26) and CentOS 7 (2.17) do not.
  • python:3.12-slim, inside a project with a conflicting [tool.uv] constraint and a hostile PYTHONPATH: the parent fails with the same cbor2 conflict; this branch installs and /healthz returns 200.

Not verified

  • The Windows retry is tested only with a fake uv that returns the error code. It was not reproduced on a real Windows machine.
  • The uninstall fix is tested with a fake systemctl, not a real systemd host.
  • The parent's PYTHONPATH crash is covered by the unit test only; in the container run the parent stopped earlier, at the cbor2 conflict.

🤖 Generated with Claude Code

…led installs

- fail preflight on musl and glibc < 2.27 and point to the Docker driver
- let uninstall succeed when the install never created a systemd unit
- retry Windows ERROR_OPEN_FAILED while launchers are being written
- drop inherited PYTHONPATH/PYTHONHOME from the native environment
- run uv outside the caller's project so its [tool.uv] cannot interfere

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
@RockChinQ
RockChinQ merged commit 624b0cb into main Dec 2, 2026
40 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant