Skip to content

fix(bundles): bind saved bundle locks to third-party root versions - #886

Merged
ShaiShmuel merged 2 commits into
mainfrom
fix/release-refresh-bundle-locks
Nov 3, 2026
Merged

ShaiShmuel merged 2 commits into
mainfrom
fix/release-refresh-bundle-locks

Conversation

@ShaiShmuel

@ShaiShmuel ShaiShmuel commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The 0.11.0 release PR (#884) fails 17 checks: Bundle resolution, every server image build, CPU containers, both CUDA 13 compatibility jobs, and Release candidate / Complete. Every one fails with bundle lock inputs changed; recompile and review the complete closure.

Each saved bundle manifest binds the SHA256 of the whole root uv.lock. The release PR refresh runs uv lock, which rewrites the workspace package versions (0.10.1 -> 0.11.0). That makes all 16 manifests stale, even though no input of any bundle closure changed. 0.11.0 is the first release since the saved bundle locks landed in #802.

This change binds each manifest to the exact third-party versions in the root lock instead of to the file's bytes. The input digest is renamed from uv_lock_sha256 to root_versions_sha256. All 16 manifests are regenerated with the existing 2026-10-18T00:00:00Z cutoff. No pylock.toml changes.

Why not recompile in the release workflow

  • The refresh step runs in the protected release-automation job, which holds the release App's write token. It deliberately runs no third-party code (--ignore-scripts). A compile there would need a full root environment sync and uv 0.9.28. The resolve would also have to build metadata for 10 sdist-only distributions and one Git source, so third-party build code would run next to the write token.
  • The release contract checker pins that step to an exact command sequence.
  • The compile would only re-stamp a hash. See evidence item 1.

Evidence

  1. I recompiled all 16 targets against the current release branch head (ff398c2) with the existing cutoff and uv 0.9.28. All 16 pylock.toml files stay byte-identical. The only change in each manifest is uv_lock_sha256.
  2. The release branch's root lock has the same third-party name/version set as main (370 distributions). The release job's uv 0.5.31 also drops the graalpy wheels of jiter, pybase64 and pydantic-core. No bundle closure uses those wheels, so the exception check still passes.
  3. On this branch, recompiling all 16 targets with the same cutoff leaves every pylock.toml byte-identical. Each manifest changes in two places only: policy_sha256, because the verifier and compiler sources changed, and the renamed input digest.
  4. tools/ci/bundle_lock.py check passes on this branch. It also passes, without a recompile, on the release-branch tree with this change applied.

What stays bound

  • Every third-party root distribution and its exact versions, including local labels such as +cu129. Any root version change still invalidates every manifest.
  • Artifact sources. check_lock already reruns validate_exceptions against the current root lock on every check. A new test shows that substituting an artifact at the same version still fails.
  • Unchanged: bundle declarations, target, uv version, exceptions, source pins, lock hash, and the compiler, verifier and declaration-resolver source hashes.

Workspace members and lock serialization are no longer bound. They never reach bundle-libs: root_packages already skips editable and virtual workspace entries when it derives constraints.

Release flow

This needs no change to the workflow or the release contract. After it merges, the next release-PR refresh rewrites uv.lock without invalidating the saved locks.

This changes the bundle-lock integrity binding from #802, so it needs review from the bundle-lock owner.

Test plan

  • pytest packages/sie_server/tests/core/test_bundle_lock.py
  • python tools/ci/bundle_lock.py check (this branch, and the release-branch tree with this change)
  • SIE_RUN_IMAGE_RESOLUTION=1 pytest packages/sie_server/tests/core/test_bundle_image_resolution.py with uv 0.9.28
  • python tools/ci/check_release_contract.py
  • mise run lint, mise run typecheck

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Lock verification now checks third-party package versions and continues to validate locked artifacts against the current dependency lock.
    • Release version bumps and lock-file formatting changes no longer invalidate bundle checks by themselves.
    • Changes to a locked artifact are still detected, even when its package version stays the same.

Each saved bundle manifest bound the SHA256 of the whole root uv.lock.
A release PR refresh rewrites the workspace package versions in that
file, so every manifest went stale and the verifier rejected all 16
targets with "bundle lock inputs changed" although no closure input
changed. Recompiling the 16 targets against the 0.11.0 release branch
with the existing 2026-10-18T00:00:00Z cutoff leaves every pylock.toml
byte-identical; only the root lock hash moves.

Bind the manifest to the exact third-party name/version set of the root
lock, which is what compilation constrains. Workspace members and lock
serialization no longer invalidate a closure. Artifact sources remain
checked on every verification through the exception policy, and any
root version change still requires recompilation.

Regenerate all 16 manifests with the same cutoff and uv 0.9.28. No
pylock.toml changes; manifests change only in policy_sha256 and the
renamed root_versions_sha256 input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

Bundle lock manifests now bind to exact third-party root package versions rather than the serialized root lock file. The checker and CI compiler use the new digest. Tests cover ignored lock metadata, root dependency changes, and artifact hash changes.

Changes: Bundle lock binding

Layer / File(s) Summary
Root-version digest and verification
packages/sie_server/src/sie_server/bundle_lock.py, tools/ci/bundle_lock.py, packages/sie_server/tests/core/test_bundle_lock.py
The checker and CI compiler use a digest of canonical third-party package names and sorted versions. Tests cover workspace and serialization changes, dependency-set changes, and artifact hash changes.
Saved manifest updates
packages/sie_server/bundle-locks/*/manifest.json, packages/sie_server/bundle-locks/README.md
Saved manifests replace uv_lock_sha256 with root_versions_sha256 and update policy_sha256; lock_sha256 remains unchanged. The README describes the revised binding inputs.

Possibly related PRs

  • superlinked/sie#855: Its generated manifests use uv_lock_sha256, which this change replaces with root_versions_sha256.
  • superlinked/sie#878: It updates Transformers 5 bundle locks and manifests that this change also revises.
  • superlinked/sie#845: It adds the saved embedding manifest included in these manifest updates.

Suggested reviewers: svonava, krisztian-gajdar

Merge Risk: Minimal · up to 7736b

The new binding is consistent and no merge-blocking risk is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(bundles): bind saved bundle locks to third-party root versions" matches the main change. The PR replaces the full uv.lock hash (uv_lock_sha256) with root_versions_sha256, a digest…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(bundles): bind saved bundle locks to third-party root versions" matches the main change. The PR replaces the full uv.lock hash (uv_lock_sha256) with root_versions_sha256, a digest of exact third-party root package versions. The 16 bundle-lock manifests, bundle_lock.py, the tests, and the CI script all implement this change. The title names the bound input (third-party root versions) and the subject (saved bundle locks). It does not name the rename or the policy_sha256 update, which are secondary details.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 3 files. (16 skipped: 16 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: e8169f54-0f37-46aa-b167-66d9d10bedd1
Commits

Reviewing files that changed from the base of the PR and between aa27832 and 7736b91.

Files selected for processing: 18
  • packages/sie_server/bundle-locks/cpu-ctranslate2-amd64/manifest.json
  • packages/sie_server/bundle-locks/cpu-ctranslate2-arm64/manifest.json
  • packages/sie_server/bundle-locks/cpu-default-amd64/manifest.json
  • packages/sie_server/bundle-locks/cpu-default-arm64/manifest.json
  • packages/sie_server/bundle-locks/cpu-sglang-amd64/manifest.json
  • packages/sie_server/bundle-locks/cpu-sglang-arm64/manifest.json
  • packages/sie_server/bundle-locks/cpu-transformers5-amd64/manifest.json
  • packages/sie_server/bundle-locks/cpu-transformers5-arm64/manifest.json
  • packages/sie_server/bundle-locks/cuda12-ctranslate2-amd64/manifest.json
  • packages/sie_server/bundle-locks/cuda12-default-amd64/manifest.json
  • packages/sie_server/bundle-locks/cuda12-sglang-amd64/manifest.json
  • packages/sie_server/bundle-locks/cuda12-sglang-embedding-amd64/manifest.json
  • packages/sie_server/bundle-locks/cuda12-sglang-vision-extract-amd64/manifest.json
  • packages/sie_server/bundle-locks/cuda12-transformers5-amd64/manifest.json
  • packages/sie_server/bundle-locks/cuda13-sglang-cu130-amd64/manifest.json
  • packages/sie_server/bundle-locks/cuda13-tensorrt-llm-amd64/manifest.json
  • packages/sie_server/src/sie_server/bundle_lock.py
  • packages/sie_server/tests/core/test_bundle_lock.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@ShaiShmuel
ShaiShmuel marked this pull request as ready for review November 3, 2026 13:51
@ShaiShmuel
ShaiShmuel requested a review from a team as a code owner November 3, 2026 13:51

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

The root lock records torchvision 0.24.1 from two registries. Hashing
the version list made the binding depend on how many source rows share
a version, so dropping or adding one source row would invalidate all 16
manifests although the compilation constraints stay the same. Hash the
set of exact versions; artifact sources stay checked on every
verification through the exception policy.

Regenerate all 16 manifests with the 2026-10-18T00:00:00Z cutoff and
uv 0.9.28. No pylock.toml changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Bundle-lock owner review is needed to confirm that narrowing integrity checks from all root-lock bytes to version-only binding plus exception-policy checks preserves supply-chain guarantees across supported targets.

No open issues 🎉

What changed in this PR

This PR prevents release-only workspace version bumps from invalidating SIE’s saved bundle locks, addressing the release failure described in #884. It replaces the whole-file root-lock digest introduced in #802 with a digest of exact third-party package versions.

Changes:

  • Update compilation and verification to use root_versions_sha256, while retaining artifact validation through the exception policy.
  • Add regression tests for tolerated workspace and serialization changes and rejected artifact substitutions.
  • Refresh all 16 manifests and document the revised binding; no pylock.toml files change.
File Description
tools/​ci/​bundle_lock.py Write the third-party version digest during compilation.
packages/​sie_server/​tests/​core/​test_bundle_lock.py Test the revised invalidation and artifact checks.
packages/​sie_server/​src/​sie_server/​bundle_lock.py Compute and verify the third-party version digest.
packages/​sie_server/​bundle-locks/​README.md Document the revised lock-binding contract.
packages/​sie_server/​bundle-locks/​cuda13-tensorrt-llm-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cuda13-sglang-cu130-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cuda12-transformers5-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cuda12-sglang-vision-extract-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cuda12-sglang-embedding-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cuda12-sglang-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cuda12-default-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cuda12-ctranslate2-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-transformers5-arm64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-transformers5-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-sglang-arm64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-sglang-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-default-arm64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-default-amd64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-ctranslate2-arm64/​manifest.json Refresh root-version and policy digests.
packages/​sie_server/​bundle-locks/​cpu-ctranslate2-amd64/​manifest.json Refresh root-version and policy digests.

Review effort: Balanced

@ShaiShmuel
ShaiShmuel added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit fb2fac2 Nov 3, 2026
47 checks passed
@ShaiShmuel
ShaiShmuel deleted the fix/release-refresh-bundle-locks branch November 3, 2026 15:53
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.

2 participants