fix(lazy-deps): skip ensurepip bootstrap on managed/package-manager installs - #69475
fix(lazy-deps): skip ensurepip bootstrap on managed/package-manager installs#69475alt-glitch wants to merge 1 commit into
Conversation
…nstalls On managed installs (NixOS, Homebrew, distro packages) the sealed venv is read-only: the ensurepip -> pip bootstrap in tools/lazy_deps.py runs on every launch, burns ~20s of CPU, and can never persist anything (#48628). Skip only the bootstrap on managed installs; missing optional features still raise an actionable error naming the nix dependency group / package variant to install instead.
૮ >ﻌ< ა ci reviewrunning on 21b7282 CI timingsCI timings · View jobWall time 7m14s vs 9m59s (-27.5%). 10 job(s) slower, 8 faster, 2 unchanged.
|
SummaryThree PRs address #48628's repeated ensurepip-to-pip bootstrap on managed, read-only installations: #48637 adds an early managed-install guard, #69475 skips ensurepip while preserving the installer path and adds package-manager remediation, and merged #77500 skips the install ladder unless a writable durable target is configured. Related pull requests
Duplicates#48637, #69475, and #77500 target the same managed-install bootstrap failure; #48637 is superseded by #77500, while #69475 overlaps #77500 on the root fix but contains distinct remediation and detection work. Suggested consolidationAuthor action on #69475: split out the Nix dependency-group remediation and read-only /nix/store detection that are not present in merged #77500, then close the remaining managed-install bootstrap fix as a duplicate of #77500. Keep #48637 closed as superseded by #77500; this departs from its earlier keep_open contributor review because #77500 now implements the guarded fast-fail path and additionally preserves the writable durable-target deployment. Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I48628(["issue #48628 (closed)"])
subgraph Dup48637 ["PRs duplicating each other"]
P48637["PR #48637 (closed)"]
P69475["PR #69475 (open)"]
P77500["PR #77500 (merged)"]
end
P69475 -->|best fix| I48628
class I48628 closed
class P48637 closed
class P69475 open
class P77500 merged
class P48637 best
class P69475 best
class P77500 best
class P69475 target
click I48628 "https://github.com/NousResearch/hermes-agent/issues/48628"
click P48637 "https://github.com/NousResearch/hermes-agent/pull/48637"
click P69475 "https://github.com/NousResearch/hermes-agent/pull/69475"
click P77500 "https://github.com/NousResearch/hermes-agent/pull/77500"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 3 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 25 kB of PR diffs, 12 kB of issue/PR text, 2 kB of discussion (4 comments), 7 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
|
Call-graph-assisted review (calldiff over 🔴 Issues
🟡 Duplication / abstraction
✅ Looks good
|
Summary
Salvage of #48637 by @liuhao1024; fixes #48628.
On managed installs (NixOS et al.) the sealed venv is read-only, yet
tools/lazy_deps.pyran the ensurepip→pip bootstrap on every launch — ~20s of CPU that can never persist anything. The PR's branch head was a merge commit and the raw pick conflicted with current main, so this lands the contributor's change rebuilt on today's code (single commit, their authorship) with one behavioral refinement over the original: managed mode skips only the ensurepip bootstrap rather than raisingFeatureUnavailableoutright — a truly missing optional feature still produces an actionable error naming the dependency group to enable (e.g. the nix.#messagingvariant), and legitimate installs still reach the installer when lazy installs are allowed.Test plan
tests/tools/test_lazy_deps_managed.py: 6 passed (managed skip, error wording names dependency group, installer still reachable)py_compileclean