Repository navigation
fix: restore python-pydantic and build pydantic-core from vendored crates - #248
Merged
Merged
Conversation
…ates Reverts #244. input-remapper is in the consumer contract (config/bluefin-packages.toml) and requires python3dist(pydantic) at runtime, so publish in run 36073571248 failed on nothing provides python3.14dist(pydantic) needed by input-remapper #244 had checked only BuildRequires and Utah's manifests. pydantic-core never built because Fedora's recipe takes every Rust crate as a system RPM through %cargo_generate_buildrequires, and Fedora 44 and Hummingbird ship none of them. Build it vendored instead: - tools/generated_sources.py gains a python-pydantic-core generator: the sha512-pinned PyPI sdist plus vendor/<crate>-<version> for every crate its Cargo.lock pins, each download checked against the Cargo.lock SHA-256, with .cargo-checksum.json as cargo vendor writes it. Stdlib only, no cargo needed; two runs give identical bytes (sha512 b20f43b5...). - The lock entry becomes a generate entry; `sources` is repinned. - The spec uses %cargo_prep -v vendor, drops %cargo_generate_buildrequires, writes %cargo_vendor_manifest, and drops Fedora's two Cargo.toml patches (jiter range, PyO3 0.29) that only exist to match Fedora's crate RPMs; the lockfile's PyO3 0.28.3 supports Python 3.14. Verified in fedora:44 + Hummingbird (cargo 1.98.1, Python 3.14.7): `cargo check --offline --locked --release` against the vendored tree succeeds, and tools/source_pipeline.py accepts the generated source. docs/contributing.md now says to check the runtime closure of the consumer contract before removing a package as unneeded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv
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.
Why
Run 36073571248 built every package, but
publishfailed its consumer-transaction check:input-remapperis in the consumer contract (config/bluefin-packages.toml) and requires pydantic at runtime. My #244 removed pydantic after checking only BuildRequires and Utah's manifests. That was wrong, and this PR reverts it.What
pydantic-core had never built because Fedora's recipe takes every Rust crate as a system RPM (
%cargo_generate_buildrequires), and Fedora 44 and Hummingbird ship none of them. It now builds from vendored crates:tools/generated_sources.pygets apython-pydantic-coregenerator, following the existing intel-media-driver-free and tailscale precedents. It takes the sha512-pinned PyPI sdist, addsvendor/<crate>-<version>for every crate itsCargo.lockpins, and checks each crates.io download against the Cargo.lock SHA-256. It writes.cargo-checksum.jsonthe waycargo vendordoes and repacks deterministically. It uses only the Python standard library, no cargo. Two runs give identical bytes (b20f43b5…), and unit tests cover determinism, lock parsing, refusal of git sources, and a substituted crate failing closed.generateentry, andsourcesis repinned.%cargo_prep -v vendorand drops%cargo_generate_buildrequires;%cargo_vendor_manifestand shipscargo-vendor.txtas%license;Verified in fedora:44 + Hummingbird (cargo 1.98.1, Python 3.14.7):
cargo check --offline --locked --releaseon the vendored tree succeeds, andtools/source_pipeline.py python-pydantic-coreaccepts the generated source.The counts go back to 373.
docs/contributing.mdnow says to check the consumer contract's runtime closure before removing a package as "unneeded".🤖 Generated with Claude Code
https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv