Local Git collector requires undocumented Git >=2.45 --no-lazy-fetch capability
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 6
- Forks
- 1
- Avg merge
- 6m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drevendev/Devostasis
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
drevendev/Devostasis#158 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
drevendev/Devostasis#148 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
drevendev/Devostasis#25 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
drevendev/Devostasis#157 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
drevendev/Devostasis#156 · 2 comments ·
All issues in drevendev/Devostasis
Similar issues
-
bug bugfix
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
simplify
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Elko Super TR: temperature stops updating once the thermostat reports its active sensorPossibly taken @zigpy-review-bot claimed this today. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
zigpy/zha-device-handlers#5790 ·
Maintainers usually reply within 1 day
-
source defect
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
mampfes/hacs_waste_collection_schedule#8269 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day