Skip to content

chore: update rhiza to v1.4.2 - #936

Merged
tschm merged 7 commits into
mainfrom
rhiza_v1.4.2_20260821
Aug 21, 2026
Merged

tschm merged 7 commits into
mainfrom
rhiza_v1.4.2_20260821

Conversation

@tschm

@tschm tschm commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

What

Migrates this repo from rhiza v1.3.4 to v1.4.2.

v1.4.0 stopped shipping the make layer, so this is not an ordinary /rhiza:update. The
sync deleted Makefile, .rhiza/rhiza.mk, all eleven .rhiza/make.d/*.mk fragments and
.rhiza/.env — and the settings those files carried are not the rhiza-task CLI's
defaults. Recovering them is the substance of this PR; the version bump is the easy part.

Sync result: 8 files merged, 15 deleted, no conflicts (nothing to take from upstream),
no .rej files. All 15 deletions were verified template-owned at the old ref, so no
repo-owned file was lost to the delete pass. docs/paper/README.md is new from the
github-paper template.

Settings recovered into [tool.rhiza-task]

Setting Was (make layer) CLI default @0.3.1 Now Breaks if missing
coverage_fail_under 100 (custom-env.mk) 90 100 Coverage silently allowed to fall to 90%. [tool.coverage.report] fail_under does not cover it — test passes --cov-fail-under on the command line, which outranks the config file.
typechecker both (python.mk) ty both mypy --strict stops running entirely. Also now stricter: the old shell case let mypy's status win, so a ty failure could pass.
marimo_folder book/marimo/notebooks (.rhiza/.env) docs/notebooks book/marimo/notebooks marimo-validate finds no notebooks; the folder also drops out of the deptry scan, taking the marimo dev dependency with it.
pytest_rhiza 0.2.1 (RHIZA_CHECKS_VERSION, quality.mk) pytest-rhiza @ git+…@v0.2.0 pytest-rhiza==0.2.1 Silent rollback of the conformance-check version this repo ran.
deptry_ignore DEPTRY_FOLDERS += api (Makefile) (empty) ["api"] ci / deps goes red — see below.

DEPTRY_FOLDERS += api — the one with no direct equivalent

v1.4.0 removed the DEPTRY_FOLDERS accumulator and now derives the deptry folder set
(source_folder plus marimo_folder), with no setting to extend it. Reproduced locally:
without api/ in scope, deptry reports DEP002 'fastapi' defined as a dependency but not used in the codebase, so the deps gate fails.

The deps task appends deptry_ignore to deptry's argv after the derived folders, and
deptry takes multiple roots positionally — so a bare path there restores the previous scope
exactly. Verified through the real CLI: uvx rhiza-task@0.3.1 deps → ok deps, 70 files
scanned, matching the pre-migration scope.

Suppressing the finding with a per_rule_ignores entry would have been the weaker fix: it
would also stop flagging fastapi if api/ ever genuinely stopped importing it. The stale
comment in [tool.deptry.per_rule_ignores] that pointed at the deleted DEPTRY_FOLDERS
line has been repointed.

Not migrated, on purpose

Matching the CLI default already: source_folder, tests_folder, uv_sync_args,
license_fail_on, book_output, zensical_version, paper_folder. Also left unset, each
with the reason recorded in pyproject.toml:

  • mkdocs_extra_packages — the old Makefile set --with 'mkdocstrings[python]', now the
    default. Naming the setting replaces the default list, so restating it invites someone
    to append a package and silently drop mkdocstrings.
  • license_ignore_packages — marimo.mk appended docutils; rhiza-task adds it itself
    when the marimo tasks are registered.
  • ci_os_matrix — .rhiza/.env documented leaving this unset so rhiza_ci.yml picks the
    matrix per caller. Pinning it here would defeat that.
  • layers / rhiza_checks — both derived. layers comes from the manifests present
    (pyproject.toml → python), and the check set follows from it, still yielding all
    five
    checks the make accumulators built up (the RHIZA_CHECKS += lines in python.mk,
    quality.mk and test.mk are fully covered by NEUTRAL_RHIZA_CHECKS + the python
    layer).

PROJECT_NAME_EXTRA and LOG_LEVEL from custom-env.mk were cosmetic and have no CLI
equivalent.

Two gates that needed more than a setting

1. The architectural import contracts. The old Makefile ran import-linter from an
arch target hooked in with test:: arch, which made it a CI gate only because v1.3.x
CI ran make test. v1.4.2's rhiza_ci.yml runs uvx "$RHIZA_TASK" test directly, so a
Makefile hook no longer reaches CI at all — the [tool.importlinter] contracts would have
gone unchecked while every job stayed green.

Moved to a repo: local pre-commit hook, which runs under rhiza-task fmt — what the
ci / Pre-commit hooks job executes. It uses uv run --with import-linter lint-imports,
the same command the arch target used: an isolated language: python hook fails with
Could not find package 'jquantstats' in your Python path, because import-linter resolves
root_package by importing it and needs the project itself available.

Verified it can actually fail, not just pass: injecting a forbidden
from jquantstats.data import Data into _stats/_basic.py gives
Contracts: 1 kept, 1 broken, and it returns to green once reverted.

2. Two task names shadowed by paths in this repo. The shim routes unknown targets
through a %: match-anything rule, which make only applies when it cannot resolve the
target as a file. This repo has a book/ directory and a license file at the root, and
both book and license are task names — so make book and make license resolved to
the path and printed "is up to date" without running the gate.

Note .PHONY alone is not the fix, and it fails in the direction that looks fine: make
never applies a match-anything rule to a phony target, so declaring them phony and stopping
there yields Nothing to be done for 'book' — still a silent pass. They get an explicit
forwarding rule as well, with .PHONY on top. docs/ needs no guard: the task is
docs-coverage and nothing is called docs.

The restored Makefile is otherwise the stock uvx rhiza-task shim. MKDOCS_EXTRA_PACKAGES
and DEPTRY_FOLDERS from the old one are handled above and are not carried into it.

Exclude list

Left unchanged. All three entries (rhiza_fuzzing.yml, rhiza_weekly.yml,
rhiza_scorecard.yml) are already in working destination form rather than the dead
clone-relative bundles/github/... spelling, and v1.4.2 still ships all three, so each is
live and doing its job. The exclude sweep found all three paths absent — nothing left
behind by an earlier sync, tracked or untracked. Nothing was added: the house set would
have excluded and deleted rhiza_mutation.yml, .github/CONFIG.md, .github/ISSUE_TEMPLATE
and .github/DISCUSSION_TEMPLATE, all of which are tracked and present here — an editorial
call, not part of a version bump. The chore: delete the newly excluded template files
commit is therefore absent, as there was nothing to delete.

Worth a look, not fixed here

  • FUZZING_ENABLED=true is set as a repository variable, but rhiza_fuzzing.yml is
    excluded and absent
    — so nothing fuzzes. Pre-existing, unrelated to this bump, and the
    fix is a decision either way (drop the variable, or drop the exclusion and let the sync
    deliver the caller).
  • CLAUDE.md is now stale and is repo-owned documentation, so it belongs in its own PR:
    it cites COVERAGE_FAIL_UNDER = 100 in .rhiza/make.d/custom-env.mk (that file is gone —
    the value now lives in [tool.rhiza-task]), describes the Makefile as including
    .rhiza/rhiza.mk, still says template v1.2.0, and lists a make deptry target whose
    actual name is deps.
  • RHIZA_TASK in the shim is rhiza-task@0.3.1, matching the pin rhiza_ci.yml@v1.4.2
    uses for every gate step — so local make and CI run the same code. No divergence to
    report.
  • The shim's uv bootstrap block is retained. v1.4.2's pre-commit job does now have its own
    setup-uv step, so the block is arguably dead weight, but it only fires when uvx is
    absent and removing it is a repo-owned change for its own PR.

Gates

No gates were run — /rhiza:quality produces the scorecard. The exceptions are the two
checks used as evidence above: uvx rhiza-task deps (to prove the api/ scope regression
and its fix) and uvx prek run import-linter --all-files (to prove the arch gate both
passes and can fail). make fmt was deliberately not run, as it would rewrite repo-owned
files.

CI caught one more regression

The first push went red on all four Python versions, plus book / build and
Lowest-direct dependency compatibility — 13 failing checks, all one root cause:

FAILED tests/test_jquantstats/test_coverage_gate.py::test_coverage_gate_is_100
  CalledProcessError: Command '['/usr/bin/make', '-s', 'print-COVERAGE_FAIL_UNDER']'
  returned non-zero exit status 2

tests/test_jquantstats/test_coverage_gate.py existed to guard exactly the setting this
PR migrates — it read the value back through make -s print-COVERAGE_FAIL_UNDER, and the
make layer's print-% target went with v1.4.0. book / build failed as
blocked: prerequisite failed: test, and the lowest-direct job runs the same suite, which
accounts for all 13.

Worth noting what the log showed around the failure: --cov-fail-under=100 was on the
pytest command line and Required test coverage of 100% reached — so the recovered
coverage_fail_under was already working. Only the test's probe was stale.

Rewritten to read [tool.rhiza-task] coverage_fail_under straight from the committed TOML
via tomllib — no subprocess, no uvx, no network. It also now asserts
[tool.coverage.report] fail_under alongside it, because the two are independent: the
command-line --cov-fail-under outranks the config file, so a bare pytest run and a
rhiza-task test run would enforce different numbers if they ever drifted apart.

Verified the guard still bites: commenting the setting out gives
AssertionError: [tool.rhiza-task] has no coverage_fail_under — the gate silently falls back to rhiza-task's default of 90%, and it returns to green when restored.

Final CI state: 49 pass, 0 fail. The two skipping entries are expected — mutation
is gated on a repository variable that is not set, and book / deploy only runs after
merge.

Copilot AI lite review requested due to automatic review settings August 21, 2026 19:27

Copilot AI 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.

Pull request overview

Migrates the repository’s Rhiza template integration from v1.3.4 → v1.4.2, replacing the removed synced Makefile layer with a lightweight rhiza-task-backed shim and re-homing previously Makefile-carried gate settings into pyproject.toml.

Changes:

  • Bump Rhiza template/ref pins to v1.4.2 (template metadata + reusable workflow callers).
  • Reintroduce local developer UX via a shim Makefile delegating to rhiza-task, and move prior gate settings into [tool.rhiza-task].
  • Preserve architectural import contracts by running import-linter via pre-commit; add paper bundle docs.

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Adds [tool.rhiza-task] settings to preserve prior gate behavior after make-layer removal.
Makefile Replaces deleted synced make layer with a uvx rhiza-task shim + path-shadow guards.
docs/paper/README.md Adds documentation for the paper bundle layout/targets/config.
.rhiza/template.yml Updates Rhiza template ref to v1.4.2.
.rhiza/template.lock Updates locked Rhiza ref/sha, reflects removed make-layer files, adds paper README to synced set.
.pre-commit-config.yaml Adds local hook to enforce import-linter architectural contracts under CI pre-commit gate.
.github/workflows/rhiza_paper.yml Bumps reusable workflow pin to v1.4.2.
.github/workflows/rhiza_mutation.yml Bumps reusable workflow pin to v1.4.2.
.github/workflows/rhiza_marimo.yml Bumps reusable workflow pin to v1.4.2.
.github/workflows/rhiza_codeql.yml Bumps reusable workflow pin to v1.4.2.
.github/workflows/rhiza_ci.yml Bumps reusable workflow pin to v1.4.2.
.github/workflows/rhiza_book.yml Bumps reusable workflow pin to v1.4.2.
.github/workflows/rhiza_benchmark.yml Bumps reusable workflow pin to v1.4.2.
.rhiza/rhiza.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/test.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/quality.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/python.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/paper.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/marimo.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/github.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/doctor.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/custom-task.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/custom-env.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/bootstrap.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/make.d/book.mk Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/.gitignore Deleted (no longer shipped in Rhiza >= v1.4.0).
.rhiza/.env Deleted (no longer shipped in Rhiza >= v1.4.0).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/paper/README.md
Comment on lines +56 to +62
The folder is `docs/paper` by default. Point the tasks somewhere else with a
`paper-folder` setting:

```toml
[tool.rhiza-task]
paper-folder = "manuscript"
```
Comment thread Makefile
# so an overridden `UVX=/somewhere/uvx` provisions /somewhere rather than silently
# downloading to ./bin and then running nothing.
$(UVX):
@echo "[INFO] uv not found; installing into $(@D)"
The make layer's print-% target went with rhiza v1.4.0, so the test's
'make -s print-COVERAGE_FAIL_UNDER' probe exited 2 and failed the suite on
every Python. Read the value from the committed TOML instead, where the
setting now lives, and assert [tool.coverage.report] fail_under alongside it
since the command-line --cov-fail-under outranks the config file.
@tschm
tschm merged commit 6f8a9a5 into main Aug 21, 2026
51 checks passed
@tschm
tschm deleted the rhiza_v1.4.2_20260821 branch August 21, 2026 19:48
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.

2 participants