Skip to content

build: prepare the 0.22.0 release - #754

Merged
uniqueg merged 3 commits into
devfrom
release/0.22.0
Nov 9, 2026
Merged

uniqueg merged 3 commits into
devfrom
release/0.22.0

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Release preparation for FOCA 0.22.0 (no tag):

  • CITATION.cff: version 0.22.0, date-released 2026-11-09 (set with scripts/citation.py; if the tag slips, set the date again before tagging).
  • docs/releases/0.22.0.md: the curated notes now cover every pull request merged since v0.21.0. Following the pre-release review:
    • Breaking changes: all deprecations (app.config.foca, www_authenticate, raw Werkzeug classes in exception maps, x-body-name: permission); the new default detail of responses to invalid requests, which also replaces the detail of BadRequestProblem/RequestValidationProblem that apps raise (use InvalidFieldsProblem), with the opt-out exceptions.validation_reasons; the INFO log format (route templates, reasons at DEBUG); routes that aren't operations.
    • The Features bullet on invalid fields no longer says that detail stays as before.
    • New Features, Security, Fixes, Documentation and Maintenance bullets.
    • Security bullets now say that names chosen by clients (unknown parameters and body keys) still show in detail and in the INFO record Request rejected.
  • docs/migration-0.22.md:
    • New section "Routes that aren't operations" for the route-table behaviour changes of refactor(api): check routes from specs #707.
    • The intro names the changed defaults; "Nothing breaks in this release/in 0.22" is reworded.
    • The caveat on client-chosen names.
    • Removes the wrong example "a missing parameter" (missing parameters are listed with code required).
  • docs/configuration/exceptions.md: one mention of 0.22.0 that tests/test_version_mentions.py rejects once the citation says 0.22.0, reworded.

The version itself comes from the git tag (setuptools-scm); nav and changelog entries were already on dev.

Closes #751

Lane

Light lane: docs, release notes and citation metadata only, no code. I reviewed the diff myself.

Verification

Local, Python 3.13:

  • python scripts/release_notes.py check docs/releases/0.22.0.md and require 0.22.0: passed
  • python scripts/citation.py check 0.22.0: passed
  • pytest tests/test_version_mentions.py tests/test_citation.py tests/test_release_notes.py tests/test_release_assets.py: 260 passed
  • mkdocs build --strict: passed; anchors of the new links checked in the built site
  • git diff --check: clean
  • Steps of the prepare job of release.yml run locally against the release commit: README image rewrite and check, python -m build with SETUPTOOLS_SCM_PRETEND_VERSION=0.22.0 (foca-0.22.0.tar.gz, foca-0.22.0-py3-none-any.whl), twine check --strict, release_assets.py state (none): passed
  • Not run locally: the full test suite, mypy and ruff (no Python changes); cffconvert (CI runs it).

CI: see the checks of this PR.

Declined review findings

None.

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Prepare the FOCA 0.22.0 release with updated citation metadata, release notes, and migration guidance for its ASGI transition and behavior changes.

Documentation:

  • Update the 0.22.0 release notes and migration guide to document changed defaults, deprecations, security-related messaging, and route behavior.
  • Correct the exceptions configuration documentation for the validation-reasons compatibility guidance.

Chores:

  • Prepare the 0.22.0 release metadata and curated documentation without changing application code.

uniqueg and others added 2 commits November 9, 2026 05:29
Citation metadata and the curated release notes, now covering every
pull request merged since 0.21.0, with the new defaults of `detail` and
of the INFO logs under Breaking changes. The migration guide gets a
section on routes that aren't operations, no longer says that nothing
breaks, says that names chosen by clients still reach `detail` and the
INFO logs, and drops a wrong example. A mention of 0.22.0 in the
exceptions docs, which the version guard rejects once the citation says
0.22.0, is reworded.

Closes #751

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

sourcery-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Update the citation metadata for the 0.22.0 release.

  • CITATION.cff L54-55

Documentation

Curate the 0.22.0 release notes to cover the breaking changes, features, security updates, fixes, documentation, and maintenance since 0.21.0.

  • docs/releases/0.22.0.md L6-19, L24-28, L41-51 (+2 small edits)

Explain the 0.22 migration impact, including changed validation defaults, routes outside the specifications, and the remaining exposure of client-chosen names.

  • docs/migration-0.22.md L5-17, L172-191, L311-317 (+2 small edits)

Adjust the exception configuration guidance to refer to the previous FOCA version rather than 0.22.0.

  • docs/configuration/exceptions.md L193

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 Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (45c562e) to head (2a51627).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #754   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           74        74           
  Lines         9443      9443           
=========================================
  Hits          9443      9443           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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 November 9, 2026 04:38

@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="docs/releases/0.22.0.md" line_range="19" />
<code_context>
+- Responses to invalid requests list all invalid fields, of the body and the parameters together, in the new member `errors` of their problem details, with the problem type [Invalid request](https://foca.readthedocs.io/en/v0.22.0/problems/invalid-request/); `title` and `status` stay as before, and `detail` changes as described under Breaking changes. Raise `foca.errors.InvalidFieldsProblem` to list the invalid fields of checks of your own the same way (#586, #711, #712, #734)
</code_context>
<issue_to_address>
**Error list can be truncated**

When a request has more than 100 invalid fields, `add_field_errors()` caps the response at `MAX_FIELD_ERRORS` (100), so requests with more than 100 invalid fields receive an incomplete list, contrary to the release note’s promise that responses list all of them.

Say that responses list up to 100 invalid fields.
</issue_to_address>

### Comment 2
<location path="docs/releases/0.22.0.md" line_range="7" />
<code_context>
+- FOCA finds routes in its own route table of the operations of the specifications instead of Flask's `url_map`; for routes that aren't operations (e.g., the Swagger UI, `openapi.json`, routes added to Flask directly), `is_permitted_for()` is now `False`, `me_path` is no longer checked, and ownership controllers refuse requests; the log field `operation_id` is the specification's `operationId` (see [Routes that aren't operations](https://foca.readthedocs.io/en/v0.22.0/migration-0.22/#routes-that-arent-operations)) (#632, #707; #718, #726)
</code_context>
<issue_to_address>
**Log field names a resolved identifier**

When an OpenAPI operation omits `operationId`, `_RecordingApi` falls back to Connexion’s resolved `operation.operation_id`, so the `operation_id` log field contains that identifier rather than a specification `operationId`, contrary to the release note.

Clarify that the log field uses Connexion’s resolved identifier when the specification omits `operationId`.
</issue_to_address>

Linked issues

#751 build: prepare the 0.22.0 release · 4 of 5 met

# Requirement Status Notes
1 Citation metadata (version and date) ✅ Met CITATION.cff sets version 0.22.0 and date-released 2026-11-09.
2 Curated release notes covering every PR since v0.21.0 ✅ Met The 0.22.0 notes cover the release categories and include the related PR references.
3 Migration guide complete for the behaviour changes in 0.22.0 ✅ Met The guide describes the route-table changes, changed validation and logging defaults, and relevant deprecations.
4 Reword version mentions rejected by the version guard ✅ Met The exceptions documentation now says “up to FOCA 0.21” rather than “before FOCA 0.22.0.”
5 Dead or moving links in the docs 🟡 Partly met The new route link resolves and the release-note links pin to v0.22.0, but the migration guide still links to the moving GitHub dev branch for the ast-grep rule.

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: docs/releases/0.22.0.md:19, docs/releases/0.22.0.md:7


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

Comment thread docs/releases/0.22.0.md Resolved
Comment thread docs/releases/0.22.0.md Resolved
Responses list up to 100 invalid fields, and the log field operation_id
falls back to Connexion's resolved identifier for operations without an
operationId.

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 9cf656f into dev Nov 9, 2026
58 checks passed
@uniqueg
uniqueg deleted the release/0.22.0 branch November 9, 2026 04:53
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.

build: prepare the 0.22.0 release

1 participant