Skip to content

fix(release): unblock the release pipeline - #7

Merged
piotrlaczkowski merged 2 commits into
mainfrom
claude/production-readiness-audit-fhgbc8
Aug 27, 2026
Merged

piotrlaczkowski merged 2 commits into
mainfrom
claude/production-readiness-audit-fhgbc8

Conversation

@piotrlaczkowski

Copy link
Copy Markdown
Contributor

Describe your changes shortly

Two defects that stop a release from working. The first aborts it immediately; the second makes it publish a UI advertising the previous version and leaves main red.

1. The release cannot start — GitPython

RELEASE.yml installs its tooling unpinned:

pip install poetry python-semantic-release

python-semantic-release asks only for gitpython~=3.0, and GitPython 3.1.60 removed Actor.name_email_regex, which python-semantic-release reads unconditionally while loading its configuration. pip resolves the broken pair and the first step of the release dies:

::ERROR:: type object 'Actor' has no attribute 'name_email_regex'

No tag, no PyPI upload, no docs deploy. This is what failed the last release attempt.

Reproduced against the real tooling: PSR 10.6.1 + GitPython 3.1.60 fails as above; 3.1.59 still has the attribute, 3.1.60 does not. Capping GitPython rather than pinning python-semantic-release, so the release picks up the upstream fix when it lands.

2. The sidebar version is never bumped

version_variables pointed at .../Sidebar.jsx:FlowyML v, but semantic-release rewrites assignments — it looks for <variable> = "<current version>". The version was printed straight into the JSX (<p ...>FlowyML v2.2.0</p>), so there was nothing to match. semantic-release updated pyproject.toml and flowyml/__init__.py, reported success, and left the sidebar showing the previous release.

That also turned CI red on main after every release: the version commit is pushed first, and only the follow-up [skip ci] sync commit repaired the sidebar with sed — so the push in between carried an inconsistent tree.

The version now lives in const VERSION, the JSX renders {VERSION}, version_variables points at the constant, and the workflow's sed safety net is retargeted at the new shape.

Verification

Dress-rehearsed on a scratch clone of this branch with the real tool (semantic-release version --no-commit --no-tag --no-push):

  • before: pyproject → 2.2.1, __init__ → 2.2.1, sidebar stuck at FlowyML v2.2.0
  • after: all three → 2.2.1, and tests/test_version_consistency.py passes on the bumped tree

Tests

Four new tests, all failing before these changes:

  • the release workflow constrains GitPython
  • the sidebar constant tracks pyproject.toml
  • no version is printed inline in the sidebar markup again
  • every version_variables entry matches something semantic-release can actually rewrite

Full suite: 1299 passed, 23 skipped. Frontend: 19 vitest tests pass, production build succeeds. All 12 pre-commit hooks pass. poetry check --lock exits 0.

Checklist

My code follows all rules defined in:

  • pre-commits are passing !
  • unite-tests are passing !
  • code is well documented (docstrings in the corresponding format including examples of usage etc ...)
  • code API is connected to the documentetion
  • all requirements are added using poetry

Generated by Claude Code

claude added 2 commits August 27, 2026 19:01
`RELEASE.yml` installs the release tooling unpinned:

    pip install poetry python-semantic-release

python-semantic-release requires only `gitpython~=3.0`, and GitPython
3.1.60 removed `Actor.name_email_regex`, which python-semantic-release
reads unconditionally while loading its configuration. pip therefore
resolves a broken pair and the very first step of a release aborts:

    ::ERROR:: type object 'Actor' has no attribute 'name_email_regex'

No tag, no PyPI upload, no docs deploy - the whole pipeline stops before
it computes a version.

Verified against the real tooling: python-semantic-release 10.6.1 with
GitPython 3.1.60 fails as above; with 3.1.59 the same version resolves
this repository's configuration and `semantic-release version --print`
answers 2.2.1, and `--noop version` renders the full changelog.

Cap GitPython rather than pinning python-semantic-release, so the release
picks up the upstream fix when it lands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1CErYvpggWAogJ9MDVqj4
`version_variables` pointed at
`.../Sidebar.jsx:FlowyML v`, but semantic-release rewrites assignments -
it looks for `<variable> = "<current version>"`. The version was printed
straight into the JSX:

    <p ...>FlowyML v2.2.0</p>

so there was nothing to match. semantic-release updated `pyproject.toml`
and `flowyml/__init__.py`, reported success, and silently left the sidebar
advertising the previous release.

Verified against the real tool: on a scratch clone of `main`,
`semantic-release version` bumps pyproject and `__init__.py` to 2.2.1 and
leaves `FlowyML v2.2.0` in place. With the version held in a constant it
bumps all three.

That also turned CI red on `main` after every release: the version commit
is pushed first and only the follow-up `[skip ci]` sync commit repaired
the sidebar with sed, so the push in between carried an inconsistent tree
that `test_the_frontend_sidebar_shows_the_current_version` rejects.

Hold the version in `const VERSION` and render `{VERSION}`, point
`version_variables` at the constant, and retarget the workflow's sed at
the new shape so the safety net still works.

Three tests: the sidebar constant tracks pyproject, no version is printed
inline in the markup again, and every `version_variables` entry matches
something semantic-release can actually rewrite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1CErYvpggWAogJ9MDVqj4
@piotrlaczkowski
piotrlaczkowski merged commit 9177c9b into main Aug 27, 2026
7 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.

2 participants