Local Git collector requires undocumented Git >=2.45 --no-lazy-fetch capability
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 32/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 6
- フォーク
- 1
- 平均マージ
- 6分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
drevendev/Devostasis のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
drevendev/Devostasis#158 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
drevendev/Devostasis#148 · コメント 3 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
drevendev/Devostasis#25 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
drevendev/Devostasis#157 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
drevendev/Devostasis#156 · コメント 2 件 ·
drevendev/Devostasis の issue をすべて見る
似ている issue
-
bug bugfix
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
simplify
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Elko Super TR: temperature stops updating once the thermostat reports its active sensor対応中かも @zigpy-review-bot が今日担当しました。 オープンbot: code audit
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
zigpy/zha-device-handlers#5790 ·
メンテナーはふだん 1 日以内に返信
-
source defect
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
mampfes/hacs_waste_collection_schedule#8269 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信