Add template-aligned CI and adopt the Whitaker Dylint suite - #9
Conversation
Introduce the agent-template-python Makefile, adapted for this repository's layout (Rust crate in pycrockford_rs, Python package in msgspec_crockford), covering build, formatting, linting (ruff, interrogate, pylint, Clippy, and the Whitaker Dylint suite), typechecking with ty, tests, audits, Markdown lint, and Mermaid validation. Port the template's ruff, pylint, and pytest configuration into pyproject.toml, add the dev dependency group, and point maturin at the crate manifest explicitly. Raise requires-python to 3.10, matching the code's use of types.UnionType and types.NotImplementedType. Add a type stub for the compiled _pycrockford_rs_bindings module so the ty gate can resolve it, commit the uv lockfile, add the markdownlint configuration, ignore the uv tool caches, and register the github-actions Dependabot ecosystem now that workflows exist.
Resolve the findings surfaced by the new gates: - Whitaker's bumpy_road_function flagged CrockfordUUID::new; extract from_py_string, from_py_bytes, and from_py_uuid helpers. - Upgrade pyo3 from 0.20 to 0.29 to clear RUSTSEC-2025-0020 and RUSTSEC-2026-0177 from cargo audit, migrating to the Bound API, PyOnceLock, and abi3-py310, and replacing once_cell with std::sync::LazyLock. The byte-slice conversions now use fallible try_into rather than unwrap or unchecked copies. - Satisfy the ported ruff, interrogate, pylint, and ty configuration: add module, class, and function docstrings; alias typing and uuid imports to avoid banned from-imports and property shadowing; move long exception messages into CrockfordUUIDError factory methods and a hook-local helper; expect CrockfordUUIDError in tests instead of the over-broad ValueError; and drop the redundant sys.path manipulation now that the package is installed into the virtualenv by uv.
Run mdformat over the existing documentation and hand-wrap the remaining over-length lines so the markdownlint gate passes. Convert the emphasised table caption to plain text, wrap generic type names in the data-mapping table in code spans, and give the module-structure listing a text fence language.
Mirror the agent-template-python CI gate: validate the Makefile with mbake, then run the formatting, lint (including the Whitaker Dylint suite), typecheck, audit, and coverage gates through the shared actions. Whitaker is installed through whitaker-installer via cargo binstall, with a cargo install fallback for runners without binstall, and cached alongside the other Rust lint and test tools.
There was a problem hiding this comment.
Sorry @leynos, your pull request is larger than the review limit of 150000 diff characters
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 59 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (18)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a990b7bd52
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The CodeScene CLI install step piped the downloaded installer straight into bash and only afterwards ran `sha256sum -c -` against a file the step never wrote, so the checksum could not gate execution. Download the installer to a file first, verify it against `CODESCENE_CLI_SHA256` when the variable is set (failing on mismatch), emit a notice and skip verification when it is unset, and only then execute the verified script. Also add `--locked` to the whitaker-installer cargo-binstall invocation so that binstall's compile fallback resolves dependencies from the published lockfile, keeping fallback builds reproducible.
Summary
This pull request retrofits the repository with continuous integration
mirroring the agent-template-python template, and adopts the Whitaker Dylint
suite for the Rust crate as part of the estate-wide rollout tracked in
leynos/netsuke#410.
It adds the template Makefile (adapted for the
pycrockford_rscrate andmsgspec_crockfordpackage layout), ports the template's ruff, pylint,pytest, and dev-dependency configuration into
pyproject.toml, and wires asingle CI gate that validates the Makefile with mbake and then runs the
formatting, lint, typecheck, audit, test, and coverage gates.
Making the new gates pass required a small number of code changes. Whitaker's
bumpy_road_functionlint flaggedCrockfordUUID::new, which now delegatesto three extracted helpers.
cargo auditreported RUSTSEC-2025-0020 andRUSTSEC-2026-0177 against pyo3 0.20, so the crate has been migrated to
pyo3 0.29 (Bound API,
PyOnceLock, abi3-py310). The Python package gaineddocstrings, exception factory methods, and import aliases to satisfy the
ported ruff and interrogate configuration, and the documentation has been
reformatted for the markdownlint gate.
Review walkthrough
Makefile— the template target set;
RUST_CRATE_DIRdefaults topycrockford_rsand
PYTHON_TARGETStomsgspec_crockford. Thelint-rusttarget runscargo doc, Clippy, and the Whitaker suite with-D warnings..github/workflows/ci.yml— the CI gate; Whitaker is installed through
whitaker-installerviacargo binstall, with acargo installfallback for runners withoutbinstall.
pyproject.toml— template lint and test configuration merged with the existing maturin
build;
manifest-pathnow names the crate manifest explicitly, andrequires-pythonis raised to 3.10 to match the code's use oftypes.UnionTypeandtypes.NotImplementedType.pycrockford_rs/src/lib.rs— the pyo3 0.29 migration and the
CrockfordUUID::newrefactoring.msgspec_crockford/— docstrings, exception factories, import aliases, and narrowed
pytest.raisesexpectations._pycrockford_rs_bindings.pyi— type stub so the
tygate can resolve the compiled module..github/dependabot.yml— adds the
github-actionsecosystem now that workflows exist.Validation
All gates pass locally from a clean virtual environment:
whitaker --all -- --all-targets --all-featureswithRUSTFLAGS="-D warnings": clean after thebumpy_road_functionfix.ty check msgspec_crockford: clean.pip-auditandcargo audit: no known vulnerabilities after the pyo3upgrade.
Notes
ci.yml; thebuild-wheels and release workflows were deliberately not added.
requires-pythonwas raised from 3.8 to 3.10 because the existing codealready depends on Python 3.10 features; the wheel targets abi3-py310
accordingly.
dylint.tomlexclusions were needed.