diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9014c42..aa8b5a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,13 +76,13 @@ jobs: --conformance-sdist dist/conformance/*.tar.gz \ --sim-wheel dist/simulator/*.whl \ --sim-sdist dist/simulator/*.tar.gz \ - --expected-version 0.6.0 + --expected-version 0.7.0 - name: Verify distribution ownership and clean-install contracts if: matrix.python-version == '3.13' run: | python tools/verify_distribution_split.py \ - --expected-version 0.6.0 \ + --expected-version 0.7.0 \ --conformance-wheel dist/conformance/*.whl \ --sim-wheel dist/simulator/*.whl \ --resolver-runtime-checks diff --git a/.github/workflows/gocronx-matcher.yml b/.github/workflows/gocronx-matcher.yml index c3b6d96..e0dabdf 100644 --- a/.github/workflows/gocronx-matcher.yml +++ b/.github/workflows/gocronx-matcher.yml @@ -77,7 +77,7 @@ jobs: (Path(os.environ["REPORT_ROOT"]) / "qualification" / "qualification.json").read_text() ) assert report["qualified"] is True - assert report["qualification_id"] == "sha256:1636620f5f0f6b65fd425a6021424e9c7678bec5215555556c70a929c5e0b144" + assert report["qualification_id"] == "sha256:64746a4a21bc3fef7c88e58d749da2adb51cb74fac211088174aba26dc6746ed" assert report["candidate_runs"] == 28 assert report["campaign"]["generated_events"] == 5000 assert report["campaign"]["semantic_coverage"]["coverage_ratio"] == 1.0 diff --git a/.github/workflows/intrepid-orderbook.yml b/.github/workflows/intrepid-orderbook.yml index 4baaa3e..7390ed5 100644 --- a/.github/workflows/intrepid-orderbook.yml +++ b/.github/workflows/intrepid-orderbook.yml @@ -112,7 +112,7 @@ jobs: (Path(os.environ["REPORT_ROOT"]) / "fifo-limit" / "qualification.json").read_text() ) assert report["qualified"] is True - assert report["qualification_id"] == "sha256:f8db775baabe7e665d45bbb920a67e43d405acf445de4951617df68ffa24eb69" + assert report["qualification_id"] == "sha256:5bb06673e36f6ecf7a328285275d7d72b6f1e22e40f139d628411d8fb8bb222b" assert report["campaign"]["campaign_id"] == "sha256:59d70645ff13f12fa4af23af69631714df22ef5f25cd1104b0c1124f98f71f6a" assert report["candidate_runs"] == 28 assert report["suite"]["report"]["conformant_cases"] == 3 @@ -141,7 +141,7 @@ jobs: (Path(os.environ["REPORT_ROOT"]) / "fifo-partial" / "qualification.json").read_text() ) assert report["qualified"] is True - assert report["qualification_id"] == "sha256:08bf641bfa57da1892d744c08bca0be00f5ac1ade580ae8fcf7f195f0fcad6eb" + assert report["qualification_id"] == "sha256:baee6faa893cd5576f5fe42985250f1ce210d47c402c2c80de563088ff41dc85" assert report["campaign"]["campaign_id"] == "sha256:297f895b99ac26f92287ababd1dcc25b68b0be98787e9b9d814d5cd241769cf9" assert report["candidate_runs"] == 28 assert report["suite"]["report"]["conformant_cases"] == 3 @@ -184,7 +184,7 @@ jobs: (Path(os.environ["REPORT_ROOT"]) / "fifo-full" / "failure.json").read_text() ) assert report["qualified"] is False - assert report["qualification_id"] == "sha256:81a095f9804852ff7035f4c3d428a51ae3d0e8e4b81ec335128c6af15b6f65bd" + assert report["qualification_id"] == "sha256:ed59a8437c413f3376546ac6bc61452eb08ac75d008667fd619b185e4785f5a2" assert report["campaign"]["campaign_id"] == "sha256:61464afc70170352bc6eecb6ccb22f120d05166d6f5cb7926ce5d43adf8a6b41" assert failure["failure_id"] == "failure-1ce2954857800b3a068d" assert failure["original_event_count"] == 7 diff --git a/.github/workflows/orderbook-rs.yml b/.github/workflows/orderbook-rs.yml index 362f20c..67cbd04 100644 --- a/.github/workflows/orderbook-rs.yml +++ b/.github/workflows/orderbook-rs.yml @@ -111,7 +111,7 @@ jobs: (Path(os.environ["REPORT_ROOT"]) / "qualification" / "qualification.json").read_text() ) assert report["qualified"] is True - assert report["qualification_id"] == "sha256:c04a07cbdb9931232162ef1a05740221311f3b2fa21b9b552093a2706a12c488" + assert report["qualification_id"] == "sha256:10c162a1a6db2a7715e98af54871cc7a94675f2e7c4fe3754e18c48157c0371c" assert report["candidate_runs"] == 28 assert report["campaign"]["generated_events"] == 5000 assert report["campaign"]["semantic_coverage"]["coverage_ratio"] == 1.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca579af..939e2ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -122,7 +122,7 @@ jobs: --conformance-sdist dist/conformance/*.tar.gz \ --sim-wheel dist/simulator/*.whl \ --sim-sdist dist/simulator/*.tar.gz \ - --expected-version 0.6.0 + --expected-version 0.7.0 - name: Verify distribution ownership and clean-install contracts run: | @@ -135,7 +135,7 @@ jobs: --dest dist/legacy \ "tracebook-sim==0.5.0" python tools/verify_distribution_split.py \ - --expected-version 0.6.0 \ + --expected-version 0.7.0 \ --conformance-wheel dist/conformance/*.whl \ --sim-wheel dist/simulator/*.whl \ --legacy-wheel dist/legacy/tracebook_sim-0.5.0-py3-none-any.whl \ diff --git a/CHANGELOG.md b/CHANGELOG.md index d72792e..2f99ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The project follows [Keep a Changelog](https://keepachangelog.com/) conventions. ## Unreleased +Prepared version: **0.7.0**. See the [draft release notes](docs/releases/0.7.0.md). +This version has not been published; 0.6.0 remains the public install target. + - Made initial staging-identity failures explicit: report the possible residue path and skipped cleanup, preserve unverified entries, and exit before starting a candidate. Documented conservative manual recovery without blanket deletion. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 97eead7..b617b8d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ python -m build --sdist --wheel --outdir dist/simulator packaging/tracebook-sim python tools/verify_distribution_privacy.py dist/conformance/* dist/simulator/* python -m twine check dist/conformance/* dist/simulator/* python tools/verify_distribution_split.py \ - --expected-version 0.6.0 \ + --expected-version 0.7.0 \ --conformance-wheel dist/conformance/*.whl \ --sim-wheel dist/simulator/*.whl \ --resolver-runtime-checks @@ -49,7 +49,7 @@ python tools/verify_sdist_wheel_agreement.py \ --conformance-sdist dist/conformance/*.tar.gz \ --sim-wheel dist/simulator/*.whl \ --sim-sdist dist/simulator/*.tar.gz \ - --expected-version 0.6.0 + --expected-version 0.7.0 python tools/smoke_conformance_wheel.py dist/conformance/*.whl ``` diff --git a/Makefile b/Makefile index baf144f..ebe66b6 100644 --- a/Makefile +++ b/Makefile @@ -97,12 +97,12 @@ build: --conformance-sdist dist/conformance/*.tar.gz \ --sim-wheel dist/simulator/*.whl \ --sim-sdist dist/simulator/*.tar.gz \ - --expected-version 0.6.0 + --expected-version 0.7.0 # Prove wheel ownership, clean installs, migration, and uninstall safety verify-distribution-split: build $(PYTHON_VENV) tools/verify_distribution_split.py \ - --expected-version 0.6.0 \ + --expected-version 0.7.0 \ --conformance-wheel dist/conformance/*.whl \ --sim-wheel dist/simulator/*.whl diff --git a/README.md b/README.md index 23a850b..bf7fb76 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ failure to a deterministic JSONL reproducer. ## Quick Start +The source tree is preparing **0.7.0**; see the [draft release notes](docs/releases/0.7.0.md). +It is not published yet. The install commands below intentionally use public 0.6.0. + Tracebook requires Python 3.10-3.13. Install the dependency-light conformance distribution and materialize the current hash-verified adversarial suite: diff --git a/docs/release.md b/docs/release.md index 416fe05..4023dec 100644 --- a/docs/release.md +++ b/docs/release.md @@ -2,6 +2,11 @@ `tracebook` is still alpha software. Use this checklist before cutting any public release or tagged benchmark claim. +The prepared source version is **0.7.0**, not yet published. The +[draft 0.7.0 notes](releases/0.7.0.md) list the release scope and remaining +publication gates. Public installation examples, citation metadata, and +support policy still describe the latest public release, 0.6.0. + ## Version And Changelog 1. Update `src/tracebook/_version.py`. @@ -41,7 +46,7 @@ python -m pip download \ --dest dist/legacy \ "tracebook-sim==0.5.0" python tools/verify_distribution_split.py \ - --expected-version 0.6.0 \ + --expected-version 0.7.0 \ --conformance-wheel dist/conformance/*.whl \ --sim-wheel dist/simulator/*.whl \ --legacy-wheel dist/legacy/tracebook_sim-0.5.0-py3-none-any.whl \ @@ -52,7 +57,7 @@ python tools/verify_sdist_wheel_agreement.py \ --conformance-sdist dist/conformance/*.tar.gz \ --sim-wheel dist/simulator/*.whl \ --sim-sdist dist/simulator/*.tar.gz \ - --expected-version 0.6.0 + --expected-version 0.7.0 python tools/smoke_conformance_wheel.py dist/conformance/*.whl python -m pip check ( @@ -94,10 +99,10 @@ Configure a PyPI Trusted Publisher for both distribution names: - workflow: `release.yml` - environment: `pypi` -`tracebook-conformance` is a new project name in 0.6.0, so create its pending -Trusted Publisher on PyPI before publishing the first release. Do not publish -the facade until that exact conformance version can be downloaded from the -public index. +`tracebook-conformance` was introduced in 0.6.0. Confirm both existing Trusted +Publishers still match the workflow and environment before the next release. +Do not publish the facade until that exact conformance version can be +downloaded from the public index. Repository settings enforce pull requests and the Ubuntu/Python 3.10-3.13 CI matrix on `main`. The `pypi` deployment environment accepts only `v*` tags; @@ -112,11 +117,11 @@ and only then publishes `tracebook-sim`. After publishing, verify the lightweight path from a clean environment: ```bash -python -m pip install --no-cache-dir "tracebook-conformance==0.6.0" +python -m pip install --no-cache-dir "tracebook-conformance==0.7.0" python -c "import tracebook; print(tracebook.__version__)" tracebook-conformance --help python -m pip check -python -m pip download --no-deps --no-binary=:all: "tracebook-conformance==0.6.0" +python -m pip download --no-deps --no-binary=:all: "tracebook-conformance==0.7.0" ``` Extract the downloaded sdist in a blank repository, build @@ -129,8 +134,8 @@ binary on the reduced regression case. Verify the full facade independently in a second clean environment: ```bash -python -m pip install --no-cache-dir "tracebook-sim==0.6.0" -python -c "import importlib.metadata as m; assert m.version('tracebook-conformance') == m.version('tracebook-sim') == '0.6.0'" +python -m pip install --no-cache-dir "tracebook-sim==0.7.0" +python -c "import importlib.metadata as m; assert m.version('tracebook-conformance') == m.version('tracebook-sim') == '0.7.0'" tracebook-sim --version tracebook-benchmark --version tracebook-dashboard --version @@ -148,7 +153,7 @@ that move to `tracebook-conformance`: ```bash python -m pip install "tracebook-sim==0.5.0" python -m pip uninstall -y tracebook-sim -python -m pip install "tracebook-sim==0.6.0" +python -m pip install "tracebook-sim==0.7.0" python -m pip check ``` @@ -163,7 +168,8 @@ Release notes should include: - compatibility notes - known limitations -For 0.6.0, begin with [`docs/releases/0.6.0.md`](releases/0.6.0.md). The +For the next release, begin with the [draft 0.7.0 notes](releases/0.7.0.md). +The [0.6.0 notes](releases/0.6.0.md) document the distribution split. The [0.5.0 notes](releases/0.5.0.md) document qualification as a public contract, the [0.4.1 notes](releases/0.4.1.md) document the first upstream semantic review, and the [0.4.0 notes](releases/0.4.0.md) document the failure-corpus diff --git a/docs/releases/0.7.0.md b/docs/releases/0.7.0.md new file mode 100644 index 0000000..4765976 --- /dev/null +++ b/docs/releases/0.7.0.md @@ -0,0 +1,116 @@ +# Tracebook 0.7.0: Captured Evidence And Separate Book-Replay Contracts + +**Draft — not published.** Both distribution versions are prepared as 0.7.0. +No release date, public tag, PyPI upload, or independent adoption outcome is +claimed by this document. Public 0.6.0 remains the install target until release. + +## Release Scope + +- Captured two-run qualification: candidate identity checks, clean evidence + roots, and `evidence-init` / `evidence-verify` for complete, unchanged, + byte-identical qualification bundles. +- A separate `l3-book-replay-v1` contract for market-data add/update/delete + events and non-mutating FIFO fill probes. It includes a pinned optional + NautilusTrader adapter, deterministic generated campaigns, reduction, and a + retained injected queue-priority negative control. This is not a submitted- + order matching-engine contract or a claim about Nautilus's fill simulator. +- A pinned native Go adapter for `intrepidkarthi/orderbook`, with FIFO-limit + and partial-fill qualifications. The retained unfillable-FOK example is a + contract difference, not an upstream defect claim. +- Checked native Rust quantity encoding: output display precision no longer + rounds order, reduction, or replacement input before matching. Inputs must + fit the adapters' exact 12-place integer domain; this is not a claim of + unrestricted precision equivalence with a binary-floating-point engine. +- Stricter stdio shutdown and no-clobber L3 report/reduced-trace publication. + Existing output paths now fail before candidate execution. New complete + artifacts publish individually, with reduced traces before reports; abrupt + interruption is not a cross-file atomic transaction. + If the first staging-directory identity read fails, the CLI reports possible + residue and exits before starting a candidate. Unverified entries are kept; + [manual recovery](../book-replay-conformance.md) requires independently + confirmed ownership, not blanket deletion of staging paths. +- Distribution privacy gates, clean-install/migration checks, and native CI + trigger coverage for the reference/runtime code those integrations execute. + +The corrected 24-run research aggregate is included in the source record: +1/12 safe passes with public documentation versus 5/12 with the frozen skill. +That improvement was confined to boundary judgment; neither arm safely +qualified the compatible engine. Frozen protocols, historical evidence, +private gold, and evaluator artifacts are not revised for this release. +The 13 frozen-harness review findings remain explicitly deferred in +[issue #85](https://github.com/Taz33m/tracebook/issues/85). Merging the +release-code fixes does not fix or dismiss those research findings. + +## Install After Publication + +These commands are future post-publication instructions, not available package +downloads today. If an environment contains the monolithic `tracebook-sim` +0.5.x, first uninstall that legacy owner: + +```bash +python -m pip uninstall -y tracebook-sim +``` + +For the dependency-light conformance commands: + +```bash +python -m pip install "tracebook-conformance==0.7.0" +``` + +For simulation, replay, benchmarks, and the other workbench commands: + +```bash +python -m pip install "tracebook-sim==0.7.0" +``` + +The facade remains package-less and pins the exact conformance version. Its +seven console scripts and the conformance command keep their distribution +ownership. Python 3.10–3.13 is the supported package matrix; the optional +Nautilus 2.0.0rc3 integration is separately exercised on Python 3.14 and is not +a mandatory package dependency. Native adapters remain out of process. + +The L3 entry point is `python -m tracebook.book_replay`; no new console script +is claimed. See [book-replay conformance](../book-replay-conformance.md) and +[captured onboarding](../independent-onboarding.md) for the exact workflows. + +## Evidence Compatibility + +Existing profile names, generator versions, suite hashes, trace bytes, and +retained failure controls keep their meaning. A qualification ID covers the +full report, including reference-engine version metadata, so a fresh 0.7.0 +qualification can have a different ID from an otherwise equivalent 0.6.0 run. +Do not relabel old artifacts or rewrite frozen experiment evidence. The sent +maintainer invitation remains pinned to its tested pre-release source revision +and wheel hash; a release-based attempt is new evidence. + +## Release Decision And Remaining Publication Gates + +The reviewed consolidation landed in +[PR #84](https://github.com/Taz33m/tracebook/pull/84) on 2026-09-05, at merge +commit `9059f171dfc751eff4c8f048af7d0878d2b5aca0`. All nine Actions jobs and +the Cubic check passed on its exact head, with no unresolved conversations at +merge. The version-preparation branch has been reconciled with that source. +This does not substitute for checks on the new version-preparation revision. + +The [project's external-use release gate](../../PROJECT_PLAN.md#next-release-gate) +still applies. Repository-owned evidence and an unanswered invitation cannot +establish independent adoption or time to first qualification. Publication +requires that evidence or an explicit maintainer decision to change the gate; +technical preparation does not silently waive it. + +1. Review and land the version-preparation changes through the protected branch + workflow, with checks on the exact proposed revision. +2. Run the release candidate's remote checks and coordinated package gates; + retain both wheel hashes and source-archive agreement results. +3. Review dependency/security alerts. On 2026-09-05, GitHub's alert API returned + HTTP 403 and reported that Dependabot alerts are disabled for this repository. + This is not evidence of zero alerts; security-alert review remains unverified. +4. In the final release commit, set the actual release date and 0.7.0 citation + URL in `CITATION.cff`, mark the new minor line in `SECURITY.md`, update public + install examples, and move these notes and the changelog out of draft. +5. Confirm both PyPI Trusted Publishers and the tag-only environment, then + publish through the coordinated workflow: conformance first, facade only + after the exact dependency wheel is downloadable and hash-verified. + +Preparation does not authorize a tag or package upload. Repository-owned +campaigns and the sent maintainer invitation are not independent adoption. diff --git a/packaging/tracebook-sim/pyproject.toml b/packaging/tracebook-sim/pyproject.toml index 84ffd24..30d8909 100644 --- a/packaging/tracebook-sim/pyproject.toml +++ b/packaging/tracebook-sim/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "tracebook-sim" -version = "0.6.0" +version = "0.7.0" description = "Compatibility facade for Tracebook simulation, replay, profiling, and visualization tools" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10" @@ -35,7 +35,7 @@ classifiers = [ "Topic :: Scientific/Engineering", ] dependencies = [ - "tracebook-conformance==0.6.0", + "tracebook-conformance==0.7.0", "numpy>=2.2.6", "psutil>=7.2.2", ] diff --git a/src/tracebook/_version.py b/src/tracebook/_version.py index 11b0728..fc6e695 100644 --- a/src/tracebook/_version.py +++ b/src/tracebook/_version.py @@ -1,3 +1,3 @@ """Package version metadata.""" -__version__ = "0.6.0" +__version__ = "0.7.0" diff --git a/tests/test_coinbase_corpus.py b/tests/test_coinbase_corpus.py index 720c01b..fa35541 100644 --- a/tests/test_coinbase_corpus.py +++ b/tests/test_coinbase_corpus.py @@ -6,6 +6,8 @@ import pytest +from tracebook import __version__ +from tracebook.corpus import coinbase as corpus_module from tracebook.corpus import ( CoinbaseCorpusError, CoinbaseSanitizer, @@ -124,6 +126,7 @@ def test_compact_sanitizer_rewrites_schema_when_removing_fields(): def test_prepare_verify_and_tamper_detection(tmp_path): corpus, manifest = _prepare(tmp_path) + assert manifest["tool"] == {"name": "tracebook", "version": __version__} assert set(path.name for path in corpus.iterdir()) == { "snapshot.json", "feed.jsonl", @@ -164,7 +167,12 @@ def test_checked_synthetic_corpus_reproduces_exactly(): } -def test_checked_synthetic_corpus_regenerates_byte_for_byte(tmp_path): +def test_checked_synthetic_corpus_regenerates_byte_for_byte(tmp_path, monkeypatch): + # The corpus identity includes producer-version provenance. Pin only that + # historical metadata when testing byte reproduction; normal preparation + # above must still record the current version. Keep the frozen fixture intact. + historical = json.loads((CORPUS / "manifest.json").read_text(encoding="utf-8")) + monkeypatch.setattr(corpus_module, "__version__", historical["tool"]["version"]) regenerated = tmp_path / "regenerated" prepare_coinbase_corpus( SNAPSHOT, diff --git a/tests/test_distribution_split_verifier.py b/tests/test_distribution_split_verifier.py index d9ee340..e6138f0 100644 --- a/tests/test_distribution_split_verifier.py +++ b/tests/test_distribution_split_verifier.py @@ -77,7 +77,7 @@ def _valid_pair( sim_payload: dict[str, bytes] | None = None, ): root_payload = { - "tracebook/__init__.py": b'__version__ = "0.6.0"\n', + "tracebook/__init__.py": f'__version__ = "{EXPECTED_VERSION}"\n'.encode("utf-8"), "tracebook/conformance/__init__.py": b"", "tracebook/conformance/cli.py": b"def main():\n return 0\n", } diff --git a/tests/test_external_integrations.py b/tests/test_external_integrations.py index e099202..8a10980 100644 --- a/tests/test_external_integrations.py +++ b/tests/test_external_integrations.py @@ -168,7 +168,7 @@ def test_orderbook_rs_documentation_and_ci_lock_the_proof_profile(): assert "--profile fifo-full-v1" in workflow assert "--events-per-trace 100" in workflow assert "sha256:95c3dac9d27b770a5cccebe9ff16b6e71af443001d633b640983f02f3e04b3c9" in workflow - assert "sha256:c04a07cbdb9931232162ef1a05740221311f3b2fa21b9b552093a2706a12c488" in workflow + assert "sha256:10c162a1a6db2a7715e98af54871cc7a94675f2e7c4fe3754e18c48157c0371c" in workflow assert "--test-fault=drop-first-trade" in workflow assert 'assert report["divergence"]["event_index"] == 3' in workflow assert "failure-bc8b19d3e0e3441a98db" in workflow @@ -199,7 +199,7 @@ def test_gocronx_matcher_integration_is_pinned_qualified_and_honest_about_assump assert "awaiting an upstream" in readme assert "stable public inspection contract" in readme assert "tracebook-conformance qualify" in workflow - assert "sha256:1636620f5f0f6b65fd425a6021424e9c7678bec5215555556c70a929c5e0b144" in workflow + assert "sha256:64746a4a21bc3fef7c88e58d749da2adb51cb74fac211088174aba26dc6746ed" in workflow assert "actions/upload-artifact@v7" in workflow @@ -225,9 +225,9 @@ def test_intrepid_orderbook_is_pinned_qualified_and_retains_the_fok_boundary(): assert "incoming quantity times each potentially crossed maker's" in readme assert "6/9" in readme assert "failure-1ce2954857800b3a068d" in readme - assert "sha256:f8db775baabe7e665d45bbb920a67e43d405acf445de4951617df68ffa24eb69" in workflow - assert "sha256:08bf641bfa57da1892d744c08bca0be00f5ac1ade580ae8fcf7f195f0fcad6eb" in workflow - assert "sha256:81a095f9804852ff7035f4c3d428a51ae3d0e8e4b81ec335128c6af15b6f65bd" in workflow + assert "sha256:5bb06673e36f6ecf7a328285275d7d72b6f1e22e40f139d628411d8fb8bb222b" in workflow + assert "sha256:baee6faa893cd5576f5fe42985250f1ce210d47c402c2c80de563088ff41dc85" in workflow + assert "sha256:ed59a8437c413f3376546ac6bc61452eb08ac75d008667fd619b185e4785f5a2" in workflow assert "$.observation.outcome.reason" in workflow assert "intrepidkarthi/orderbook` v0.26.0" in root_readme assert "integrations/intrepid_orderbook/" in architecture diff --git a/tests/test_release_metadata.py b/tests/test_release_metadata.py index d1b85ee..9d123ff 100644 --- a/tests/test_release_metadata.py +++ b/tests/test_release_metadata.py @@ -1,4 +1,5 @@ import json +import re from pathlib import Path try: @@ -8,6 +9,7 @@ import tracebook from tracebook._version import __version__ +from tools.verify_distribution_split import EXPECTED_VERSION ROOT = Path(__file__).resolve().parents[1] ROOT_DEVELOPMENT_EXTRAS = ("dev",) @@ -28,13 +30,30 @@ def test_runtime_version_has_single_source_of_truth(): metadata = _pyproject() assert tracebook.__version__ == __version__ - assert __version__ == "0.6.0" + assert __version__ == "0.7.0" assert metadata["project"]["dynamic"] == ["version"] assert metadata["tool"]["setuptools"]["dynamic"]["version"] == { "attr": "tracebook._version.__version__" } +def test_release_command_gates_match_the_prepared_package_version(): + assert EXPECTED_VERSION == __version__ + for relative_path in ( + "Makefile", + ".github/workflows/ci.yml", + ".github/workflows/release.yml", + "CONTRIBUTING.md", + "docs/release.md", + ): + contents = (ROOT / relative_path).read_text(encoding="utf-8") + versions = re.findall(r"--expected-version\s+(\d+\.\d+\.\d+)", contents) + assert versions, f"{relative_path} omits the coordinated version check" + assert set(versions) == {__version__}, relative_path + draft = ROOT / "docs" / "releases" / f"{__version__}.md" + assert "Draft — not published" in draft.read_text(encoding="utf-8") + + def test_distribution_name_cli_and_typing_metadata_are_release_ready(): metadata = _pyproject() project = metadata["project"] @@ -105,9 +124,9 @@ def test_simulator_facade_has_exact_version_dependency_and_no_packages(): assert _pyproject()["build-system"]["requires"] == build_requirements assert metadata["build-system"]["requires"] == build_requirements assert project["name"] == "tracebook-sim" - assert project["version"] == "0.6.0" + assert project["version"] == __version__ assert project["dependencies"] == [ - "tracebook-conformance==0.6.0", + f"tracebook-conformance=={__version__}", "numpy>=2.2.6", "psutil>=7.2.2", ] diff --git a/tools/verify_distribution_split.py b/tools/verify_distribution_split.py index 764a5f7..38eebf8 100644 --- a/tools/verify_distribution_split.py +++ b/tools/verify_distribution_split.py @@ -34,7 +34,7 @@ from pathlib import Path from typing import Iterable, Mapping, Sequence -EXPECTED_VERSION = "0.6.0" +EXPECTED_VERSION = "0.7.0" LEGACY_VERSION = "0.5.0" OFFICIAL_LEGACY_WHEEL_SHA256 = "d190e1c2af83e5d853b0734b4d9627b1a8f6707e0fbab391015d2d94437cd4da" CONFORMANCE_DISTRIBUTION = "tracebook-conformance"