bundle: expose trusted resolved XLS producer identity#61
Open
dank-openai wants to merge 1 commit into
Open
Conversation
## Summary - Materialize xlsynth-crate and XLS from independent release or exact-revision pins. - Expose one validated producer-identity manifest through `XlsArtifactBundleInfo`. - Restrict authoritative identity to the paired generated download-only runtime and toolchain. - Preserve existing local and installed bundle modes when authoritative identity is not requested. ## Problem Solved Auto-SPO structural IDs need to record the producer revisions that actually supplied the XLSynth driver and XLS runtime. Caller-provided version strings or unrelated local binaries could otherwise describe one toolchain while executing another. The generated bundle now carries a resolved identity sidecar produced and validated along the same materialization path as the driver and runtime artifacts. ## Mental Model For an archive-capable bundle: ```text typed xlsynth-crate pin + typed XLS pin -> generated download-only runtime/toolchain pair -> validated resolved identity sidecar -> XlsArtifactBundleInfo.resolved_identity ``` Exact XLS Git revisions are accepted only when they map to published XLS release artifacts. The trusted boundary protects the generated Bazel graph; replacing `rules_xlsynth` itself or overriding generated repositories remains outside the contract. ## Validation - `python3 -B -m unittest artifact_resolution_test.py` - 65 tests - `bazel test //:trusted_identity_boundary_test` - `bazel cquery @rules_xlsynth_selftest_xls_toolchain//:xlsynth-driver --output=label` - `buildifier -lint=warn -mode=check BUILD.bazel xls_toolchain.bzl trusted_identity_boundary_test.bzl` pr:structural-id-materializer
30c36eb to
548cde7
Compare
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.
Summary
XlsArtifactBundleInfo.Problem Solved
Auto-SPO structural IDs need to record the producer revisions that actually supplied the XLSynth driver and XLS runtime. Caller-provided version strings or unrelated local binaries could otherwise describe one toolchain while executing another.
The generated bundle now carries a resolved identity sidecar produced and validated along the same materialization path as the driver and runtime artifacts.
Mental Model
For an archive-capable bundle:
Exact XLS Git revisions are accepted only when they map to published XLS release artifacts. The trusted boundary protects the generated Bazel graph; replacing
rules_xlsynthitself or overriding generated repositories remains outside the contract.Validation
python3 -B -m unittest artifact_resolution_test.py- 65 testsbazel test //:trusted_identity_boundary_testbazel cquery @rules_xlsynth_selftest_xls_toolchain//:xlsynth-driver --output=labelbuildifier -lint=warn -mode=check BUILD.bazel xls_toolchain.bzl trusted_identity_boundary_test.bzlStack: