Skip to content

M1 foundation: build/test scaffold + per-method module structure#1

Merged
hartsock merged 1 commit into
mainfrom
pilot/m1-foundation
May 31, 2026
Merged

M1 foundation: build/test scaffold + per-method module structure#1
hartsock merged 1 commit into
mainfrom
pilot/m1-foundation

Conversation

@hartsock

Copy link
Copy Markdown
Owner

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.

  • Deps pinned: gix 0.70 (full read-side features — status, revision,
    dirwalk, blocking-network-client; the 0.84 tip's status tree requires
    an unpublished gix-worktree-state and won't resolve), pyo3 0.28 (optional),
    tempfile 3.
  • PyO3 is opt-in (python feature). cargo test / cargo build run the
    pure-Rust core with no interpreter; maturin enables python +
    extension-module for the wheel.
  • Per-method module layout (src/repo/<method>.rs): each M1 method PR adds a
    new file + a 2-line registration in repo/mod.rs + a wrapper in python.rs,
    so the 13 method PRs don't collide.
  • error.rs (GitxtendError + Result), a git-CLI temp-dir fixture helper
    for 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

  • The read methods themselves (R1–R13) + the repo_status roll-up — follow-up
    PRs, each driven by a newt-agent worker with model provenance in the commit
    (Co-Authored-By: <model-id> + Model: trailer).
  • The maturin wheel + Python smoke test + version bump → the packaging PR.

🤖 Generated with Claude Code

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>
@hartsock hartsock merged commit 376482f into main May 31, 2026
1 check passed
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