Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates this repository’s Rhiza template pin to v0.13.3 and syncs template-managed files, including introducing workflow “stub” files under .rhiza/stubs/workflows and updating Rhiza’s internal version file.
Changes:
- Bump Rhiza template reference and lockfile to
v0.13.3and update.rhiza/.rhiza-versionto0.15.0. - Add Rhiza GitHub workflow stub YAMLs under
.rhiza/stubs/workflows/*. - Adjust Rhiza structure/API tests, but leave several
*.rejrejected-hunk artifacts in the repo.
Reviewed changes
Copilot reviewed 12 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.rhiza/template.yml |
Updates template ref to v0.13.3. |
.rhiza/template.lock |
Updates locked template SHA/ref and tracked file list (adds workflow stubs, removes old entries). |
.rhiza/.rhiza-version |
Bumps Rhiza tooling version used by make sync/validate. |
.rhiza/.rhiza-version.rej |
Rejected-hunk artifact added (should not be committed). |
.rhiza/stubs/workflows/rhiza_ci.yml |
Adds CI reusable-workflow stub. |
.rhiza/stubs/workflows/rhiza_codeql.yml |
Adds CodeQL reusable-workflow stub. |
.rhiza/stubs/workflows/rhiza_marimo.yml |
Adds Marimo reusable-workflow stub. |
.rhiza/stubs/workflows/rhiza_book.yml |
Adds Book reusable-workflow stub. |
.rhiza/stubs/workflows/rhiza_release.yml |
Adds Release reusable-workflow stub. |
.rhiza/stubs/workflows/rhiza_weekly.yml |
Adds Weekly reusable-workflow stub. |
.rhiza/stubs/workflows/rhiza_sync.yml |
Adds Sync reusable-workflow stub (contains a doc link that doesn’t exist in this repo). |
.rhiza/tests/structure/test_template_bundles.py |
Enhances bundle validation logic (path resolution, cycle/conflict checks). |
.rhiza/tests/structure/test_template_bundles.py.rej |
Rejected-hunk artifact added (should not be committed). |
.rhiza/tests/api/test_weekly_workflow.py |
Removes structural job assertions; now conflicts with missing .github/workflows/rhiza_weekly.yml. |
.rhiza/tests/api/test_weekly_workflow.py.rej |
Rejected-hunk artifact added (should not be committed). |
.rhiza/tests/api/test_release_workflow.py |
Removes delegation/job assertions; now conflicts with missing .github/workflows/rhiza_release.yml. |
.rhiza/tests/api/test_release_workflow.py.rej |
Rejected-hunk artifact added (should not be committed). |
.rhiza/tests/api/test_ci_workflow.py.rej |
Rejected-hunk artifact added (should not be committed). |
.github/actions/configure-git-auth/README.md |
Deletes custom composite action documentation. |
.github/actions/configure-git-auth/action.yml |
Deletes custom composite action definition. |
Comments suppressed due to low confidence (1)
.rhiza/tests/api/test_release_workflow.py:60
- This test module hard-fails if
.github/workflows/rhiza_release.ymlis missing, but this repo currently only has the stub at.rhiza/stubs/workflows/rhiza_release.yml(no.github/workflows/rhiza_release.yml). Please update the tests to use the stub/materialized workflow path (or skip when absent) somake rhiza-test/make validatedon’t fail after the template sync changes.
def test_workflow_triggers_on_version_tags(self, workflow):
"""Workflow must trigger on version tags (v*)."""
triggers = workflow.get("on") or workflow.get(True) or {}
push = triggers.get("push", {})
tags = push.get("tags", [])
assert any("v*" in tag for tag in tags), "Workflow must trigger on v* tags"
def test_workflow_has_contents_write_permission(self, workflow):
"""Workflow must have contents: write permission to push CHANGELOG.md."""
permissions = workflow.get("permissions", {})
assert permissions.get("contents") == "write", "Workflow must have contents: write permission"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+70
| diff a/.rhiza/tests/api/test_ci_workflow.py b/.rhiza/tests/api/test_ci_workflow.py (rejected hunks) | ||
| @@ -3,50 +3,12 @@ | ||
| from __future__ import annotations | ||
|
|
||
| import json | ||
| -from pathlib import Path | ||
|
|
||
| -import pytest | ||
| -import yaml | ||
| from api.conftest import run_make | ||
|
|
||
| -WORKFLOW_PATH = Path(".github") / "workflows" / "rhiza_ci.yml" | ||
| MULTI_OS_MATRIX = 'RHIZA_CI_OS_MATRIX=["ubuntu-latest","windows-latest"]' | ||
|
|
||
|
|
||
| -def _load_workflow(root: Path) -> dict: | ||
| - """Load and parse the CI workflow YAML file.""" | ||
| - workflow_file = root / WORKFLOW_PATH | ||
| - if not workflow_file.exists(): | ||
| - pytest.fail(f"Workflow file not found: {workflow_file}") | ||
| - with open(workflow_file) as fh: | ||
| - return yaml.safe_load(fh) | ||
| - | ||
| - | ||
| -def test_ci_workflow_uses_generated_os_matrix(root): | ||
| - """CI test job must read its OS matrix from generate-matrix job output.""" | ||
| - workflow = _load_workflow(root) | ||
| - test_job = workflow["jobs"]["test"] | ||
| - matrix = test_job["strategy"]["matrix"] | ||
| - assert matrix["os"] == "${{ fromJson(needs.generate-matrix.outputs.os_matrix) }}" | ||
| - | ||
| - | ||
| -def test_ci_workflow_defines_os_matrix_output(root): | ||
| - """generate-matrix job must expose an os_matrix output from the os step.""" | ||
| - workflow = _load_workflow(root) | ||
| - outputs = workflow["jobs"]["generate-matrix"]["outputs"] | ||
| - assert outputs["os_matrix"] == "${{ steps.os.outputs.list }}" | ||
| - | ||
| - | ||
| -def test_ci_workflow_generates_os_matrix_via_make_target(root): | ||
| - """OS matrix generation must delegate to the dedicated Make target.""" | ||
| - workflow = _load_workflow(root) | ||
| - steps = workflow["jobs"]["generate-matrix"]["steps"] | ||
| - os_step = next((step for step in steps if step.get("id") == "os"), None) | ||
| - assert os_step is not None, "Expected a step with id='os' in generate-matrix job" | ||
| - run = os_step["run"] | ||
| - assert "ci-os-matrix" in run | ||
| - | ||
| - | ||
| def test_ci_os_matrix_make_target_defaults_to_ubuntu_when_env_missing(logger): | ||
| """ci-os-matrix target must default to ubuntu-latest when env value is absent.""" | ||
| result = run_make(logger, ["-f", ".rhiza/rhiza.mk", "RHIZA_CI_OS_MATRIX=", "ci-os-matrix"], dry_run=False) | ||
| @@ -63,17 +25,3 @@ def test_ci_os_matrix_make_target_can_be_configured(logger): | ||
| ) | ||
| assert result.returncode == 0 | ||
| assert json.loads(result.stdout.strip()) == ["ubuntu-latest", "windows-latest"] | ||
| - | ||
| - | ||
| -def test_ci_test_job_retries_uv_install_on_failure(root): | ||
| - """Test job must retry uv setup when the first attempt fails.""" | ||
| - workflow = _load_workflow(root) | ||
| - steps = workflow["jobs"]["test"]["steps"] | ||
| - | ||
| - install_step = next((step for step in steps if step.get("id") == "install-uv"), None) | ||
| - assert install_step is not None, "Expected an install-uv step in test job" | ||
| - assert install_step.get("continue-on-error") is True | ||
| - | ||
| - retry_step = next((step for step in steps if step.get("name") == "Retry uv installation"), None) | ||
| - assert retry_step is not None, "Expected a retry step for uv setup in test job" | ||
| - assert retry_step.get("if") == "steps.install-uv.outcome == 'failure'" |
Comment on lines
+1
to
+5
| diff a/.rhiza/tests/api/test_weekly_workflow.py b/.rhiza/tests/api/test_weekly_workflow.py (rejected hunks) | ||
| @@ -106,99 +106,6 @@ class TestWeeklyWorkflowStructure: | ||
|
|
||
| # --- jobs present --- | ||
|
|
Comment on lines
+1
to
+5
| diff a/.rhiza/tests/api/test_release_workflow.py b/.rhiza/tests/api/test_release_workflow.py (rejected hunks) | ||
| @@ -63,93 +63,7 @@ class TestReleaseWorkflowStructure: | ||
| tags = push.get("tags", []) | ||
| assert any("v*" in tag for tag in tags), "Workflow must trigger on v* tags" | ||
|
|
Comment on lines
+1
to
+5
| diff a/.rhiza/tests/structure/test_template_bundles.py b/.rhiza/tests/structure/test_template_bundles.py (rejected hunks) | ||
| @@ -14,6 +14,30 @@ import pytest | ||
| import yaml | ||
|
|
||
|
|
Comment on lines
+1
to
+4
| diff a/.rhiza/.rhiza-version b/.rhiza/.rhiza-version (rejected hunks) | ||
| @@ -1 +1 @@ | ||
| -0.14.1 | ||
| +0.15.0 |
Comment on lines
89
to
95
| "workflow must support manual dispatch via workflow_dispatch" | ||
| ) | ||
|
|
||
| # --- reusable workflow delegation --- | ||
|
|
||
| def test_single_weekly_job(self, workflow): | ||
| """Workflow must define exactly one job named 'weekly'.""" | ||
| jobs = workflow.get("jobs", {}) | ||
| assert list(jobs.keys()) == ["weekly"], f"Expected ['weekly'], got: {list(jobs.keys())}" | ||
|
|
||
| def test_weekly_job_uses_reusable_workflow(self, workflow): | ||
| """Weekly job must delegate to the canonical rhiza reusable workflow.""" | ||
| job = workflow["jobs"]["weekly"] | ||
| uses = job.get("uses", "") | ||
| assert uses.startswith(REUSABLE_WORKFLOW), f"weekly job must use {REUSABLE_WORKFLOW}@<version>, got: {uses}" | ||
|
|
||
| def test_weekly_job_inherits_secrets(self, workflow): | ||
| """Weekly job must pass secrets via 'secrets: inherit'.""" | ||
| job = workflow["jobs"]["weekly"] | ||
| assert job.get("secrets") == "inherit", "weekly job must set secrets: inherit" | ||
| # --- jobs present --- | ||
|
|
||
|
|
||
| # --------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make syncGenerated with Claude Code