M1 R6: ahead_behind via gix reachable-set diff (qwen2.5-coder:32b)#9
Merged
Conversation
src/repo/ahead_behind.rs — `ahead_behind(path, upstream) -> Result<(usize,usize)>` returns (ahead, behind) commit counts of HEAD vs an upstream. gix 0.70's rev-walk has no built-in exclusion, so it collects each side's reachable set and diffs them (ahead = upstream..HEAD, behind = HEAD..upstream); `(0,0)` on unresolvable revs. Registered + PyO3 wrapper. Parity-tested vs the two `git rev-list --count` calls on a diverged history (real bare remote). PROVENANCE: implementation + tests written by the local model qwen2.5-coder:32b, driven headlessly through `newt worker` (newt-agent's ACP worker) by the pilot, which applied the module registration + PyO3 wrapper wiring and any clippy fixups. 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
src/repo/ahead_behind.rs —
ahead_behind(path, upstream) -> Result<(usize,usize)>returns (ahead, behind) commit counts of HEAD vs an upstream. gix 0.70's rev-walk has no built-in exclusion, so it collects each side's reachable set and diffs them (ahead = upstream..HEAD, behind = HEAD..upstream);(0,0)on unresolvable revs. Registered + PyO3 wrapper. Parity-tested vs the twogit rev-list --countcalls on a diverged history (real bare remote).Implementation + parity tests written by qwen2.5-coder:32b via
newt worker(newt-agent's ACP worker), piloted. Provenance is in the commit trailers
(
Model:/Co-Authored-By:).Test plan
cargo test --no-default-features— parity tests vs thegitCLI, green.cargo clippy --no-default-features --all-targets -- -D warnings— clean.cargo clippy --features extension-module -- -D warnings— clean.cargo fmt --all --check— clean.