Skip to content

docs: fix pre-release findings in docs and notes - #143

Merged
uniqueg merged 5 commits into
devfrom
docs/pre-release-findings
Oct 21, 2026
Merged

uniqueg merged 5 commits into
devfrom
docs/pre-release-findings

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Closes #134

Summary

Fixes the documentation findings of the v0.3.0 pre-release review in the docs, the chart README and the 0.3.0 release notes:

  1. Release notes footer: links the compare view of all changes since the last deployed version (19f664f...v0.3.0) instead of a PR range that goes stale.
  2. Problem details: only errors handled by the app are problem details; Gunicorn rejects malformed requests itself, with HTML (API page, release notes).
  3. Group roles: warning that members of an owner group see the IDs and names of all users with roles and can remove other owners; don't grant roles to broad (VO-wide) groups (Access control, release notes).
  4. Revocation delay: new section "Group membership changes": FOCA caches user info per token for up to cache_ttl (300 s), and validate_userinfo or a lower cache_ttl shortens it (Access control, chart README, release notes).
  5. Admin API exposure: the chart's Ingress routes /, including /admin/access-control/, and how to keep it off the internet (chart README, Operations, release notes).
  6. Installing the chart: installs and upgrades show the released chart first; the repository folder needs cloudRegistry.tag. The chart README's links are absolute, since it is packaged with the chart. docs/hooks.py maps links to the Read the Docs pages back to pages of the docs, so the strict build still checks them, and maps GitHub blob/dev links to the built commit. Relative links now fail the strict build, and a test checks that the README has none.
  7. Older images: the chart supports only images built with FOCA 0.15 or later; the hint about config.custom.endpoints.service_info is gone.
  8. Startup check: reworded; it covers only stored services without a key, and the Upgrading page says what happens to the others.

Development docs also cover:

Verification

  • mkdocs build --strict (Python 3.12): passes. Adding a relative link and a broken anchor to deployment/README.md fails it, as intended.

  • pytest tests/test_docs_hooks.py: 18 passed.

  • Full suite against MongoDB 7.0: coverage run --source=cloud_registry -m pytest: 586 passed, 145 skipped (chart tests: no Helm locally), 100% coverage.

  • ruff check ., ruff format, mypy: clean. The other pre-commit hooks run in CI.

  • CI: all checks pass (static analysis, tests on 3.10 and 3.12, Helm chart, docs build, Compose smoke test, Read the Docs preview).

  • Review: adversarial-reviewer and quality-reviewer, two rounds. Fixed in round 1:

    • OpenShift: with the Ingress disabled, the Route serves all paths.
    • A pinned cloudRegistry.tag overrides the image of a released chart.
    • X.Y.Z placeholders in the upgrade examples.
    • Tests and wording.

    Round 2: no findings.

Declined review findings

  • Versioned links in the packaged README. The chart README packaged in a release links to the latest docs and to blob/dev files. Rewriting these links per release would need a change to the release workflow, which is beyond this docs issue; the rendered docs already pin GitHub links to the built commit. Worth a separate issue if wanted.
  • A test that each docs link resolves. The strict MkDocs build in CI already fails on missing pages and anchors (verified by adding a broken link and a broken anchor).
  • Commit type docs: for the hook change. The hook is part of the docs build.
  • Bare SHA in the compare link of the 0.3.0 notes. The link text already names the range ("changes since the last deployed version").

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Address pre-release documentation findings across the application, Helm chart, and 0.3.0 release notes.

Bug Fixes:

  • Correct documentation about application-handled errors versus Gunicorn-generated HTML errors.
  • Clarify access-control risks, group-membership revocation delays, ingress exposure, image compatibility, and startup validation behavior.

Enhancements:

  • Update the Helm chart README with clearer release installation and upgrade guidance and absolute links suitable for packaged charts.
  • Improve documentation link handling and validation so strict MkDocs builds check embedded chart README links.
  • Document actionlint usage, Helm version coordination, and compare-view links for curated release notes.

Documentation:

  • Revise the access-control, API, operations, upgrade, deployment, development, and 0.3.0 release documentation to address pre-release review findings.

Tests:

  • Extend documentation hook tests to cover absolute documentation links, GitHub reference rewriting, fenced code blocks, and the absence of relative README links.

uniqueg and others added 4 commits October 21, 2026 19:29
- Chart README: install the released chart first, require
  cloudRegistry.tag from the repository folder, support only images
  built with FOCA 0.15 or later, say that the Ingress routes the admin
  API and how to keep it off the internet.
- Links of the chart README are absolute, as it is packaged with the
  chart; the docs hook maps them back to pages of the docs (checked by
  the strict build) and to files at the built commit. Relative links
  now fail the strict build.
- Access control: warn that owner groups see the names of all users
  with roles and can remove other owners; document the delay before
  group membership changes apply (user info cache).
- Errors: only errors handled by the app are problem details.
- Upgrading: the startup check covers only services without a key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Link the compare view instead of a stale range of pull requests, limit
the problem details claim to errors handled by the app, and add the
findings on group roles, the user info cache, the routed admin API and
the startup check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Helm version of both workflows is bumped by hand, together;
actionlint checks the workflows (pre-commit); curated release notes
link the compare view.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Use X.Y.Z placeholders for released charts in the upgrade docs.
- Say that a pinned image tag overrides the released chart's image.
- On OpenShift, the Route serves all paths: block the admin API in
  front of the router.
- Re-wrap and reword paragraphs; name the right section.
- Tests: rewrite of links to other refs and repository URLs with a
  trailing slash; no links to other versions of the docs.

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

sourcery-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR incorporates v0.3.0 pre-release findings across the chart README, user and maintainer documentation, release notes, and documentation tooling, with emphasis on accurate security behavior, deployment guidance, packaged-link validation, and reproducible release practices.

Sequence diagram for cached group membership changes

sequenceDiagram
    actor User
    participant Registry
    participant FOCA
    participant LSLogin

    User->>Registry: API request with token
    Registry->>FOCA: validate token and read user info
    alt Cached user info
        FOCA-->>Registry: Cached group memberships
    else validate_userinfo enabled or cache expired
        FOCA->>LSLogin: Fetch user info
        LSLogin-->>FOCA: Current group memberships
        FOCA-->>Registry: Current group memberships
    end
    Registry-->>User: Apply roles from group memberships
Loading

Flow diagram for packaged chart documentation links

flowchart LR
    README[deployment/README.md] --> Hook[docs/hooks.py adapt_links]
    Hook -->|Docs URLs| MkDocs[MkDocs strict build]
    Hook -->|GitHub blob/dev URLs| Commit[Built Git commit URLs]
    MkDocs --> Docs[Read the Docs pages]
Loading

File-Level Changes

Change Details Files
Clarifies security and operational behavior around access control, request errors, ingress exposure, membership revocation, and startup validation.
  • Documents owner-group privileges and cautions against broad role-bearing groups.
  • Explains FOCA token user-info caching, configuration controls, and revocation delays.
  • Limits problem-detail claims to app-handled errors and documents Gunicorn HTML responses.
  • Describes ingress exposure of the permissions API, OpenShift behavior, and mitigation options.
  • Clarifies which stored services are checked during startup and how keyed services are handled.
docs/access-control.md
docs/api.md
docs/operations.md
docs/upgrading.md
docs/releases/0.3.0.md
deployment/README.md
Reworks chart installation and upgrade documentation to use released chart packages by default while documenting repository-based development deployments.
  • Adds release chart install and upgrade commands with versioned package URLs.
  • Requires repository chart users to set cloudRegistry.tag and explains image tag precedence.
  • Updates chart compatibility guidance to FOCA 0.15+ and removes obsolete service-info configuration advice.
  • Makes packaged README links absolute and updates deployment, ingress, server, and upgrade references.
deployment/README.md
Updates documentation build link adaptation so the packaged chart README remains usable while strict MkDocs validation still checks documentation links.
  • Maps Read the Docs URLs to local Markdown pages and GitHub dev links to the built commit.
  • Leaves unsupported relative links unchanged so strict builds fail rather than silently accepting broken package links.
  • Adds coverage for URL adaptation, fenced code handling, reference rewriting, and README absolute-link enforcement.
docs/hooks.py
tests/test_docs_hooks.py
Improves maintainer guidance for release and CI workflows.
  • Documents compare-view links for curated release notes.
  • Requires Helm versions in checks and release workflows to be bumped together.
  • Documents the actionlint pre-commit hook and ShellCheck behavior.
docs/development.md

Assessment against linked issues

Issue Objective Addressed Explanation
#134 Correct the 0.3.0 release notes and documentation on the compare range, app-generated problem details, owner-group permissions, group-membership revocation delay, and exposure of the admin API. ✅
#134 Fix deployment documentation and the packaged chart README: lead with installing a released chart, require an image tag for the repository-folder variant, use working absolute cross-document links, and clarify supported image versions. ✅
#134 Clarify that startup URL validation applies only to stored services without a key, and ensure the strict MkDocs build passes. ✅

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 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3b51c36) to head (cef724b).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #143   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          737       737           
=========================================
  Hits           737       737           

☔ 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 21, 2026 17:53

@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 reviewed your changes and they look great!

Sourcery assessment

Approved.


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

@uniqueg
uniqueg merged commit ab5836d into dev Oct 21, 2026
11 checks passed
@uniqueg
uniqueg deleted the docs/pre-release-findings branch October 21, 2026 18:03
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: pre-release findings in docs and notes

1 participant