Skip to content

build: support FOCA 0.20 - #54

Merged
uniqueg merged 2 commits into
devfrom
build/foca-0.20
Nov 3, 2026
Merged

uniqueg merged 2 commits into
devfrom
build/foca-0.20

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Closes #53

Summary

  • Raise the cap to foca>=0.18.0,<0.21 for both plugins, the template generic.example.noop and the meta distribution, and add FOCA 0.20.0 to the CI matrix.
  • Prepare the releases as docs/releasing.md sets out: both plugins to 0.1.2 (the range only widens: patch), foca-plugins to 0.2.0 (adding FOCA versions: minor), with the new pins, changelog sections and uv.lock.
  • Docs: the derived-image recipe in docs/installing.md used pip install, which fails on images based on FOCA 0.20; it now uses the uv recipe of FOCA's migration guide. README, plugin READMEs and docs/writing-plugins.md name the new range.
  • CITATION.cff stays as it is: it deliberately has no version or date, as the repository holds several distributions.

Light lane: only dependency ranges, versions, changelogs, docs and the CI matrix change, with no plugin source and no change to secrets, permissions or the release workflow.

What changes in FOCA 0.20.0 for the plugins

  • GuardedClient classifies errors differently, but tes.routing.distance only catches the base class HttpError and reads reason, so no change is needed.
  • The plugins declare no stored data and use no plugin store, so the new store key secret and the failure record keys don't affect them.
  • None of them runs pip or relies on it at runtime.

How it was verified

Locally, the steps of the CI job test (ruff, ast-grep, mypy, pytest, coverage) for all three plugins:

  • Python 3.13 with FOCA 0.18.0, 0.19.0, 0.20.0 and dev: all pass at 100% coverage (24, 141 and 15 tests).
  • Python 3.11 with FOCA 0.20.0: all pass at 100% coverage.
  • python -m scripts.checks check: passes.
  • Tests of the scripts: 139 passed, 100% coverage.
  • mkdocs build --strict: passes.
  • pre-commit run --all-files: passes.

Python 3.15 and the other Python and FOCA combinations run in CI only.

CI: all checks pass, including Test for Python 3.11, 3.13 and 3.15 with FOCA 0.18.0, 0.19.0, 0.20.0 and dev.

Open questions

None.

🤖 Generated with Claude Code

Raise the upper bound to foca<0.21 for the plugins, the template and
the meta distribution, and add FOCA 0.20.0 to the CI matrix.

Prepare the releases as docs/releasing.md sets out: both plugins go to
0.1.2 (the range only widens) and the meta distribution to 0.2.0 (added
FOCA versions count as minor), pinning the new plugin versions.

Install plugins in derived images with uv in docs/installing.md, as
images on FOCA 0.20 have no pip.

Closes #53

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg uniqueg added the type: maintenance Related to general repository maintenance label Nov 3, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR adds FOCA 0.20 support by widening dependency bounds, refreshing release pins and versions, extending CI coverage, updating documentation and changelogs, and replacing the derived-image pip installation recipe with uv for FOCA 0.20 images.

Flow diagram for FOCA 0.20 derived-image installation

flowchart LR
    Plugins[plugins.txt] --> UvStage[uv binary from pinned image]
    UvStage --> UvInstall[uv pip install --system]
    UvInstall --> Check[uv pip check --system]
    Check --> Image[FOCA 0.20 application image]
Loading

Flow diagram for FOCA compatibility CI matrix

flowchart LR
    Matrix[CI test matrix] --> F018[FOCA 0.18.0]
    Matrix --> F019[FOCA 0.19.0]
    Matrix --> F020[FOCA 0.20.0]
    Matrix --> Dev[FOCA dev]
    F018 --> Plugins[Plugin test suites]
    F019 --> Plugins
    F020 --> Plugins
    Dev --> Plugins
Loading

File-Level Changes

Change Details Files
Extend declared and tested FOCA compatibility through version 0.20.
  • Widen plugin and example dependency bounds to foca>=0.18.0,<0.21.
  • Add FOCA 0.20 to the Python/FOCA CI compatibility matrix and pin the refreshed lockfile.
  • Document compatibility and verification coverage across repository and plugin documentation.
.github/workflows/ci.yml
uv.lock
README.md
docs/writing-plugins.md
plugins/generic/example/noop/pyproject.toml
plugins/generic/example/noop/README.md
plugins/generic/routing/random/pyproject.toml
plugins/generic/routing/random/README.md
plugins/tes/routing/distance/pyproject.toml
plugins/tes/routing/distance/README.md
Prepare the plugin and meta-distribution release train for FOCA 0.20.
  • Bump both plugins from 0.1.1 to 0.1.2 and the meta distribution from 0.1.0 to 0.2.0.
  • Update meta-distribution extras to pin the new plugin versions and widen its FOCA dependency.
  • Add release changelog entries describing compatibility and installation changes.
meta/pyproject.toml
meta/CHANGELOG.md
plugins/generic/routing/random/pyproject.toml
plugins/generic/routing/random/CHANGELOG.md
plugins/tes/routing/distance/pyproject.toml
plugins/tes/routing/distance/CHANGELOG.md
Update derived-image installation guidance for FOCA 0.20 environments without pip.
  • Replace the pip-based Docker installation recipe with a digest-pinned uv build mount and hashed, binary-only installation.
  • Restore the application image user and document the required user handling.
docs/installing.md

Possibly linked issues

  • build: support FOCA 0.20 #53: The PR implements the issue by widening dependency caps, testing FOCA 0.20 in CI, and preparing plugin and meta releases.

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

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #54   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          553       553           
  Branches        71        71           
=========================================
  Hits           553       553           
Flag Coverage Δ
foca-plugin-generic-example-noop 100.00% <ø> (ø)
foca-plugin-generic-routing-random 100.00% <ø> (ø)
foca-plugin-tes-routing-distance 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.

@read-the-docs-community

read-the-docs-community Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 foca-plugins | 🛠️ Build #35626600 | 📁 Comparing eda1165 against latest (b550234)

  🔍 Preview build  

4 files changed
± index.html
± catalogue/index.html
± installing/index.html
± writing-plugins/index.html

@uniqueg
uniqueg marked this pull request as ready for review November 3, 2026 21:47

@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 4 issues

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

## Individual Comments

### Comment 1
<location path="docs/installing.md" line_range="15" />
<code_context>
-    `tes.routing.distance` (0.1.1 each), are experimental; the first release
-    train is `foca-plugins` 0.1.0. Distributions named below that don't
+    `tes.routing.distance` (0.1.2 each), are experimental; the latest release
+    train is `foca-plugins` 0.2.0. Distributions named below that don't
     exist yet are examples of the naming scheme.

</code_context>
<issue_to_address>
**FOCA 0.20 installs fail**

When a reader follows either meta-distribution installation example with FOCA 0.20, the examples pin `foca-plugins` to 0.1.0, whose requirement excludes FOCA 0.20, so dependency resolution rejects the install or downgrades FOCA instead of installing the compatible train.

Update both installation examples to pin `foca-plugins` to 0.2.0.

Also at `README.md:46-47`.
</issue_to_address>

### Comment 2
<location path="plugins/tes/routing/distance/README.md" line_range="22" />
<code_context>
 | Data transfers | none |
 | Data stored | none (no plugin store) |
-| FOCA | 0.18, 0.19 (`>=0.18.0,<0.20`) |
+| FOCA | 0.18, 0.19, 0.20 (`>=0.18.0,<0.21`) |

 ## What it does
</code_context>
<issue_to_address>
**Derived image builds fail**

When an operator follows the distance-plugin README’s derived-image example with a FOCA 0.20-or-later image, the example runs `pip install` on an image without `pip`, so the Docker build exits with command-not-found and the image is not built.

Replace the example’s `pip install` step with the `uv` installation command.

Also at `docs/installing.md:78`.
</issue_to_address>

### Comment 3
<location path="docs/installing.md" line_range="75" />
<code_context>
+    UV_NO_CACHE=1 uv pip install --system --require-hashes --only-binary :all: \
+        --no-deps --compile-bytecode -r /tmp/plugins.txt \
+    && uv pip check --system
+USER 1000
 ```

</code_context>
<issue_to_address>
**Derived image runs as wrong user**

When the recipe is copied for a gateway image whose runtime UID is not 1000, `USER 1000` overrides the base image’s configured runtime user rather than restoring it; when another gateway image uses a different UID, the derived container runs with the wrong identity and can fail file-access checks or violate the app’s runtime policy.

Use an explicit placeholder for the base image’s runtime user and require operators to substitute that image’s actual user or UID.
</issue_to_address>

### Comment 4
<location path="meta/CHANGELOG.md" line_range="13" />
<code_context>

+## 0.2.0
+
+Release train for FOCA 0.20: the plugins of 0.1.0, each tested against
+FOCA 0.18, 0.19 and 0.20 (`foca>=0.18.0,<0.21`). Pins:
+
</code_context>
<issue_to_address>
**Release notes misstate plugin versions**

When a reader consults the 0.2.0 release-train changelog, the changelog describes the plugins as version 0.1.0, but the pins listed for the train are 0.1.2, so readers get an incorrect account of the installed plugin versions.

Change the release-train introduction to say the plugins are version 0.1.2.
</issue_to_address>

Linked issues

#53 build: support FOCA 0.20 · 3 of 3 met

# Requirement Status Notes
1 Raise the cap on the plugins and meta package, and run the CI matrix against FOCA 0.20. ✅ Met The plugin, template, and meta package requirements use foca>=0.18.0,<0.21, and the CI matrix includes FOCA 0.20.0.
2 Check that the plugins work with what changes in 0.20.0. ✅ Met The PR reports tests passing for all three plugins with FOCA 0.20.0; the distance plugin's HttpError handling remains compatible with the described change.
3 Prepare plugin releases and a meta release, so they can follow the FOCA tag quickly. ✅ Met Both plugins are prepared as 0.1.2, the meta distribution as 0.2.0 with updated pins, and the changelogs and lockfile are updated.

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: docs/installing.md:15, plugins/tes/routing/distance/README.md:22, docs/installing.md:75


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

Comment thread docs/installing.md Resolved
Comment thread plugins/tes/routing/distance/README.md Resolved
Comment thread docs/installing.md Resolved
Comment thread meta/CHANGELOG.md Resolved
Pin the examples to the new release train, install with uv in the
distance plugin's derived image, and name the image's user in the
recipes instead of assuming one.

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 bff02c0 into dev Nov 3, 2026
139 checks passed
@uniqueg
uniqueg deleted the build/foca-0.20 branch November 3, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: maintenance Related to general repository maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: support FOCA 0.20

1 participant