From 44e52023a4f35926b128a99abffd8f9321d26202 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 1 Nov 2026 12:53:11 -0500 Subject: [PATCH] chore(release): 1.9.0 --- .github/DISCUSSION_TEMPLATE/q-a.yml | 2 +- .github/DISCUSSION_TEMPLATE/show-and-tell.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 4 +-- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/workflows/ci.yml | 10 +++--- .github/workflows/rc.yml | 8 ++--- .github/workflows/release.yml | 10 +++--- CHANGELOG.md | 6 ++++ CITATION.cff | 2 +- README.md | 4 +-- codemeta.json | 2 +- docs/GUARANTEES.md | 2 +- docs/PUBLIC-API.md | 9 +++-- docs/UNITS-AND-NUMERICS.md | 36 +++++++++++++++++++ pyproject.toml | 4 +-- src/packvium_native/__init__.py | 2 +- 16 files changed, 75 insertions(+), 30 deletions(-) diff --git a/.github/DISCUSSION_TEMPLATE/q-a.yml b/.github/DISCUSSION_TEMPLATE/q-a.yml index 37ec047..415f356 100644 --- a/.github/DISCUSSION_TEMPLATE/q-a.yml +++ b/.github/DISCUSSION_TEMPLATE/q-a.yml @@ -10,7 +10,7 @@ body: id: package-version attributes: label: Package and version - placeholder: "packvium-native 1.8.0 (Python)" + placeholder: "packvium-native 1.9.0 (Python)" validations: required: true - type: textarea diff --git a/.github/DISCUSSION_TEMPLATE/show-and-tell.yml b/.github/DISCUSSION_TEMPLATE/show-and-tell.yml index 2f06fbb..6b6355c 100644 --- a/.github/DISCUSSION_TEMPLATE/show-and-tell.yml +++ b/.github/DISCUSSION_TEMPLATE/show-and-tell.yml @@ -16,7 +16,7 @@ body: id: package-version attributes: label: Package and version - placeholder: "packvium-native 1.8.0 (Python)" + placeholder: "packvium-native 1.9.0 (Python)" validations: required: false - type: textarea diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 89b5651..4605f6f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -33,8 +33,8 @@ body: id: version attributes: label: Package version - description: The exact version installed, for example 1.8.0. - placeholder: "1.8.0" + description: The exact version installed, for example 1.9.0. + placeholder: "1.9.0" validations: required: true - type: input diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index f86809b..681464a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -29,7 +29,7 @@ body: id: version attributes: label: Package version - placeholder: "1.8.0" + placeholder: "1.9.0" validations: required: true - type: textarea diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee57988..bd00d13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: os: [ubuntu-24.04, macos-latest, windows-latest] python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python }} - run: python -m pip install --upgrade pip @@ -32,8 +32,8 @@ jobs: install-without-extras: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: {python-version: "3.12"} - run: python -m pip install . - run: python -c "import packvium_native; print(packvium_native.backend())" @@ -48,7 +48,7 @@ jobs: contents: read pull-requests: write steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 with: fail-on-severity: low diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index 7f8277c..55eb7e9 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -27,8 +27,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.12" - run: python -m pip install --upgrade pip build twine @@ -54,7 +54,7 @@ jobs: /tmp/clean/bin/python -m pip install --quiet --no-index --find-links dist packvium-native /tmp/clean/bin/python -m pytest tests -q - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: distributions path: dist/ @@ -71,7 +71,7 @@ jobs: id-token: write # OIDC, for Trusted Publishing and for the attestation attestations: write # build provenance, so a consumer can verify where a file came from steps: - - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: distributions path: dist/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7a0dee..8ce412c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,8 +25,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.12" - run: python -m pip install --upgrade pip build twine @@ -52,7 +52,7 @@ jobs: /tmp/clean/bin/python -m pip install --quiet --no-index --find-links dist packvium-native /tmp/clean/bin/python -m pytest tests -q - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: distributions path: dist/ @@ -65,7 +65,7 @@ jobs: id-token: write # OIDC, for Trusted Publishing and for the attestation attestations: write # build provenance, so a consumer can verify where a file came from steps: - - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: distributions path: dist/ @@ -89,7 +89,7 @@ jobs: permissions: contents: write # the Release is the only thing this workflow writes to the repository steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - name: Create the GitHub Release from the tag env: GH_TOKEN: ${{ github.token }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 7790a9a..7aee1ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ What changed in `packvium-native` (Python), release by release. The format follo [Keep a Changelog](https://keepachangelog.com/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.9.0] + +No changes of its own; the `native` extra is pinned to `packvium-native-rust==1.9.0`. Neither +this package nor that one is on PyPI yet, so use +[`packvium`](https://pypi.org/project/packvium/) directly. + ## [1.8.0] No changes of its own; the `native` extra is pinned to `packvium-native-rust==1.8.0`. Neither diff --git a/CITATION.cff b/CITATION.cff index da4c96b..395ffb4 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -5,7 +5,7 @@ type: software authors: - name: "Packvium contributors" website: "https://packvium.com" -version: "1.8.0" +version: "1.9.0" license: MIT url: "https://packvium.com" repository-code: "https://github.com/toxakara/packvium-python-adapter" diff --git a/README.md b/README.md index 038cd01..c6ef5bc 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Documentation, the constraint reference and the benchmarks are at | --- | --- | --- | | Python — [`packvium`](https://pypi.org/project/packvium/) | `pip install packvium` | [packvium-python](https://github.com/toxakara/packvium-python) | | PHP — [`packvium/packvium`](https://packagist.org/packages/packvium/packvium) | `composer require packvium/packvium` | [packvium-php](https://github.com/toxakara/packvium-php) | -| Rust — [`packvium`](https://crates.io/crates/packvium) | `packvium = "1.8"` | [packvium-rust](https://github.com/toxakara/packvium-rust) | +| Rust — [`packvium`](https://crates.io/crates/packvium) | `packvium = "1.9"` | [packvium-rust](https://github.com/toxakara/packvium-rust) | | Node.js — [`@packvium/engine`](https://www.npmjs.com/package/@packvium/engine) | `npm install @packvium/engine` | [packvium-node](https://github.com/toxakara/packvium-node) | | Browser / WebAssembly — [`@packvium/browser`](https://www.npmjs.com/package/@packvium/browser) | `npm install @packvium/browser` | [packvium-wasm](https://github.com/toxakara/packvium-wasm) | | PHP FFI bridge — [`packvium/native-bridge`](https://packagist.org/packages/packvium/native-bridge) | `composer require packvium/native-bridge` | [packvium-php-bridge](https://github.com/toxakara/packvium-php-bridge) | @@ -106,7 +106,7 @@ CodeMeta form. @software{packvium_python_adapter, author = {{Packvium contributors}}, title = {Packvium native backend selector for Python}, - version = {1.8.0}, + version = {1.9.0}, license = {MIT}, url = {https://packvium.com} } diff --git a/codemeta.json b/codemeta.json index 8ceea92..38f8f36 100644 --- a/codemeta.json +++ b/codemeta.json @@ -3,7 +3,7 @@ "@type": "SoftwareSourceCode", "name": "Packvium native backend selector for Python", "description": "Packvium backend selector: the native engine when a wheel is available, pure Python otherwise.", - "version": "1.8.0", + "version": "1.9.0", "license": "https://spdx.org/licenses/MIT", "author": [ { diff --git a/docs/GUARANTEES.md b/docs/GUARANTEES.md index 8cdcba6..0d40bf9 100644 --- a/docs/GUARANTEES.md +++ b/docs/GUARANTEES.md @@ -61,7 +61,7 @@ silently — if you need them, they belong in your own layer above this library. ## Status of this release -Version `1.8.0` freezes the public API. Field names, status codes, the objective +Version `1.9.0` freezes the public API. Field names, status codes, the objective vector, the numeric policy and the validation rules do not change without a major version, so any `1.x` is a safe upgrade from any earlier `1.x`. A caret or tilde constraint on `1.0` is enough; an exact pin is no longer required. diff --git a/docs/PUBLIC-API.md b/docs/PUBLIC-API.md index 0f4fa85..7d8faa3 100644 --- a/docs/PUBLIC-API.md +++ b/docs/PUBLIC-API.md @@ -239,6 +239,9 @@ All counters are non-negative integers. A zero means the selected solver did not that phase; it does not mean the metric is unsupported. Compatibility fields `algorithm.placements_attempted` and `algorithm.candidates_evaluated` remain and must equal `metrics.orientations_considered` and `metrics.feasible_candidates`. +For a multi-start portfolio these counters belong to the selected start; the complete +list of starts is recorded separately in `termination.starts`. Counters are not summed +across starts. Metrics are diagnostics: they never participate in feasibility, ranking or the objective vector. @@ -469,9 +472,9 @@ bounds its work by counting must get the same answer on any machine, and a start own share of the clock would lose quietly, with no flag saying the answer depended on the machine's speed. When the clock does fire, the portfolio-wide deadline is reached and `time_limit_reached` is true. Rust and the JavaScript fallback always run their starts against -the one portfolio deadline. Each start keeps its own counters against the whole budget in -Python, PHP and Rust; the JavaScript fallback hands each later start what the earlier ones -left of one budget, so the same number buys less search there. +the one portfolio deadline. Each start keeps its own counters against the whole budget, in all +four engines; until 1.9.0 the JavaScript fallback handed each later start what the earlier ones +left of one budget, so the same number bought less search there. **Read `any_start_truncated` when the answer must not depend on the budget.** The selected start can finish while another start, one that might have won, was stopped by the budget; the diff --git a/docs/UNITS-AND-NUMERICS.md b/docs/UNITS-AND-NUMERICS.md index fd1e6e6..c09c8e8 100644 --- a/docs/UNITS-AND-NUMERICS.md +++ b/docs/UNITS-AND-NUMERICS.md @@ -59,6 +59,42 @@ a caller would get a number from one and a refusal from another for the same inp carries the guarded sums in a representation that holds `10^30` exactly: Python's `int`, PHP's `BigInt` decimal strings, JavaScript's `BigInt`, Rust's `i128`. +Areas follow the same rule in the search itself (1.9.0). Two lengths below +`PHP_INT_MAX` ticks multiply past a native `int` -- a 10 mm wide item longer than about +3,600 km already does -- and Python and Rust hold that product exactly. PHP forms every such +product (base and contact areas, their sums and the load shared by them, the centre-of-gravity +hull, lattice slot counts, the candidate score's room-left term) through +`Packvium\Support\ExactInteger` and `ExactGeometry`: the native `int` while it fits, an exact +decimal string past it, so an ordinary request pays one `is_int` check. The public +`Dimensions::baseAreaTicks()` and `AxisAlignedBox::overlapAreaXY()` keep their `int` contract. +`support_ratio` and `volume_utilization` are Python's correctly rounded `int / int`, not a +quotient of two doubles. + +**The admission ceiling (1.9.0).** Every engine refuses, before any model is built, a +JSON request with a length past `2^53 - 1` ticks (about 563,000 km) or a box -- an item, a +container's inner or outer dimensions, an obstacle, a made-to-measure step -- enclosing more than +`10^30` cubic ticks (about 244 million cubic metres). Both are `invalid_request` with reason +`above_maximum` at the offending pointer (ERRORS.md). The first is the largest tick +count JavaScript's `Number` holds exactly; the second is the bound path's own ceiling, which keeps +`volume x 10^6` inside Rust's `i128`. Until 1.9.0 each engine failed past its own native limit: Rust +and PHP refused a length past `2^63 - 1` ticks with different errors, Python and JavaScript answered, +Python died with `decimal.InvalidOperation` at `10^20` mm, and Rust overflowed `i128` on a container +past about `1.7 x 10^32` cubic ticks. A whole JSON number past `2^53 - 1` is refused the +same way however a parser stored it, and a value past a native integer is read exactly to tell +which way it is out of range. + +**Weights (1.9.0).** A weight is at most `2^63 - 1` ticks (about 1.15 million +tonnes), and so is every item's weight times its quantity plus the heaviest container tare, so +no container's payload or gross weight can pass a signed 64-bit integer, which is how Rust and +PHP add them. Past either, the request is `invalid_request` / `above_maximum`, at the weight or at +`/items`. A weight written as a JSON number past `2^53 - 1` is `invalid_value`: JavaScript has +rounded such a number before any engine code reads it, so a weight that large is written as a +string. Inside the ceiling every engine is exact: Python's `int`, PHP's `int` and `BigInt`, +Rust's `i64` with `i128` products, and in JavaScript a `BigInt` for every weight sum. A +JavaScript result carries a weight's `ticks`, and a `shipping_cost` score position, as a `Number` +while it is exact and as a `BigInt` past `2^53 - 1`; `stringifyExact` and `parseExact` move such +a result through JSON text without rounding it, and `pack` uses them on both backends. + That intermediate ceiling is deliberately not the result ceiling. The five bound keys can cross JSON and are returned as JavaScript `Number` values, so every engine also refuses a final key above **`2^53 - 1` (`9,007,199,254,740,991`)**. This is the largest integer all four diff --git a/pyproject.toml b/pyproject.toml index aefa26e..fe126e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "packvium-native" -version = "1.8.0" +version = "1.9.0" requires-python = ">=3.9" description = "Packvium backend selector: the native engine when a wheel is available, pure Python otherwise." readme = "README.md" @@ -31,7 +31,7 @@ test = ["pytest", "packvium; python_version >= '3.10'"] # wheel too, rather than requiring a second, separate install command. Pinned to this # release, which `scripts/suite_version.py` keeps in step: a wheel from another release # answers with that release's rules while this selector claims its own. -native = ["packvium-native-rust==1.8.0"] +native = ["packvium-native-rust==1.9.0"] [tool.setuptools.packages.find] where = ["src"] diff --git a/src/packvium_native/__init__.py b/src/packvium_native/__init__.py index f0d186e..d2b0068 100644 --- a/src/packvium_native/__init__.py +++ b/src/packvium_native/__init__.py @@ -4,7 +4,7 @@ from types import ModuleType from typing import Any, Optional -__version__ = "1.8.0" +__version__ = "1.9.0" #: Each untyped model error's code and the prefix the core's `PackError` writes before its #: detail (`packvium-core` `error.rs`). `packvium` reports a model it cannot build as reason