Skip to content

docs: close the 0.5.0 review gaps - #251

Merged
uniqueg merged 7 commits into
devfrom
docs/review-gaps
Oct 26, 2026
Merged

uniqueg merged 7 commits into
devfrom
docs/review-gaps

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Closes #248

Summary

Closes the documentation, check and test gaps that the 0.5.0 pre-release review found, item by item:

  • Signature verification (docs/operations.md): deliberately unchanged in this PR. {{ version }} still renders as 0.4.0 from CITATION.cff, and 0.4.0 was signed by release.yaml, so naming release.yml now would break the commands for the current release.
    • Instead, test_verification_signer_workflow now enforces the change at the CITATION bump. Once the version is past 0.4.0, the commands must name release.yml, and the note below them must say that 0.4.0 was signed by release.yaml. So the release-prep PR can't ship without both.
  • deployment/README.md: new "To app version 0.5.0" section:
    • check the stored environments, and set config.custom.endpoints.services.environments if needed;
    • add the rules add-service-types and list-approvals to list-form policy overlays;
    • restart once after the rollout (or upgrade with the app scaled to 0) so that the type backfill runs;
    • switch to moderated only after that.
  • docs/upgrading.md: new "From 0.4.0" section with the same steps, plus:
    • the pre-upgrade query db.services.distinct("environment");
    • the timestamps change;
    • why moderated waits for the full rollout: a user's pending type can hide another user's service that a 0.4.0 pod registered.
  • docs/access-control.md: the example that restricts registration also restricts add-service-types, and points to mode controlled for admins-only types.
  • docs/api.md:
    • New section "Deviations from the GA4GH specification": stored types, createdAt/updatedAt, the enforced environment, and hidden pending services and types.
    • Documents that changing a service back to its previous type leaves an unused pending type, like a failed registration.
  • Startup warning: without admin groups, the warning now also says that nobody can remove types, approve them in mode moderated, or add them in mode controlled.
  • Tests: pending-service visibility for a maintainer and for a role granted to a group (positive and negative). The maintainer also gets 409 on updates.
  • CI and release: new scripts/release_notes.py require <version> (unit-tested). The release readiness check and the release workflow now fail without docs/releases/<version>.md once notes of any other release exist, instead of checking the notes only if they exist.
    • docs/development.md now says to merge the notes together with the CITATION bump.

Not touched: service_types.py, server.py, docs/configuration.md and the API spec (#245, #246, #247 are being worked on in parallel). The configuration page's claim that older versions store new types as approved is part of #246.

Effect on the release preparation

  • After this PR, a CITATION.cff bump to 0.5.0 without docs/releases/0.5.0.md only warns in "Release readiness" on its PR, but fails on dev after the merge. The 0.5.0 prepare PR must therefore add the notes in the same change.
  • The prepare PR must also change the four signer names in docs/operations.md to release.yml and reword the note, or test_verification_signer_workflow fails.

Verification

  • pre-commit run --all-files: all hooks pass. The manual-stage gitleaks-all was not run.

  • coverage run --source cloud_registry,scripts -m pytest: 1235 passed, 228 skipped (Helm is not installed locally), coverage 100%.

  • The same suite against MongoDB 7.0 (MONGODB_TEST_URI, mongo:7.0 in Docker), on the branch before review fixes that touched only scripts, docs and tests: 1226 passed, 228 skipped.

  • mkdocs build --strict: passes, and the new anchors (from-040, deviations-from-the-ga4gh-specification) resolve.

  • I extracted the release workflow's "Check release notes" step and ran it locally:

    • 0.4.0: passes.
    • 0.5.0 and 0.5.0rc1 without notes: fail with ::error::docs/releases/<v>.md is missing ….
    • A repository without any notes: passes.
  • Not done: a fork dry run of release.yml, which the rules require after changes to the release workflow. It should happen before the 0.5.0 tag; the changed step only adds the require call before the existing checks.

  • CI on 6bda6a1: every check passed (CI passed, Lint, Docs, Chart, both Test jobs, Smoke test, Scan image, Release readiness, CodeQL, Read the Docs); the image pushes are skipped on PRs.

Review

Two rounds of adversarial-reviewer and quality-reviewer.

Round 1:

  • Medium: the docs would have shown failing 0.4.0 verification commands. Fixed by enforcing the change at the bump, see above.
  • Medium: the notes rule was duplicated as shell in both workflows and untested. Moved into release_notes.py require with tests.
  • Medium: badly wrapped paragraphs. Rewrapped.
  • Low: the constant is now private, and the docstring tidied.

Round 2:

  • Medium: the release steps didn't say that notes must be merged with the CITATION bump. Documented.
  • Low: the manual command list didn't say when check applies (comment added), and the docs worded the rule too narrowly (now "once any other release has notes").

Sourcery: two findings, both fixed in 6bda6a1. require now counts only files named like release notes, and the signer test expects all four signer URLs. Sourcery approved after that.

Declined review findings

  • The YAML example line in docs/access-control.md is over 80 characters. There is no line-length check for docs, and the neighbouring rules are as long.
  • Shortening the chart README's 0.5.0 section to a link: it is short already, and the packaged chart's README must stand on its own.

🤖 Generated with Claude Code

uniqueg and others added 6 commits October 26, 2026 01:27
Add "From 0.4.0" to the upgrading page (check the stored environments
first, list-form policies, timestamps, restart after the rollout and
switch to moderated only then) and "To app version 0.5.0" to the
chart README.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
List the deviations from the GA4GH specification in the API docs,
document that changing a service back to its previous type leaves an
unused pending type, and restrict adding types in the example that
restricts registration (or point to mode controlled).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Without admin groups, the startup warning also says that nobody can
remove types, approve them in mode moderated or add them in mode
controlled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Test that maintainers and members of groups with a role on a pending
service see it, and users without a role don't.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The release workflow and the release readiness check fail without
docs/releases/<version>.md once notes of an earlier release exist,
instead of checking the notes only if they exist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The verification commands name release.yaml while CITATION.cff has
0.4.0; once it is bumped, they must name release.yml (#234), and the
note below them that 0.4.0 was signed by release.yaml, so the release
preparation can't forget either.

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

sourcery-ai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Closes the 0.5.0 pre-release review gaps by documenting migration and API behavior, clarifying service-type access control, enforcing release-note and signer readiness in CI and release workflows, and adding tests for pending-service permissions and administrative warnings.

Sequence diagram for release readiness validation

sequenceDiagram
    participant CI
    participant ReleaseNotes as release_notes.py
    participant Repository
    CI->>ReleaseNotes: require(version)
    ReleaseNotes->>Repository: Check docs/releases/<version>.md
    alt Notes exist
        Repository-->>ReleaseNotes: Release notes found
        ReleaseNotes-->>CI: Success
    else No notes exist for any release
        Repository-->>ReleaseNotes: No curated notes
        ReleaseNotes-->>CI: Success
    else Notes required but missing
        Repository-->>ReleaseNotes: Other release notes exist
        ReleaseNotes-->>CI: Error: notes missing
    end
Loading

Flow diagram for upgrading from app version 0.4.0

flowchart TD
    A[Check stored service environments] --> B[Allow additional environments if needed]
    B --> C[Add add-service-types and list-approvals policy rules]
    C --> D[Upgrade with app scaled to 0 or restart after rollout]
    D --> E[Backfill stored service types]
    E --> F[Enable moderated service-type mode later]
Loading

File-Level Changes

Change Details Files
Adds version 0.5.0 migration guidance across deployment, upgrade, access-control, and API documentation.
  • Documents environment validation, policy overlay updates, type backfill, restart requirements, timestamps, and delayed moderated mode.
  • Explains stored service types, registry-managed timestamps, enforced environments, pending-resource visibility, and unused pending types.
  • Extends registration policy examples to cover service-type creation and controlled mode.
  • Updates release-development guidance to merge curated notes with citation version bumps.
deployment/README.md
docs/access-control.md
docs/api.md
docs/development.md
docs/upgrading.md
Strengthens release and verification checks so release preparation cannot omit required documentation or signer updates.
  • Adds a tested release_notes.py require command requiring notes after curated notes have been introduced.
  • Invokes release-note validation from CI release readiness and the release workflow.
  • Makes signer documentation tests enforce release.yml and the historical 0.4.0 release.yaml note after a version bump.
.github/workflows/ci.yml
.github/workflows/release.yml
scripts/release_notes.py
tests/test_release_notes.py
tests/test_workflows.py
Clarifies service-type administration limitations and expands coverage of pending-service permissions.
  • Adds mode-specific startup warning text when no admin group exists.
  • Verifies maintainers and group-granted roles can view pending services while unauthorized users cannot.
  • Verifies maintainers receive conflict responses when attempting updates to pending services.
cloud_registry/ga4gh/registry/permissions.py
tests/test_app.py
tests/test_service_types.py

Assessment against linked issues

Issue Objective Addressed Explanation
#248 Close the documentation gaps for the 0.5.0 upgrade, access control, API behavior, service-type lifecycle, and startup warnings, including updating the signature-verification note. ❌ The upgrade, access-control, API, lifecycle, and warning documentation is updated. However, docs/operations.md is unchanged: the PR defers rewording its note to a future version bump, while the issue asks this PR to say that 0.4.0 was signed by release.yaml.
#248 Add tests for pending-service visibility to maintainers and to users with a role granted to their group. ✅
#248 Require curated release notes for releases after the first release with notes, in release readiness checks and the release workflow. ✅

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

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (de519d6) to head (6bda6a1).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #251   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines         1603      1623   +20     
=========================================
+ Hits          1603      1623   +20     

☔ 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 26, 2026 01:14

@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="scripts/release_notes.py" line_range="568" />
<code_context>
+    notes = releases / f"{version}.md"
+    if notes.is_file():
+        return None
+    others = [path for path in releases.glob("*.md") if path.name != notes.name]
+    return notes if others else None
+
</code_context>
<issue_to_address>
**First release blocked by unrelated Markdown**

When the requested release note is missing and the releases directory contains an unrelated top-level Markdown file, `missing_notes` treats every other `*.md` file as a prior release note, so `require` exits 1 and blocks release readiness and tagging even when this is the first release.

Count only versioned release-note files when deciding whether notes from an earlier release exist.
</issue_to_address>

### Comment 2
<location path="tests/test_workflows.py" line_range="81" />
<code_context>
     assert signers
-    assert set(signers) == {expected}
+    if Version(version) <= LAST_RELEASE_YAML:
+        assert set(signers) == {"release.yaml"}
+    else:
+        assert set(signers) == {"release.yml"}
</code_context>
<issue_to_address>
**Missing signer checks pass tests**

When one or more of the four verification commands loses its signer-workflow or certificate-identity URL while at least one command still matches, `assert signers` requires only one regex match, and `set(signers)` checks only matched workflow names, so missing signer checks pass unnoticed.

Assert that each of the four verification commands has matching signer-workflow and certificate-identity URLs.

Also at `tests/test_workflows.py:83`.
</issue_to_address>

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: scripts/release_notes.py:568, tests/test_workflows.py:81


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

Comment thread scripts/release_notes.py Resolved
Comment thread tests/test_workflows.py Resolved
missing_notes() counts only files named like notes (<version>.md), not
other Markdown files in docs/releases/, and the signer test expects all
four signer URLs of the verification commands.

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.

Sourcery assessment

Approved.

@uniqueg
uniqueg merged commit d7fed28 into dev Oct 26, 2026
19 checks passed
@uniqueg
uniqueg deleted the docs/review-gaps branch October 26, 2026 01:28
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.

docs: close the 0.5.0 review gaps

1 participant