Repository navigation
refactor: codify formatter API contracts - #18
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
this file is now auto-generated.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The CI stale-stub check does not detect when the generated stub is absent from the committed tree.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Codifies Python/Rust formatter contracts, generated bindings, release packaging, and compatibility requirements.
Changes:
- Generates and validates PyO3 stubs.
- Documents Rust APIs and enforces version alignment.
- Tests Python compatibility and signed 64-bit boundaries.
| File | Description |
|---|---|
.github/workflows/release.yml |
Builds stripped release wheels. |
Cargo.toml |
Enables PyO3 introspection. |
README.md |
Documents contracts and stub generation. |
pyproject.toml |
Adds Maturin tooling configuration. |
src/labeled_formatter.rs |
Documents the public Rust API. |
src/lib.rs |
Documents exports and checks versions. |
src/python.rs |
Exposes introspectable binding metadata. |
src/qir_formatter/_native.pyi |
Updates the generated native stub. |
src/scripts/ci_checks.sh |
Generates and validates the stub. |
tests/README.md |
Defines compatibility-suite expectations. |
tests/test_public_api.py |
Tests the legacy validator registry. |
tests/test_qir_formatter.py |
Tests signed 64-bit boundaries. |
uv.lock |
Locks the Maturin dependency. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
4f7afd1 to
9fb31b4
Compare

Stacked on #17; this PR should merge after it. Because #17's
rustbranch isin a fork, the base is an upstream mirror of its current head. After #17
merges, retarget this PR to
mainand removecodex-pr17-rust-base.Summary
_native.pyifrom the PyO3 declarations during development and CIval_fnsclass attribute through introspectable PyO3 declarationsi64boundary for Python inputs, including malformed out-of-range valuesCargo.tomlandpyproject.tomlversions stay alignedValidation
CI=true uv run src/scripts/ci_checks.shcargo test --no-default-featuresPyO3 still labels binary introspection experimental. Maturin also removes the
introspection section when stripping Linux binaries, so CI generates and checks
the stub before release builds; release wheels remain stripped and package that
checked stub.
The larger streaming-output and formatter-architecture changes remain separate follow-ups.