Repository navigation
0.7.1: the cargo knapsack in Rust (optional binding, CI); no number moves - #14
Merged
Merged
Conversation
rust/cargo_core ports optimal_payload_mix, _hold_refining and _capped_sale_value operation for operation; plain Rust, so economicspace's es_core can link it with no Python boundary. rust/cargo_py is an optional PyO3 module (spacevalue_cargo_rs) with the same signatures; nothing in spacevalue imports it. tests/test_cargo_rust.py replays every golden call through it (0 differ) and fuzzes 120,000 hostile calls against the Python, exceptions included (0 differ). The planted_knapsack_defect build fails all six tests. Skips without the module unless SPACEVALUE_REQUIRE_RUST=1. Full suite: 189 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hold and capped-sale fuzzes had no share check, and the mix fuzz read process-wide counters, so a build answering everything through the Python fallback compared the Python with itself and passed. Each now requires Rust to have answered more calls than it handed back, counted since the test began (planted all-fallback: 3 of 3 caught). SPACEVALUE_REQUIRE_RUST accepts any value but unset or 0. Ignore cargo_core's Cargo.lock, which cargo test regenerates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s ships from the tag (no number moves)
loggger101
added a commit
to loggger101/economicspace
that referenced
this pull request
Nov 18, 2026
… that tag spacevalue 0.7.1 (loggger101/spacevalue#14) moves no number: nothing under spacevalue/ changed but __version__. It ships the Rust knapsack copy and its optional binding from the tag, with CI building and testing both. - The spacevalue pin, in its five places, is now v0.7.1. - rust/es_core/Cargo.toml links spacevalue_cargo_core by git at tag v0.7.1 (Cargo.lock: 80ec754), no longer a path into the sibling checkout. - requirements-rust.txt: the opt-in Rust install (the binding from the tag and es_core from this checkout); never auto-installed, it needs Rust. calc's import guard names it. - verify_docs.py check 7: rust_pin_findings holds Cargo.toml's tag and requirements-rust.txt's ref to requirements.txt's spacevalue pin, and refuses a path or extra key; six planted mismatches each caught. - Gate step sv_checkout_at_pin: the spacevalue checkout the gate builds the binding from must be the locked commit (an older checkout is refused).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 0.7.1. Data contract 1.21.0 unchanged and no number moves: nothing under
spacevalue/changed except__version__.What it adds
rust/cargo_core: a plain-Rust port ofcargo.py'soptimal_payload_mix,_hold_refiningand_capped_sale_value, operation for operation. economicspace'ses_corelinks it.rust/cargo_py: an optional PyO3 binding,spacevalue_cargo_rs.spacevaluenever imports it. It installs from the tag:pip install "spacevalue_cargo_rs @ git+https://github.com/loggger101/spacevalue@v0.7.1#subdirectory=rust/cargo_py"(needs a Rust toolchain). It is not an extra, because then every install ofspacevaluewould need a Rust toolchain.tests/test_cargo_rust.pyholds the binding to the Python bit for bit: the golden replay, plus fuzzed calls with exceptions compared. It skips when the binding is missing, unlessSPACEVALUE_REQUIRE_RUST=1.rustjob in CI (three hosts, Python 3.13 and 3.14):planted_knapsack_defect, one ulp in every take) must fail all six Rust tests.test_cargo_rust.pyruns withSPACEVALUE_REQUIRE_RUST=1, then the whole suite.cargo_corehas no Rust tests (it is tested only againstcargo.py, through the binding), so the job has nocargo teststep. That step would pass on zero tests.Evidence
rust-solver-prototype), which buildses_coreagainst this crate: 32/32 at cislunar, 29/29 at geo and mars_surface. Its e2e catalogs are byte-identical between Python and Rust.After merge: tag
v0.7.1from main; economicspace then repins to it.