Local Git collector requires undocumented Git >=2.45 --no-lazy-fetch capability
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 32/100
Línea de trabajo
Start in src/devostasis/codeanalysis/git.py: Git.run() builds the global option prefix that includes --no-lazy-fetch, and Git.__init__() fires it via the two rev-parse calls before any collection. Read those two methods alongside tests/test_code_analysis.py, the README and code-analysis spec to see where a minimum Git version belongs, then add an explicit pre-flight version/capability check that raises the new diagnostic instead of GIT_READ_FAILED. Done means the supported Git range is documented in all three places, the fail-closed path is covered by offline tests against real 2.44.x and 2.45+ binaries plus a missing-object control, and existing v1/v2 behaviour is unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Finding — local code collector unconditionally requires a Git global flag introduced in 2.45
Pinned current source (2026-11-21): release/0.6.0@6d935ee111e2efab7a5f7d7c8f8d050af8d35567, src/devostasis/codeanalysis/git.py blob 7dc1576140f8bce9676ecbf896d9cc2129e179c1; the same Git.run() command occurs at open PR #81 HEAD a4761daa9fa87026ea106a3d722e7299b3de3b8b (blob 6953eb20afff2e22646b0e41b7dca7521fd677a5).
Git.run() prefixes every Git operation with:
command = [self.executable, "--no-lazy-fetch", "--no-replace-objects", "-c", "core.fsmonitor=false", "-c", "core.pager=cat", *args]
Git.__init__() immediately invokes self.run(["rev-parse", "--is-bare-repository"]) and self.run(["rev-parse", "--show-object-format"]). Thus an installed Git that does not recognize the global --no-lazy-fetch option cannot even begin ordinary local repository collection, regardless of completeness of the local object store. The subprocess nonzero exit is currently reduced to ValueError("GIT_READ_FAILED"), obscuring the actual compatibility problem.
Versioned upstream evidence: the official Git 2.44.0 git manual lists global --no-replace-objects but does not offer --no-lazy-fetch in its synopsis/options; the official Git 2.45.0 manual does document --no-lazy-fetch, including its equivalence to GIT_NO_LAZY_FETCH=1. No minimum Git version is declared in the inspected release/0.6.0 README, code-analysis spec or existing tests/test_code_analysis.py. The published Python >=3.12 baseline is independent of installed Git version.
Verification actually performed: On available Git 2.47.3, the exact global option sequence plus version exits 0. Source and versioned manuals were inspected. NOT_RUN: a real Git 2.44-or-earlier binary, Devostasis collect() with that binary, full repository pytest, conformance, wheel or fixing-head CI. This is a strong compatibility finding from source plus official versioned CLI contract, not a claim of a reproduced older-Git failure or a production incident.
Impact
A user installing the 0.6 local code-analysis companion on an older Git installation may get generic GIT_READ_FAILED even for a complete healthy local repository. That makes installation/first-run behavior unreliable and fails to tell the user which tool capability is missing. Simply deleting the flag without an equivalent guarantee is not an acceptable workaround: the spec explicitly forbids lazy network fetch during local immutable-object collection.
Bounded implementation / acceptance
- Decide and document the actual minimum supported Git version/capability for the local collector in README, code-analysis spec and CLI help/installation guidance as appropriate. If only Git >=2.45 can securely supply the required no-lazy-fetch guarantee, fail before repository collection on older Git with a stable, explicit
GIT_VERSION_UNSUPPORTEDorGIT_NO_LAZY_FETCH_UNSUPPORTEDdiagnostic, not genericGIT_READ_FAILED. - If supporting older Git, prove an alternative that really disables lazy fetching, preserves
--no-replace-objects, does not mutate the repository, and works for SHA-1/SHA-256 and partial-clone/missing-object cases. An unverified environment variable or silent removal of the flag is insufficient. - Add deterministic offline compatibility controls using real Git 2.44.x and 2.45+ binaries (or a CI matrix/container image actually providing those versions) and a complete local repo; assert fail-closed/no network under unsupported capability and successful collection under supported versions. Include a missing local object control, a benign complete-repo control, and a clear CLI error/exit without producing a successful bundle. Keep existing v1/v2 behavior.
- Run Python >=3.12 source tests, conformance vectors, sample/historical verification, installed-wheel gate and exact-head hosted CI; land one focused fix PR into
release/0.6.0, followed by independent review. No thresholds, Vitals semantics, policy calibration or read-only guarantees should change.
Dedup: searched repository open and closed Issues and PRs for --no-lazy-fetch, 2.44, and local Git version compatibility. Existing #154 concerns ls-tree returning BAD for an unavailable blob under a working newer Git; it does not cover command-line flag support before the collector starts.
Provider boundary: GitHub identity andy-zen-dev currently has pull=true, push=false, triage=false, maintain=false, admin=false; this issue is a read/code-backed handoff and does not claim a code commit, PR, merge or release.
Target: E4
- Lenguaje dominante
- Python
- Estrellas
- 6
- Forks
- 1
- Merge medio
- 6 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de drevendev/Devostasis
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
drevendev/Devostasis#158 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
drevendev/Devostasis#148 · 3 comentarios ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
drevendev/Devostasis#25 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
drevendev/Devostasis#157 · 3 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
drevendev/Devostasis#156 · 2 comentarios ·
Todos los issues de drevendev/Devostasis
Issues similares
-
bug bugfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
simplify
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Elko Super TR: temperature stops updating once the thermostat reports its active sensorPosiblemente ocupada @zigpy-review-bot la tomó hoy. Abiertobot: code audit
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
zigpy/zha-device-handlers#5790 ·
Los mantenedores suelen responder en 1 día
-
source defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
mampfes/hacs_waste_collection_schedule#8269 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día