Skip to content

chore: update rhiza to v1.1.0 - #45

Merged
tschm merged 5 commits into
mainfrom
rhiza_v1.1.0
Jul 9, 2026
Merged

chore: update rhiza to v1.1.0#45
tschm merged 5 commits into
mainfrom
rhiza_v1.1.0

Conversation

@tschm

@tschm tschm commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Bumps the template ref to v1.1.0 in .rhiza/template.yml (from v1.0.1 on main)
  • Platform profile: github-project (unchanged — matches the github.com remote)
  • Runs make sync to apply upstream template changes; 7 conflicts resolved taking the upstream side (rhiza_book.yml, rhiza_ci.yml, rhiza_codeql.yml, rhiza_release.yml, rhiza_sync.yml, docs/index.md, ruff.toml), no .rej files
  • v1.1.0 restructures Rhiza-owned infra: flattens .rhiza/tests/ (removes the api/, integration/, structure/, sync/, utils/ subdirs), drops .rhiza/requirements/*.txt in favour of on-the-fly uv run --with, and removes the .rhiza/utils/ suppression helpers
  • .rhiza/.rhiza-version left untouched (decoupled tool version)

Note: supersedes PR #42 (rhiza_v1.0.3), which was opened moments earlier before v1.1.0 was released. Both branch off main; merge this one and close #42.

⚠️ Upstream bug worked around here

v1.1.0's synced .rhiza/make.d/test.mk typecheck target runs uv run ty check / uv run mypy --strict without --with/--group, and v1.1.0 deleted .rhiza/requirements/tools.txt that used to install the checkers — so make typecheck fails in fresh CI (Failed to spawn: ty). Local stopgap (survives re-sync, in the locally-owned pyproject.toml): declare ty/mypy in the lint dependency group and add lint to [tool.uv] default-groups. The real fix belongs upstream in jebel-quant/rhiza: the typecheck target should self-provision the checkers (e.g. uv run --with ty ty check).

Quality gates

Gate Result Evidence
make fmt ✅ PASS All pre-commit hooks passed
make typecheck ✅ PASS ty clean; mypy --strict no issues in 5 files (src-only)
make docs-coverage ✅ PASS interrogate 100.0%
make deptry ✅ PASS No dependency issues found
make security ✅ PASS pip-audit no vulnerabilities; bandit clean
make validate ✅ PASS template.yml valid on v1.1.0; .rhiza/tests/ 46 passed
make test ✅ PASS 102 passed; src/nncg coverage 100% (min 90%)

All 7 gates green. The suite does not double-run: make validate runs .rhiza/tests/ (infra, 46) and make test runs tests/ (project, 102) — distinct testpaths.

Scorecard

Scoped to locally-owned src/, tests/, project config (Rhiza-managed files excluded per CLAUDE.md).

Subcategory Score Justification
Linting / style 10 Every fmt hook passes
Type safety 10 ty + mypy --strict clean over src/
Docstring / API-doc coverage 10 interrogate 100%
Test pass rate 10 102/102 passed
Test coverage & depth 10 100% on all 5 src/nncg modules (gate 90%)
Dependency & security hygiene 10 deptry / pip-audit / bandit all clean
Template fidelity (make validate) 10 No drift; validate passes on v1.1.0
Overall architecture 10 Clean DAG (krylov←inner←api, solver via InnerSolver Protocol), no cycles
Test design quality 9 Behaviour-first (planted optima, KKT certificates, Bland-fallback pinned); not deep-audited for mock brittleness
Code complexity 9 No C-or-worse blocks; avg A (2.97). Three B-grade hotspots and two modules low in the A band

Overall: 9.7 / 10.

Highest-leverage improvement: reduce the three B-grade complexity hotspots (inner.py:112 _nystrom CC 10, solver.py:343 ActiveSetSolver._run CC 9, inner.py:213 Exact/Exact.solve CC 7/6) and raise the maintainability index of solver.py (51.84) and inner.py (53.84).

Recommendations

  1. Code complexity 9→10 — refactor the B-grade blocks so uvx radon cc src -s ranks every block A (CC ≤ 5) and uvx radon mi src -s reports all modules ≥ 65 MI. Tracked in Reduce B-grade complexity hotspots in src/nncg to all-A #43.
  2. Test design quality 9→10 — audit tests/test_nncg/ and tests/test_paper/ to confirm assertions target observable behaviour with no brittle internal-state mocking. Tracked in Audit test-design robustness (mock/impl-mirroring) in tests/ #44.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 9, 2026 06:22

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

This PR bumps the repository’s Rhiza template reference to v1.1.0 and syncs the resulting upstream infrastructure changes, including a restructured .rhiza/tests suite, updated Make targets that provision tooling via uv run --with, and new/updated GitHub Actions workflow stubs.

Changes:

  • Update .rhiza/template.yml / .rhiza/template.lock to Rhiza v1.1.0 and apply upstream sync output (including workflow pin updates).
  • Restructure Rhiza-owned infra: flatten .rhiza/tests/, remove .rhiza/utils/ helpers and .rhiza/requirements/*.txt, and adjust Make targets accordingly.
  • Update docs entrypoint (docs/index.md) to include README.md and add development docs for testing / marimo notebooks.

Reviewed changes

Copilot reviewed 49 out of 54 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ruff.toml Removes per-path ignore exemptions (docs/experiments/.rhiza utils).
docs/index.md Switches docs home page to include README.md via snippets.
docs/development/TESTS.md Adds Rhiza testing infrastructure documentation.
docs/development/MARIMO.md Adds Marimo notebooks documentation.
.rhiza/utils/suppression_report.py Removes suppression audit reporting utility (upstream restructure).
.rhiza/utils/suppression_parse.py Removes suppression audit parsing utility (upstream restructure).
.rhiza/utils/suppression_audit.py Removes suppression audit CLI utility (upstream restructure).
.rhiza/utils/pip_audit_policy.py Removes pip-audit policy wrapper utility (upstream restructure).
.rhiza/tests/utils/test_suppression_audit.py Removes tests for deleted suppression-audit utilities.
.rhiza/tests/utils/test_pip_audit_policy.py Removes tests for deleted pip-audit policy utility.
.rhiza/tests/test_readme_validation.py Adds flattened README validation tests.
.rhiza/tests/test_pyproject.py Adds flattened pyproject structure tests.
.rhiza/tests/test_git_repo_fixture.py Adds flattened git_repo fixture self-tests.
.rhiza/tests/test_docstrings.py Adds flattened doctest-based docstring tests.
.rhiza/tests/sync/conftest.py Removes old sync conftest (suite flattening).
.rhiza/tests/structure/test_requirements.py Removes requirements structure test (requirements removed).
.rhiza/tests/structure/test_project_layout.py Removes old structure layout test (suite flattening).
.rhiza/tests/stress/README.md Updates stress docs links after suite restructure.
.rhiza/tests/shell/test_scripts.sh Removes shell-script test harness (upstream restructure).
.rhiza/tests/README.md Updates Rhiza test suite README to match new flat layout.
.rhiza/tests/integration/test_virtual_env_unexport.py Removes integration test (suite flattening).
.rhiza/tests/integration/test_test_mk.py Removes integration tests for test.mk (suite flattening).
.rhiza/tests/integration/test_docs_targets.py Removes docs-target integration tests (suite flattening).
.rhiza/tests/integration/test_book_targets.py Removes book-target integration tests (suite flattening).
.rhiza/tests/api/test_releasing_targets.py Removes Make API tests (suite flattening).
.rhiza/tests/api/test_makefile_targets.py Removes Makefile dry-run tests (suite flattening).
.rhiza/tests/api/test_makefile_api.py Removes Makefile API tests (suite flattening).
.rhiza/tests/api/test_make_variable_overrides.py Removes Make variable override tests (suite flattening).
.rhiza/tests/api/test_github_targets.py Removes GitHub make target tests (suite flattening).
.rhiza/tests/api/conftest.py Removes API conftest (suite flattening).
.rhiza/template.yml Bumps Rhiza template ref to v1.1.0.
.rhiza/template.lock Updates synced sha/ref and tracked file list for v1.1.0.
.rhiza/rhiza.mk Updates rhiza-test invocation to provision deps via uv run --with.
.rhiza/requirements/tools.txt Removes requirements file (requirements folder dropped).
.rhiza/requirements/tests.txt Removes requirements file (requirements folder dropped).
.rhiza/requirements/README.md Removes requirements folder README (folder dropped).
.rhiza/requirements/marimo.txt Removes requirements file (requirements folder dropped).
.rhiza/requirements/docs.txt Removes requirements file (requirements folder dropped).
.rhiza/make.d/test.mk Updates test/typecheck/security/docs targets to use uv run --with / rhiza-tools.
.rhiza/make.d/quality.mk Routes suppression-audit through rhiza-tools; adjusts install dependency.
.rhiza/make.d/bootstrap.mk Removes installation of .rhiza/requirements/*; relies on uv sync + per-target --with.
.rhiza/make.d/book.mk Provisions marimo via uv run --with marimo for notebook export.
.pre-commit-config.yaml Bumps a few pre-commit hook revisions.
.github/workflows/rhiza_weekly.yml Adds weekly workflow stub calling upstream reusable workflow at v1.1.0.
.github/workflows/rhiza_sync.yml Updates reusable workflow pin to v1.1.0.
.github/workflows/rhiza_scorecard.yml Adds scorecard workflow stub calling upstream reusable workflow at v1.1.0.
.github/workflows/rhiza_release.yml Updates action pin to v1.1.0; adds retry loop for grayskull metadata lag.
.github/workflows/rhiza_mutation.yml Adds mutation workflow stub calling upstream reusable workflow at v1.1.0.
.github/workflows/rhiza_marimo.yml Adds marimo workflow stub calling upstream reusable workflow at v1.1.0.
.github/workflows/rhiza_fuzzing.yml Adds fuzzing workflow stub calling upstream reusable workflow at v1.1.0.
.github/workflows/rhiza_codeql.yml Updates reusable workflow pin to v1.1.0.
.github/workflows/rhiza_ci.yml Updates reusable workflow pin to v1.1.0.
.github/workflows/rhiza_book.yml Updates reusable workflow pin to v1.1.0.
.github/workflows/rhiza_benchmark.yml Adds benchmark workflow stub calling upstream reusable workflow at v1.1.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/development/TESTS.md
Comment on lines +14 to +16
The test file `.rhiza/tests/sync/test_readme_validation.py` automatically executes every `python`
code block in `README.md` and checks that its output matches the adjacent ` ```result ` block. It
also syntax-checks every `bash` block using `bash -n`.
Comment thread .rhiza/make.d/test.mk
case "${TYPECHECKER}" in \
ty) \
printf "${BLUE}[INFO] Running ty type checking in:$${typecheck_paths}${RESET}\n"; \
${UV_BIN} run ty check $${typecheck_paths} \
Comment thread .rhiza/make.d/test.mk
;; \
mypy) \
printf "${BLUE}[INFO] Running mypy strict type checking in:$${typecheck_paths}${RESET}\n"; \
${UV_BIN} run mypy --strict $${typecheck_paths} \
Comment thread .rhiza/make.d/test.mk
Comment on lines +103 to +105
${UV_BIN} run ty check $${typecheck_paths} && \
printf "${BLUE}[INFO] Running mypy strict type checking in:$${typecheck_paths}${RESET}\n"; \
${UV_BIN} run mypy --strict $${typecheck_paths} \
tschm and others added 3 commits July 9, 2026 10:31
The synced v1.1.0 typecheck target runs 'uv run ty check' / 'uv run mypy
--strict' without --with/--group, and v1.1.0 dropped .rhiza/requirements/
tools.txt that used to install them. Declare ty+mypy in the lint dependency
group and add it to default-groups so 'uv run' resolves them in fresh CI.
Upstream Rhiza bug: the typecheck target should self-provision the checkers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Unpinned ty/mypy made 'uv sync --resolution lowest-direct' pick mypy 0.1,
whose py2-only dependency chain (yaro -> wsgiref 0.1.2) fails to build on
Python 3. Pin ty>=0.0.1 and mypy>=1.8; verified the floors (ty 0.0.2,
mypy 1.8.0) pass pytest, ty check, and mypy --strict.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…book

The 03_test_problems notebook called solve_nnqp(..., inner="pcg"), but the
valid inner shortcuts are cg/jacobi/nystrom/exact; "pcg" raised ValueError.
The author meant Jacobi-preconditioned CG (the plot label read '(Jacobi)'),
so switch to inner="jacobi". Latent on main; surfaced by v1.1.0's new marimo
CI workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tschm
tschm merged commit d35e73a into main Jul 9, 2026
64 checks passed
@tschm
tschm deleted the rhiza_v1.1.0 branch July 9, 2026 07:42
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