docs(mirrors): the -py install fetches a backend - #34
Conversation
An empty dependency list was offered as what lets a hook environment build from the `-py` clone with no network at all, and two hook manifests carried the same claim -- one asserting the ids reach no registry, the other resting a comparison on it. Empty dependencies removes every fetch the tool makes when it runs, not every fetch its install makes. The generated tree declares `hatchling` as its build backend and vendors nothing, and `pre-commit` installs with a plain `pip install .`, which builds in isolation. Generated the mirror and tried it offline: with an index unavailable the build dependencies step fails to find hatchling at all, and with build isolation off the backend cannot be imported either. Both paths need an index. So the difference between the two mirrors is what each fetches and whether a compiler is wanted, rather than network against no network. The `-rs` manifest's comparison is corrected to say that, since it was the one drawing the conclusion. Someone choosing the `-py` mirror for an isolated machine on the strength of the old sentence would have got a failed hook install, which is why the correction goes in all three places rather than the one that states it most directly. These are mirror templates, so `make mirror-diff` disagrees until a release ships them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR Summary by QodoClarify mirror installation network requirements
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
=======================================
Coverage 87.40% 87.40%
=======================================
Files 3 3
Lines 691 691
=======================================
Hits 604 604
Misses 87 87 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are comment-only documentation corrections and appear internally consistent and technically accurate.
Pull request overview
This PR corrects documentation in the mirror templates to clarify that the -py mirror still needs network access at install time (to fetch the build backend), even though it has no runtime dependencies. This aligns the mirror documentation with how pre-commit installs language: python hooks (PEP 517 build isolation) and avoids overstating “no network at all”.
Changes:
- Update
-pymirror docs to distinguish runtime “no fetches” from install-time build-backend fetches (hatchling). - Update
-rsmirror docs to describe the real distinction as “what gets fetched and required toolchains,” rather than “network vs no network”.
File summaries
| File | Description |
|---|---|
| mirrors/rs/pre-commit-hooks.yaml | Updates mirror comparison wording to reflect install-time fetches/toolchain differences accurately. |
| mirrors/py/pyproject.toml.in | Clarifies that dependency-free runtime does not imply offline build/install due to PEP 517 backend installation. |
| mirrors/py/pre-commit-hooks.yaml | Clarifies that the hook code resolves from the tree, but the build backend is fetched during install. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The replacement said the build backend is the one thing fetched, which is the same overstatement it was correcting. A build-isolated install takes what hatchling itself requires too: `pip install --dry-run hatchling` resolved six packages on 3.13, and the 3.10 floor adds tomli. Naming the fetch without counting it cannot go stale when that list moves. The comment on the dependency list also said why the point was worth stating. The fact stands without the justification. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
What changes, and why
mirrors/py/pyproject.toml.in:21offered the empty dependency list as "what lets a hook environment build from this clone with no network at all", and two hook manifests carried the same claim —mirrors/py/pre-commit-hooks.yaml:9asserting the ids "resolve from this tree alone and reach no registry", andmirrors/rs/pre-commit-hooks.yaml:10resting a comparison on it ("That one fetch is the difference from the-pymirror, which needs no network").Empty dependencies removes every fetch the tool makes when it runs, not every fetch its install makes. The generated
-pytree is eight files and vendors no backend:pre-commitinstalls alanguage: pythonhook with a plainpip install ., which builds in isolation. Tried offline in a fresh venv, both ways:So the install needs an index either way. What separates the two mirrors is what each fetches and whether a compiler is wanted — the
-rsone takes the implementation crate from crates.io and needs a Rust toolchain; the-pyone takes its build backend and what that requires, and needs no compiler — rather than network against no network.The correction goes to all three sites because the
-rsmanifest draws its conclusion from the-pyclaim, so fixing one would leave the other stating the old premise. Someone choosing the-pymirror for an isolated machine on the strength of the original sentence would get a failed hook install.Note for the release
All three files are mirror templates, so
make mirror-diffwill disagree until a release regenerates the mirrors. No CI job runs that target.Corpus
The corpus is the specification, and both implementations answer to it. Tick what applies.
corpus/pins the new behavior. The case was written first and failed first.Comments only — no generated file's content changes except the comments that ship inside it.
Checks
make checkpasses, ormake testdoes and this touches no Rust.make tidy— prettier, yamllint,check-tomland both spell gates reach the changed files. No Rust, no Python.Follow-up correction
The first wording of the
-pymanifest said the build backend was the one thing fetched, which overstates in the same direction as the sentence it replaced: build isolation installs hatchling's own requirements too.The 3.10 floor adds
tomli, per hatchling'stomli>=1.2.2; python_version < "3.11". Both comments now name the fetch without counting it, so neither goes stale when that list moves. The same commit drops the clause inpyproject.toml.inthat explained why the point was worth stating.