M1 foundation: build/test scaffold + per-method module structure#1
Merged
Conversation
WHAT: - Pin deps: gix 0.70 (full read-side features; the 0.84 tip's `status` tree requires an unpublished gix-worktree-state and won't resolve), pyo3 0.28 (optional), tempfile 3. - Gate PyO3 behind an opt-in `python` feature so `cargo test`/`cargo build` run the pure-Rust core with no Python interpreter; `extension-module` (maturin) layers on top for the wheel. - Split src/lib.rs into error.rs (GitxtendError + Result), repo/ (one module per read method + a git-CLI temp-dir fixture helper for parity tests), status.rs (roll-up stub), python.rs (PyO3 wrappers, todo! until each method lands). - Add CI (.github/workflows/ci.yml) + a parity pre-push hook (.githooks/pre-push). WHY: M1 implements 13 read primitives + a roll-up, one per PR. The per-method module layout means each method PR adds a NEW file + a 2-line registration, so the sorties don't collide on a shared file. Pure-Rust-core-by-default keeps the method work unit-testable without libpython. See docs/ROADMAP.md M1. 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
Foundation for the M1 read-side port (
docs/ROADMAP.md). Makes gitxtend build,test, and lint cleanly, and sets up the structure for the per-method sorties.
0.70(full read-side features —status,revision,dirwalk,blocking-network-client; the0.84tip'sstatustree requiresan unpublished
gix-worktree-stateand won't resolve), pyo30.28(optional),tempfile
3.pythonfeature).cargo test/cargo buildrun thepure-Rust core with no interpreter;
maturinenablespython+extension-modulefor the wheel.src/repo/<method>.rs): each M1 method PR adds anew file + a 2-line registration in
repo/mod.rs+ a wrapper inpython.rs,so the 13 method PRs don't collide.
error.rs(GitxtendError+Result), a git-CLI temp-dir fixture helperfor parity tests, and CI + a parity pre-push hook.
Test plan
cargo test --no-default-features→ core tests pass (error + fixtures).cargo build --features extension-module→ PyO3 layer compiles.cargo clippy --no-default-features --all-targets -- -D warnings→ clean.cargo clippy --features extension-module -- -D warnings→ clean.cargo fmt --all --check→ clean.Out of scope
repo_statusroll-up — follow-upPRs, each driven by a newt-agent worker with model provenance in the commit
(
Co-Authored-By: <model-id>+Model:trailer).🤖 Generated with Claude Code