Skip to content

Don't build a Rust test harness for the bindings crate - #860

Merged
jcelliott merged 1 commit into
mainfrom
je/oxen-py-no-rust-test-harness
Aug 12, 2026
Merged

Don't build a Rust test harness for the bindings crate#860
jcelliott merged 1 commit into
mainfrom
je/oxen-py-no-rust-test-harness

Conversation

@jcelliott

Copy link
Copy Markdown
Contributor

crates/oxen-py has no Rust tests, and is not the right place for them: it is a thin PyO3 binding layer, so a Rust test would exercise PyO3's interface more than our own logic. That logic lives in liboxen and is tested through the Python suite, which exercises the bindings against the module maturin builds.

Building the harness anyway is not free. A test target is an executable, so it embeds libpython rather than resolving symbols at load time the way the cdylib does, and PyO3 emits the matching rpath only when the interpreter is a framework build. Against a plain shared interpreter the harness aborts at launch, before libtest starts, so cargo test --workspace fails with no test failure to point at.

crates/oxen-py has no Rust tests, and is not the right place for them: it is a
thin PyO3 binding layer, so a Rust test would exercise PyO3's interface more than
our own logic. That logic lives in liboxen and is tested through the Python suite,
which exercises the bindings against the module maturin builds.

Building the harness anyway is not free. A test target is an executable, so it
embeds libpython rather than resolving symbols at load time the way the cdylib
does, and PyO3 emits the matching rpath only when the interpreter is a framework
build. Against a plain shared interpreter the harness aborts at launch, before
libtest starts, so `cargo test --workspace` fails with no test failure to point at.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1bcc0e69-ebc3-4fe7-ad57-6d73c4dc4906

📥 Commits

Reviewing files that changed from the base of the PR and between 1afd1d3 and cfc094a.

📒 Files selected for processing (1)
  • crates/oxen-py/Cargo.toml

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Updated the project’s test configuration so the library’s checks are run through the Python test suite.
    • Documented the updated testing approach.

Walkthrough

The oxen-py crate now disables its Rust library test target. Comments document that testing uses the Python suite.

Changes

Python Test Configuration

Layer / File(s) Summary
Disable Rust library tests
crates/oxen-py/Cargo.toml
The crate documents its testing strategy and sets the library test configuration to false.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes preventing Rust test harness builds for the bindings crate.
Description check ✅ Passed The description explains why the Rust test harness is unnecessary and how it can cause workspace test failures.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch je/oxen-py-no-rust-test-harness

Comment @coderabbitai help to get the list of available commands.

@jcelliott
jcelliott marked this pull request as ready for review August 12, 2026 16:09

@Eric-Laurence Eric-Laurence left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@jcelliott
jcelliott merged commit c21119f into main Aug 12, 2026
12 checks passed
@jcelliott
jcelliott deleted the je/oxen-py-no-rust-test-harness branch August 12, 2026 19:15
@CleanCut

Copy link
Copy Markdown
Contributor

🏎️ 💨

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.

3 participants