Skip to content

chore(release): sync pyproject version with the release-please manifest and auto-bump it on release - #332

Merged
joryirving merged 1 commit into
mainfrom
foreman/wl-misospace-foreman-dispatch-bridge-330/issue-330
Sep 14, 2026
Merged

joryirving merged 1 commit into
mainfrom
foreman/wl-misospace-foreman-dispatch-bridge-330/issue-330

Conversation

@itsmiso-ai

Copy link
Copy Markdown
Contributor

Syncs pyproject.toml with the release manifest by switching release-please to the python strategy and adding CI tests to prevent future drift.

Fixes #330

Opened by foreman on review GO (workload wl-misospace-foreman-dispatch-bridge-330).

…st and auto-bump it on release

Replace the hard-coded pyproject.toml version (stale at 0.7.0 while
.release-please-manifest.json had reached 0.9.0 — the reopened class of
#174, which a one-time bump in v0.8.x had already failed to prevent)
with 0.9.0, and switch release-please-config.json from release-type
"simple" to "python": the python strategy's PyProjectToml updater rewrites
[project].version in the same "release: X.Y.Z" PR as the manifest bump,
and no other version-bearing files exist in this repo for it to touch.
uv.lock, the second stale self-pin (0.1.0), was already removed in #331.

Add tests/test_release_version_sync.py so CI fails whenever the pyproject
version drifts from .release-please-manifest.json or the release-type
regresses to a strategy that does not update pyproject.toml, closing the
recurrence path this drift class kept reopening.

Fixes #330

Signed-off-by: Saffron <263493777+itsmiso-ai@users.noreply.github.com>

@its-saffron its-saffron 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.

AI Automated Review

Full PR review.

Analysis engine: MiniMax-M2.7@https://litellm.jory.dev/v1 (anthropic) — primary route

Review: PR PR 332 — Sync pyproject version with release-please manifest

Recommendation: Approve.

This PR cleanly addresses the root cause of PR 330 (version drift between pyproject.toml and .release-please-manifest.json) by:

  1. Bumping pyproject.toml's [project].version from 0.7.0 to 0.9.0 (matching the released state)
  2. Switching release-please-config.json from release-type: simple to release-type: python — the key structural fix that makes future releases auto-sync the version field
  3. Adding tests/test_release_version_sync.py as a permanent guardrail that will fail CI if drift recurs or if someone switches back to a non-python release type

The uv.lock drift mentioned in issue PR 330 was addressed separately in PR 331 (commit e5235e9), which the new test file's docstring explicitly acknowledges.

Change-by-change findings

pyproject.toml — Version field updated from 0.7.0 to 0.9.0. This matches the state of .release-please-manifest.json at the time of the fix (the manifest had advanced past 0.7.8 through the v0.8.0 and v0.9.0 releases). No dependency packages are upgraded here — this is a project-metadata sync, not a dependency upgrade in the Python-package sense.

release-please-config.jsonrelease-type switched from "simple" to "python". The simple strategy only updates the manifest and changelog; the python strategy additionally rewrites [project].version in pyproject.toml on every release. The test file's docstring explains this precisely and notes that no __init__.py/version.py/setup.py/setup.cfg exist in this repo, so the python updater has exactly one file to touch. This is the recurrence-prevention mechanism that issue PR 330 called for.

tests/test_release_version_sync.py — New test file with three tests:

  • test_pyproject_version_matches_release_manifest: asserts pyproject.toml's [project].version equals the manifest's root " ." entry — the exact invariant that PR 330 kept re-filing
  • test_release_config_still_uses_the_python_release_type: asserts the config still uses "python" so a future re-nerf is caught
  • test_version_agreement_logic: parametrized table of (pyproject_version, manifest_version, ok) tuples that pin the comparison logic, including the exact states that PR 330 was filed against (0.7.0 vs 0.7.8, 0.7.0 vs 0.9.0)

The file reads are hardcoded to REPO_ROOT / "pyproject.toml", REPO_ROOT / ".release-please-manifest.json", and REPO_ROOT / "release-please-config.json". No user-controlled paths are involved.

Required checks — what was verified

Check Status
Breaking API changes in updated dependencies Not applicable. This is not a dependency upgrade — no Python packages are changed. The version bump is project metadata only.
Run full test suite after upgrade Verified. CI reached terminal state with test: success and docker: success for commit 494a1a7.
Review for path traversal vulnerabilities Verified. REPO_ROOT is derived from Path(__file__).resolve().parent.parent and combined with hardcoded filenames. No user-supplied path input reaches any file operation.
Test with edge-case paths (null bytes, symlinks) Verified. Paths are hardcoded constants; resolve() normalizes symlinks but the inputs are not attacker-controlled. The open(encoding="utf-8") and tomllib.load paths are standard library and safe.

Standards Compliance

The AGENTS.md convention requires that issues state the ask in one imperative sentence and name concrete file paths. Issue PR 330 named pyproject.toml and .release-please-manifest.json; this PR additionally touches release-please-config.json (the auto-bump mechanism) and adds a test file — scope expansion that is directly in service of the "prevent recurrence" acceptance criterion. The new test file's docstring is unusually thorough, citing the exact issues and commit hashes that motivated each decision, which benefits future reviewers.

No AGENTS.md conventions are violated.

Linked Issue Fit

Issue PR 330 acceptance criteria:

  • pyproject.toml version is set to match .release-please-manifest.json (0.9.0 — the manifest's current value, not 0.7.8, because intervening releases advanced it)
  • release-please-config.json uses release-type: python, which auto-updates pyproject.toml on every release — recurrence is structurally prevented
  • ✅ CI test added to fail when the two drift (first test) or when the tooling is re-nerfed (second test)
  • uv.lock handled in the same release-prep pass (PR 331, already merged to main)

All acceptance criteria are satisfied.

@joryirving
joryirving merged commit dd572a8 into main Sep 14, 2026
3 checks passed
@joryirving
joryirving deleted the foreman/wl-misospace-foreman-dispatch-bridge-330/issue-330 branch September 14, 2026 15:04
@its-miso its-miso Bot mentioned this pull request Sep 14, 2026
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.

[P3] pyproject.toml version regressed to 0.7.0 while .release-please-manifest.json is at 0.7.8 (reopened class of #174)

2 participants