Skip to content

ci: prepare for the repository name protes - #358

Merged
uniqueg merged 8 commits into
devfrom
ci/356-repo-name
Oct 31, 2026
Merged

uniqueg merged 8 commits into
devfrom
ci/356-repo-name

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Prepares the repository for the planned case-only rename proTES → protes. Everything works before and after the rename.

  • Link rewrites and checks: scripts/chart_readme.py (rewrites the chart README's links to blob/dev/ for releases) and docs/hooks.py (adapts them for the docs) now match the repository's URL in any case, but not the branch. UNVERSIONED was already case-insensitive. Tests cover both cases.
  • Verification docs (docs/operations.md): the release commands keep elixir-cloud-aai/proTES, because releases up to 0.3.0 are signed with that name. The docs explain that signatures keep the case of the name the repository had when the workflow ran. New commands for dev images accept both names and the old workflow file checks.yaml: gh attestation verify --owner … --cert-identity-regex … and cosign verify --certificate-identity-regexp …. tests/test_workflows.py now also checks the repository name in the release commands against the version in CITATION.cff (LAST_RELEASE_PROTES = 0.3.0).
  • Slugs lower-cased: CITATION.cff repository-code, pyproject.toml URLs, Dockerfile OCI labels, mkdocs.yml repo_url/repo_name, pro_tes/config.yaml documentationUrl, README badges (incl. Codecov), clone instructions (cd protes), and links in the docs and chart README. The product name "proTES" in prose stays.
  • No change needed in workflows: they compare only github.repository_owner (already lower case), or two values that GitHub fills in itself.

Closes #356

Verification

  • pytest with coverage: 1065 passed, 169 skipped (Helm/MongoDB tests, which run in CI); coverage 100 %
  • pre-commit run --all-files: passed, except gitleaks and actionlint, which couldn't be installed in the sandbox (no workflow changes); both run in CI
  • mkdocs build --strict: passed
  • Checked the regex of the dev commands against both certificate identities, and gh attestation verify --help for the flags
  • CI: all checks passed (CI passed, Read the Docs, CodeQL)

Review

Full review: adversarial-reviewer and quality-reviewer, then a second adversarial round. All findings were fixed: the rename was no longer presented as done, matching was restricted to the repository URL, the gh flag was corrected, checks.yaml was added, and test clarity improved.

Declined review findings

None.

Notes for the maintainer

  • Rename before the 0.4.0 release. If a release ships before the rename, raise LAST_RELEASE_PROTES in tests/test_workflows.py. When CITATION.cff moves past 0.3.0, the test requires the release commands to say protes.

🤖 Generated with Claude Code

Summary by Sourcery

Prepare the project for the proTES to protes repository rename while preserving compatibility with existing links, release signatures, and verification procedures.

Enhancements:

  • Prepare repository URLs, metadata, documentation, and deployment references for the case-only rename from proTES to protes.
  • Make repository link rewriting and documentation adaptation accept either repository-name casing while matching the dev branch exactly.
  • Document release and development-image verification across the repository and workflow-name transitions, with tests enforcing the correct historical release identities.

Tests:

  • Extend link and workflow tests to cover mixed-case repository URLs, branch matching, and historical signature verification requirements.

uniqueg and others added 5 commits October 31, 2026 17:33
GitHub ignores the case of repository names, and the repository is
about to be renamed from proTES to protes. The rewrites of links to
branch dev in the chart's README (release workflow) and in the docs
hooks now match the repository's name in any case, and the slugs of
the scripts are lower case.

Refs #356

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lower-case the repository's slug in links, badges (incl. Codecov),
metadata (CITATION.cff, pyproject.toml, image labels, mkdocs.yml) and
the clone instructions, ahead of the rename from proTES to protes;
GitHub ignores the case, so both work. The verification commands of
images and charts keep elixir-cloud-aai/proTES for releases up to
0.3.0, whose signatures name it in that case, and the docs explain
which form applies when; the workflow test checks that the commands
use the form of the version in CITATION.cff.

Closes #356

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Match only the repository's URL in any case in the docs hooks, as in
chart_readme.py, not the branch. Don't present the rename as done in
the verification docs, and give commands for images of dev that
accept both forms of the repository's name.

Refs #356

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use gh's --cert-identity-regex, and accept the old workflow file
checks.yaml.

Refs #356

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Prepares all repository URLs and documentation for the planned proTES to protes rename, while preserving historical release-signature identities and adding case-aware link rewriting, verification guidance, and regression tests.

Sequence diagram for case-aware repository link rewriting

sequenceDiagram
    participant Input as Markdown link
    participant Chart as chart_readme.py
    participant Docs as docs/hooks.py
    participant Output as Rewritten link
    Input->>Chart: version_links(markdown, tag)
    Chart->>Chart: FILES_DEV.match repository URL case-insensitively
    Chart-->>Output: Replace blob/dev/ with blob/tag/
    Input->>Docs: adapt_link(target, repo_url, ref)
    Docs->>Docs: re.match repository URL case-insensitively
    Docs-->>Output: Replace blob/dev/ with blob/ref/
Loading

File-Level Changes

Change Details Files
Make repository references use the lower-case slug ahead of the planned case-only rename.
  • Updated metadata, container labels, MkDocs configuration, application URLs, badges, clone commands, and documentation links.
  • Kept the product name proTES in prose while lower-casing repository URL slugs and local directory instructions.
CITATION.cff
Dockerfile
README.md
deployment/README.md
docs/api.md
docs/changelog.md
docs/configuration.md
docs/contributing.md
docs/development.md
docs/getting-started.md
docs/index.md
mkdocs.yml
pro_tes/config.yaml
pyproject.toml
Make generated and rendered link rewriting resilient to the repository’s case change without broadening branch matching.
  • Match the repository URL case-insensitively while requiring the exact dev branch in chart README and documentation hooks.
  • Update release-notes repository constants and add coverage for mixed-case repository URLs, nonmatching branches, and unrelated repositories.
scripts/chart_readme.py
scripts/release_notes.py
docs/hooks.py
tests/test_chart_readme.py
tests/test_docs_hooks.py
tests/test_release_notes.py
Document and test signature verification across historical repository and workflow names.
  • Preserve proTES in release verification commands through 0.3.0 and explain that signing identities retain the repository case at workflow time.
  • Add dev image verification commands accepting both repository cases and both ci.yml/checks.yaml identities.
  • Tie workflow and repository expectations to the version in CITATION.cff using separate historical cutoffs.
docs/operations.md
tests/test_workflows.py

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (37428b1) to head (a4293e2).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #358   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2232      2234    +2     
=========================================
+ Hits          2232      2234    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 31, 2026 17:41

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tests/test_workflows.py" line_range="87" />
<code_context>
     signers = re.findall(
-        r"proTES/\.github/workflows/(release\.ya?ml)",
-        (ROOT / "docs" / "operations.md").read_text(),
+        r"elixir-cloud-aai/([^/\s]+)/\.github/workflows/(release\.ya?ml)", text
     )
     assert signers
</code_context>
<issue_to_address>
**Malformed signer identities go unnoticed**

When the release `--certificate-identity` is malformed so it no longer matches the regex, but `--signer-workflow` remains correct, `test_verification_signer_workflow` only checks paths matched by this broad text search, so a malformed `--certificate-identity` that no longer matches the pattern is ignored while the valid `--signer-workflow` still satisfies the assertions; the broken cosign command passes.

Assert the expected workflow and repository separately for each verification argument, rather than collecting any matching path from the document.
</issue_to_address>

### Comment 2
<location path="tests/test_workflows.py" line_range="91-93" />
<code_context>
     assert signers
-    assert set(signers) == {expected}
+    assert set(signers) == {(repository, workflow)}
+    repositories = re.findall(r"--repo elixir-cloud-aai/(\S+)", text)
+    assert repositories
+    assert set(repositories) == {repository}


</code_context>
<issue_to_address>
**Correct docs fail repository check**

When the documented `--repo` option is followed by a shell continuation backslash, `test_verification_signer_workflow` captures the shell continuation backslash with `\S+` on line 91, so line 93 compares `proTES\` with `proTES` and fails even when the documentation is correct.

Capture the repository value up to whitespace or a backslash, or strip a trailing continuation backslash before comparing.
</issue_to_address>

Linked issues

#356 ci: prepare for the repository name protes · 5 of 5 met

# Requirement Status Notes
1 Verification commands must say which repository name applies to signatures before and after the rename. ✅ Met The operations documentation explains the name and workflow-file changes for release signatures and provides dev-image verification commands that accept both names; the workflow test checks the release commands against the version in CITATION.cff.
2 Link checks and rewrites should accept both cases of the repository slug. ✅ Met The chart README and docs rewrites match the repository URL case-insensitively while matching the branch exactly; release-note link checks are case-insensitive. Tests cover mixed-case links and branch handling.
3 Lower-case repository slugs in metadata and links, including badges and documentation. ✅ Met The repository URLs and slugs are lower-cased in the cited metadata, README, deployment guide, docs, configuration, and script constants; historical signature identities retain their original case.
4 Keep the product name “proTES” in prose. ✅ Met Product-name uses remain unchanged, including the title and prose in CITATION.cff.
5 Everything should work before and after the rename, with tests for case-insensitive comparisons. ✅ Met The link rewrite tests exercise both repository-name cases, and release-note checks include both lowercase and mixed-case repository URLs.

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: tests/test_workflows.py:87, tests/test_workflows.py:93


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread tests/test_workflows.py Resolved
Comment thread tests/test_workflows.py Resolved
Check every value of --repo, --signer-workflow and
--certificate-identity in the verification commands separately, so
that a malformed one is not hidden by another (Sourcery).

Refs #356

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linked issues

#356 ci: prepare for the repository name protes · 3 of 4 met

# Requirement Status Notes
1 Document which repository and workflow identities apply when verifying images and charts signed before and after the rename. 🟡 Partly met The image guidance explains the old and new identities, but the Helm chart verification commands still hardcode proTES and release.yaml without explaining how to verify post-rename chart releases.
2 Make link checks and rewrites accept both repository-name cases, while matching the dev branch exactly. ✅ Met The chart README and docs rewrites match repository URLs case-insensitively and retain exact branch matching; release-note checks already use case-insensitive matching. Tests cover both cases.
3 Lower-case repository slugs in metadata and links, including the listed files, badges, and docs. ✅ Met Repository URLs and metadata are lower-cased; historical signature identities remain in their original case where needed.
4 Keep the product name proTES in prose. ✅ Met

Comment thread docs/operations.md Resolved
@uniqueg
uniqueg merged commit bbd5dc5 into dev Oct 31, 2026
19 checks passed
@uniqueg
uniqueg deleted the ci/356-repo-name branch October 31, 2026 18:07
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.

ci: prepare for the repository name protes

1 participant