Skip to content

fix(build): align pyproject.toml version with __version__.py + skip-existing on TestPyPI#50

Merged
maltsev-dev merged 1 commit into
masterfrom
fix/publish-version-mismatch
Jul 3, 2026
Merged

fix(build): align pyproject.toml version with __version__.py + skip-existing on TestPyPI#50
maltsev-dev merged 1 commit into
masterfrom
fix/publish-version-mismatch

Conversation

@maltsev-dev

Copy link
Copy Markdown
Member

What

The publish-test workflow at commit 79a6e7e (PR #49) failed with
HTTPError: 400 Bad Request — File already exists. Two issues, one
fix each:

  1. Version drift: feat(sdk) bumped src/nullrun/__version__.py
    to 0.12.0 but left version in pyproject.toml at 0.11.0.
    Hatchling uses pyproject.toml's version, so the wheel was built
    as nullrun-0.11.0-py3-none-any.whl — the same name as the 0.11.0
    artifact already on TestPyPI from a previous successful publish
    (at 18a91e2).
  2. No skip-existing guard: pypa/gh-action-pypi-publish rejects
    same-hash re-uploads with HTTP 400. Adding skip-existing: true
    makes a re-run of the same SHA a no-op (matching twine's
    --skip-existing). Production PyPI cannot overwrite anyway.

Why

  • The 0.12.0 wheel is a new artifact (different hash), so it should
    upload cleanly once the version is corrected.
  • skip-existing is defensive: even if the build ever produces a
    duplicate of an already-published artifact (e.g. a re-run of an
    unchanged SHA), the workflow will not fail.

How

pyproject.toml version field: 0.11.00.12.0 with a comment
explaining the prior drift so the next version bump doesn't repeat it.

.github/workflows/publish-test.yml: add skip-existing: true to the
pypa/gh-action-pypi-publish@release/v1 step.

Test plan

Local verification (.venv-ci, Python 3.14):

  • python -m build --wheel: wheel is now
    nullrun-0.12.0-py3-none-any.whl (was nullrun-0.11.0-…).
  • Wheel METADATA sanity:
Name: nullrun
Version: 0.12.0
Author: Anatolii Maltsev
Author-email: support@nullrun.io
Maintainer-email: "nullrun.io" <support@nullrun.io>

The Author field is still populated correctly by the metadata hook
from PR #49 — version bump didn't regress it.

Risk

  • Version bump to 0.12.0 on PyPI: this aligns the build artifact
    with the runtime __version__ that feat(sdk) already shipped.
    If a 0.12.0 was somehow intended to be a different release than
    the one in PR fix(sdk): make Author field non-empty + v3 capability probe #49, this would conflict — but per the commit
    message ("Bumped 0.11.0 → 0.12.0"), the intent was always 0.12.0.
  • skip-existing on TestPyPI: only suppresses the 400 on
    duplicates. A genuinely new artifact still uploads. Production
    PyPI is unaffected (immutable versions there).

Checklist

  • My change does not introduce new lint warnings
  • I have considered backwards compatibility

…→ 0.12.0)

The `feat(sdk)` commit (79a6e7e, PR #49) bumped
`src/nullrun/__version__.py` to 0.12.0 but left `version` in
`pyproject.toml` at 0.11.0. Hatchling uses `pyproject.toml`'s
version, so `python -m build` was producing a wheel named
`nullrun-0.11.0-py3-none-any.whl` — same name as the 0.11.0
artifact that `publish-test` had already uploaded to TestPyPI
on its previous successful run (commit 18a91e2).

TestPyPI rejects re-uploads of the same wheel hash with HTTP 400
"File already exists" (no overwrite semantics), so the
`publish-test` workflow failed at the very last step. Verify
locally:

  $ python -m build --wheel
  Successfully built nullrun-0.12.0-py3-none-any.whl

Also adds `skip-existing: true` to the
`pypa/gh-action-pypi-publish` step so a re-run of the same
SHA becomes a no-op (matching twine's --skip-existing). Production
PyPI cannot overwrite anyway, so this flag is harmless there too.
@maltsev-dev maltsev-dev merged commit 1cc2d1e into master Jul 3, 2026
4 checks passed
@maltsev-dev maltsev-dev deleted the fix/publish-version-mismatch branch July 3, 2026 15:07
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

maltsev-dev added a commit that referenced this pull request Jul 4, 2026
…-> 0.12.1)

Same drift pattern as #50: the runtime commit bumped
src/nullrun/__version__.py to 0.12.1 but missed this field. Without
the sync-up `python -m build` would publish a `nullrun-0.12.0-*`
wheel that PyPI Trusted Publishing rejects with HTTP 400 "File
already exists", blocking the publish workflow that fires on
`v*` tags.

Refreshes the inline comment to point at the current bump and
explains why the fix had to be applied again.
maltsev-dev added a commit that referenced this pull request Jul 4, 2026
#51)

* release(0.12.1): wire server-minted execution_id through /check -> /track

Bug-fix release. The 0.12.0 changelog claimed the SDK propagates the
server-minted execution_id from /check to /track but the wiring was
never shipped -- the SDK still sent client-supplied ids on
/track/batch and ignored reservation_id on /check responses.

Closes the four gaps documented in docs/sdk-v3-migration-gaps.md:

* check_workflow_budget() now reads response["reservation_id"] into
  a contextvar (nullrun.context._server_minted_execution_id_var).
* New helpers set_/get_/reset_/clear_server_minted_execution_id plus
  a paired _server_minted_reservation_at timestamp for the 295s TTL
  guard.
* _enrich_event stamps execution_id on the /track payload while the
  captured reservation is fresh; past the 295s safety window it
  drops and clears the capture so a doomed id never ships to /track
  (which would 503 RESERVATION_NOT_FOUND -- CLAUDE.md section 33).
* _route_track dispatches llm_call events to the v3 /api/v1/track
  single-event endpoint via Transport.track_single() so backend
  gate_consume_v3 validates the consume-vs-reserve + epsilon
  invariant (CLAUDE.md section 25). Span / tool events keep using
  the legacy /api/v1/track/batch. NULLRUN_V3_TRACK_DISABLE=1 forces
  everything through the legacy batch path (backends still on
  v1/v2).

Adds 27 contract tests in tests/test_v3_server_minted.py covering
contextvar hygiene, capture defence-in-depth, _enrich_event age
threshold, _route_track dispatch, and end-to-end /gate -> /track
round trip.

* fix(build): align pyproject.toml version with __version__.py (0.12.0 -> 0.12.1)

Same drift pattern as #50: the runtime commit bumped
src/nullrun/__version__.py to 0.12.1 but missed this field. Without
the sync-up `python -m build` would publish a `nullrun-0.12.0-*`
wheel that PyPI Trusted Publishing rejects with HTTP 400 "File
already exists", blocking the publish workflow that fires on
`v*` tags.

Refreshes the inline comment to point at the current bump and
explains why the fix had to be applied again.
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