Skip to content

Merge release/0.1.x into main: 0.1.1 (certifi 2026.10.23, version 0.1.1) - #106

Merged
brettheap merged 4 commits into
mainfrom
release/0.1.x
Nov 17, 2026
Merged

brettheap merged 4 commits into
mainfrom
release/0.1.x

Conversation

@brettheap

@brettheap brettheap commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Merges release/0.1.x back into main, so main contains the 0.1.1 release commit 607c6ee62c2d76c0e1763dbbd483f1fbab69d2d1.

Governing ruling: Brett Heap, 2026-11-17, opensoft/openXfactory#656 (comment) (item 3: "release/0.1.x is merged into main with a merge commit").

What it brings to main

How to merge: with a merge commit, never squash or rebase. A squash would leave the release commit outside main, and both the image workflow's gate and the release order depend on main containing it.

Do not delete release/0.1.x after merging; it carries later 0.1 patch releases.

🤖 Generated with Claude Code

Summary by Sourcery

Release version 0.1.1 with updated certifi dependencies and restore reliable runtime-role initialization across deployment environments.

Bug Fixes:

  • Fix runtime-role bootstrap failures by ensuring PostgreSQL variable interpolation works when checking migration-owner roles.
  • Preserve the intended refusal for genuinely missing migration owners without preventing valid first starts.

Enhancements:

  • Set the project version to 0.1.1.
  • Update the Linux CPython 3.12 dependency constraint to certifi 2026.10.23.

Tests:

  • Add hermetic and real-PostgreSQL regression coverage for runtime-role bootstrap across Compose and Kubernetes deployment scripts.

brettheap and others added 4 commits November 17, 2026 03:01
…ixes #102) (#103)

The migration-owner guard passed `:'owner'` inside `psql -c`. psql 16 sends a
-c string to the server as written and interpolates a variable only in what it
reads as input, so the server got a literal colon and answered a syntax error.
The `if !` read that as "no such role", so every first start on a fresh data
volume exited 1 with a refusal that blamed an owner which existed. The next
start skipped initialization and PostgreSQL came up healthy without the
runtime role.

The query now goes in on stdin, where `:'owner'` is interpolated. Both copies
of the script change identically and stay byte-identical. Nothing else in
either file moves, so the open edits to the same files do not conflict.

tests_runtime/test_runtime_role_bootstrap.py is new. Its DB-backed cases run
each copy of the script against a real PostgreSQL 16 and ask the catalogue
whether the runtime role, its CONNECT and USAGE grants and its default
privileges are there, and that a migration owner the database lacks is still
refused by name without a syntax error. Its hermetic cases hold that no
`psql -c` argument carries a psql variable. The existing shape cases
(test_deploy_shape.py) needed no change.

Co-authored-by: Brett Heap <service@opensoft.dev>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 516560d)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….1.1)

The lock is re-resolved the way its header says, in a clean cpython 3.12.3 /
linux x86_64 environment, but under every existing pin less `certifi`
(`pip install --only-binary :all: -c <this file less certifi>
-e ".[runtime,test]"`, then `pip freeze --exclude-editable | sort`). The freeze
differs from the file in exactly one line: `certifi==2026.7.22` ->
`certifi==2026.10.23`. No other pin moved, and the header records the
re-resolve beside the earlier ones.

certifi 2026.7.22 is inside GHSA-6q48-6c7w-9gw2 (critical, ">= 2019.03.09,
< 2026.10.18"), the one CRITICAL the runtime image's scan reported. It is
transitive: `httpx` and `httpcore`, from the `runtime` extra, require it.

A full regeneration would have moved 26 pins (fastapi, starlette, pydantic,
psycopg and more) and added a package, which is not a patch release.

Ruling: opensoft/openXfactory#656 comment 6936600205, item 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`pyproject.toml`'s version moves 0.1.0 -> 0.1.1, in the form the 0.1.0 release
step took (#79): the one file, with the ruling cited above the version line.
openDox-code keeps no changelog file, so nothing else carries the version.

0.1.1 is the patch release Brett Heap ruled: the branch `release/0.1.x`, from
the commit `v0.1.0` tags, with exactly three changes: the first-start
setup-script fix (#102, #103), `certifi` 2026.10.23 by a bounded re-resolve of
the lock, and this version. This is the last of the three.

Ruling: opensoft/openXfactory#656 comment 6936600205, item 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.1.1: the #102 setup-script fix, certifi 2026.10.23, version 0.1.1 (release/0.1.x)
@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 9 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Pipe the migration-owner role check into psql stdin so its variable is interpolated, and apply the identical startup fix to both deployment scripts.

  • deploy/compose/init-runtime-role.sh L80-88
  • deploy/kubernetes/base/init-runtime-role.sh L80-88

Record version 0.1.1 and its release rationale in the package metadata.

  • pyproject.toml L23-30

Tests

Add hermetic and PostgreSQL-backed regression tests for both startup scripts, checking successful role setup and refusal of a missing migration owner.

  • tests_runtime/test_runtime_role_bootstrap.py L1-355

Lock files and vendored code

Update the locked certifi version to the bounded re-resolve for the 0.1.1 patch release.

  • constraints-cpython312-linux.txt L42-47, L54

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

@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap merged commit c03ffe5 into main Nov 17, 2026
4 checks passed
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.

1 participant