You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Script lock pins pypi.org URLs, so leaf cannot start where pypi.org is unreachable #7
On a host whose Python package index is a private mirror rather than pypi.org, every leaf command fails before the script runs — page init, version check and server run alike.
The bin/leaf launcher runs interact.py through uv, which resolves the PEP 723 header against the interact.py.lock beside it. That lock records a pypi.org registry and an absolute files.pythonhosted.org URL for every wheel and sdist, and uv fetches exactly those. The download fails even where the mirror carries the identical versions.
Expected: the three declared dependencies resolve from whatever index the host configures.
Smallest repro: on a host that cannot reach pypi.org but has a mirror serving the same packages, run any leaf command.
The lock alone causes it. A script carrying the same PEP 723 header, with no .lock beside it, resolves and runs on that host. With the lock present nothing reaches past it — not an index flag, not a refresh flag, not the index environment variables.
The lock buys matching versions of three small pure-Python dependencies. It costs leaf running at all on such a host. Dropping it, or falling back to a lockless resolve when the locked fetch fails, would restore it.
Reproduced, and the mechanism is as you describe. With an empty cache and UV_DEFAULT_INDEX pointed at a closed port, a locked uv run interact.py --helpsucceeds — it went to files.pythonhosted.org and never asked the configured index at all; the same PEP 723 header with no lock beside it fails against that same dead index. So the lock's recorded URLs win over every index knob, exactly as reported.
#10 takes the fallback rather than dropping the lock. bin/leaf asks for the install first and, where the lock cannot be served, runs with --upgrade — the one flag that reaches past the lock's pins. A successful fallback rewrites the lock to what it resolved, so a mirror host pays that resolve once and is pinned again after.
Dropping the lock is the cheaper diff but it spends a property the suite leans on: an unlocked requirement has no recorded resolution to install from, so uv re-asks the index whenever its cached answer goes stale — which is why the two tests that shell out to the launcher's Playwright path are nightly today. Unlocked, that would be every leaf command on every offline host, not two tests. Worth saying out loud in case you'd still rather have the smaller change; the fallback is the one that keeps both hosts working.
Repro and measurements
The mirror is stood up from the other side — the lock's URLs are pointed at a closed port, leaving the configured index as the only thing that can serve the three dependencies, and uv gets a cache directory of its own (a wheel already in the cache is served whatever URL the lock names):
That third row is the offline case (UV_FROZEN=1 UV_DEFAULT_INDEX=http://127.0.0.1:1/simple) — unchanged. The added uv sync --script probe costs 12–55ms warm, against ~480ms for the uv run behind it.
One case the fallback can't serve: a read-only payload, since --upgrade writes the lock. uv says so plainly (failed to write to file … Permission denied), and no leaf install I can find is read-only, so there's no guard for it.
Activity
leaf-agent commentedon Aug 19, 2026
Reproduced, and the mechanism is as you describe. With an empty cache and
UV_DEFAULT_INDEXpointed at a closed port, a lockeduv run interact.py --helpsucceeds — it went tofiles.pythonhosted.organd never asked the configured index at all; the same PEP 723 header with no lock beside it fails against that same dead index. So the lock's recorded URLs win over every index knob, exactly as reported.#10 takes the fallback rather than dropping the lock.
bin/leafasks for the install first and, where the lock cannot be served, runs with--upgrade— the one flag that reaches past the lock's pins. A successful fallback rewrites the lock to what it resolved, so a mirror host pays that resolve once and is pinned again after.Dropping the lock is the cheaper diff but it spends a property the suite leans on: an unlocked requirement has no recorded resolution to install from, so uv re-asks the index whenever its cached answer goes stale — which is why the two tests that shell out to the launcher's Playwright path are
nightlytoday. Unlocked, that would be every leaf command on every offline host, not two tests. Worth saying out loud in case you'd still rather have the smaller change; the fallback is the one that keeps both hosts working.Repro and measurements
The mirror is stood up from the other side — the lock's URLs are pointed at a closed port, leaving the configured index as the only thing that can serve the three dependencies, and uv gets a cache directory of its own (a wheel already in the cache is served whatever URL the lock names):
That third row is the offline case (
UV_FROZEN=1 UV_DEFAULT_INDEX=http://127.0.0.1:1/simple) — unchanged. The addeduv sync --scriptprobe costs 12–55ms warm, against ~480ms for theuv runbehind it.One case the fallback can't serve: a read-only payload, since
--upgradewrites the lock. uv says so plainly (failed to write to file … Permission denied), and no leaf install I can find is read-only, so there's no guard for it.fix: resolve the header where the lock's pypi.org URLs cannot be served
fix: resolve the header where the lock's pypi.org URLs cannot be served
Remove the completed briefs from the workspace follow-up note (#786)
Test three Python-decided rules as model folds instead of browser jou…
Put model folds through the real append door, and 14 misfiled tests o…
Correct the served-module count in TODO #7 to 195
Test the runtime's own folds in Node, and say which readings may go t…
Serve the readings the browser recomputed, keeping only its local-sen…
Retire the prose-review note's finished phases and link orphaned note…
Set Leaf's interface in a closed set of voices, and rank About's sect…
A chart's ring comes off when the page puts its preview away
Share families by restated elements, compare each holder once, and qu…
Send each waiting message's words with it, and keep the walk to live …
Every read of placement settles first; ids reach placement; the file …