Repository navigation
ci: prepare for the repository name protes - #358
Conversation
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]>
# Conflicts: # tests/test_workflows.py
Reviewer's GuidePrepares all repository URLs and documentation for the planned Sequence diagram for case-aware repository link rewritingsequenceDiagram
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/
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
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]>
There was a problem hiding this comment.
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 |
Refs #356 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Prepares the repository for the planned case-only rename
proTES→protes. Everything works before and after the rename.scripts/chart_readme.py(rewrites the chart README's links toblob/dev/for releases) anddocs/hooks.py(adapts them for the docs) now match the repository's URL in any case, but not the branch.UNVERSIONEDwas already case-insensitive. Tests cover both cases.docs/operations.md): the release commands keepelixir-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 fordevimages accept both names and the old workflow filechecks.yaml:gh attestation verify --owner … --cert-identity-regex …andcosign verify --certificate-identity-regexp ….tests/test_workflows.pynow also checks the repository name in the release commands against the version inCITATION.cff(LAST_RELEASE_PROTES = 0.3.0).CITATION.cffrepository-code,pyproject.tomlURLs, Dockerfile OCI labels,mkdocs.ymlrepo_url/repo_name,pro_tes/config.yamldocumentationUrl, README badges (incl. Codecov), clone instructions (cd protes), and links in the docs and chart README. The product name "proTES" in prose stays.github.repository_owner(already lower case), or two values that GitHub fills in itself.Closes #356
Verification
pytestwith coverage: 1065 passed, 169 skipped (Helm/MongoDB tests, which run in CI); coverage 100 %pre-commit run --all-files: passed, exceptgitleaksandactionlint, which couldn't be installed in the sandbox (no workflow changes); both run in CImkdocs build --strict: passeddevcommands against both certificate identities, andgh attestation verify --helpfor the flagsReview
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
ghflag was corrected,checks.yamlwas added, and test clarity improved.Declined review findings
None.
Notes for the maintainer
LAST_RELEASE_PROTESintests/test_workflows.py. WhenCITATION.cffmoves past 0.3.0, the test requires the release commands to sayprotes.🤖 Generated with Claude Code
Summary by Sourcery
Prepare the project for the
proTEStoprotesrepository rename while preserving compatibility with existing links, release signatures, and verification procedures.Enhancements:
proTEStoprotes.devbranch exactly.Tests: