Skip to content

M1 R1: is_git_repo via gix::discover (qwen2.5-coder:32b)#2

Merged
hartsock merged 1 commit into
pilot/m1-foundationfrom
pilot/r1-is-git-repo
May 31, 2026
Merged

M1 R1: is_git_repo via gix::discover (qwen2.5-coder:32b)#2
hartsock merged 1 commit into
pilot/m1-foundationfrom
pilot/r1-is-git-repo

Conversation

@hartsock

Copy link
Copy Markdown
Owner

Summary

First M1 read primitive (docs/ROADMAP.md M1, step 1). Implements is_git_repo
backed by gix::discover and 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.rs were produced by qwen2.5-coder:32b
driven headlessly through newt worker (newt-agent's ACP worker). The pilot
applied a clippy fixup (needless_borrows_for_generic_args) and the 2-line
module 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, including
    repo::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 the
    same 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 main once #1
merges, at which point CI runs and this merges. Each remaining M1 method follows
the same one-method-per-PR, model-provenanced pattern.

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>
@hartsock hartsock merged commit 7ffce84 into pilot/m1-foundation May 31, 2026
@hartsock hartsock deleted the pilot/r1-is-git-repo branch May 31, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant