M1 R1: is_git_repo via gix::discover (qwen2.5-coder:32b)#3
Merged
Conversation
WHAT: src/repo/is_git_repo.rs — `pub fn is_git_repo(path: &Path) -> bool` backed by `gix::discover` (true iff `path` is inside a git working tree, including from a subdirectory), with parity tests vs `git rev-parse --git-dir` on repo / subdir / non-repo fixtures. Registered in repo/mod.rs; the PyO3 `is_git_repo` wrapper is wired to call it. WHY: First read primitive of the M1 git-tend port (docs/ROADMAP.md M1, step 1). PROVENANCE: the implementation and its tests were written by the local model qwen2.5-coder:32b, driven headlessly through `newt worker` (the newt-agent ACP worker) by the pilot. The pilot applied a mechanical clippy fixup (needless_borrows_for_generic_args) and the module/PyO3 wiring. Co-Authored-By: qwen2.5-coder:32b <model@newt.local> Model: qwen2.5-coder:32b Piloted-by: newt-agent Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First M1 read primitive (
docs/ROADMAP.mdM1, step 1). Implementsis_git_repobacked by
gix::discoverand wires it through the PyO3 surface.Written by a local model, piloted by newt-agent. The implementation +
parity tests in
src/repo/is_git_repo.rswere produced byqwen2.5-coder:32bdriven headlessly through
newt worker(newt-agent's ACP worker). The pilotapplied a clippy fixup (
needless_borrows_for_generic_args) and the 2-linemodule registration + PyO3 wrapper wiring. See the commit's
Model:/Co-Authored-By:trailers — that's the provenance.Test plan
cargo test --no-default-features→ 7 core tests pass, includingrepo::is_git_repo::tests::{repo_root_and_subdir, non_repo, parity_with_git_cli}(the last asserts the gix result equals
git rev-parse --git-dir's exit on thesame fixture).
cargo clippy --no-default-features --all-targets -- -D warnings→ clean.cargo clippy --features extension-module -- -D warnings→ clean.cargo fmt --all --check→ clean.Note
Stacked on #1 (the M1 foundation). Base will auto-retarget to
mainonce #1merges, at which point CI runs and this merges. Each remaining M1 method follows
the same one-method-per-PR, model-provenanced pattern.