Repository navigation
feat(release): admit independently authorized candidate bytes (#1343) - #1379
EffortlessSteven wants to merge 2 commits into
Conversation
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 23 minutes. View limit details
No actionable comments were generated in the recent review. ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughThe xtask package adds an offline release-byte admission module. It parses release packets, validates producer and tag observations, authorization, checksums, and archive contents, then returns a verified publication with an expiry bound. ChangesRelease-byte admission
Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Merge Risk:
|
|
Rebase blocked or not converging - deferring to the owning session with scope: Cargo.lock (regenerate it on a fresh rebase). The branch predates the mid-October main reorganization, so landing it needs a focused pass rather than a mechanical union. Re-run the standard rebase plus receipt loop after the fix. |
25686bc to
c54f963
Compare
| pub const CHECKSUM_ASSET: &str = "ub-review-x86_64-unknown-linux-gnu.tar.gz.sha256"; | ||
| pub const MAX_ARCHIVE_BYTES: usize = 64 * 1024 * 1024; | ||
| const MAX_PACKET_BYTES: usize = 16 * 1024; | ||
| const MAX_TAR_BYTES: usize = MAX_ARCHIVE_BYTES + 4096; |
There was a problem hiding this comment.
🟡 Near-limit release archives fail admission
For a compressible 64 MiB binary, inventory can reject its GNU tar archive as oversized. GNU tar pads records to 10 KiB, exceeding MAX_TAR_BYTES even when the binary and compressed archive meet their limits.
Learn more
The validator caps both compressed input and the tar member at 64 MiB. GNU tar's default blocking factor pads its output to 20 512-byte records, so the decompressed tar can exceed the member size by more than 4096 bytes. The bounded decoder rejects that tar before inspecting its otherwise valid header and member.
Example: A 64 MiB binary with enough compressible content produces a gzip archive below 64 MiB. GNU tar pads the uncompressed tar past 64 MiB + 4096 bytes; inventory returns ArchiveBounds instead of admitting it.
Recommended fix: Calculate MAX_TAR_BYTES to include a header, member block rounding, and the producer's 10240-byte tar record rounding. Keep the separate member-size check, and test a compressible near-limit binary packaged with GNU tar.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Rebase blocked on content conflicts and the gate failed after rebase - deferring to the owning session with scope: the branch touches xtask/src/release_bytes.rs (974 lines), docs, and scripts related to the authorized release-bytes feature. The branch predates the mid-October main reorganization; landing it needs a focused feature-port. The rebase resolved Cargo.lock automatically but hit deeper content collisions. Re-run the standard rebase + receipt loop after the port. |
|
Owner ping: this PR needs either (1) a focused feature-port onto current main (the mid-October module extraction moved significant code; the rebase hits real content collisions that a mechanical union cannot resolve), or (2) formal closure as won't-fix if the feature is no longer needed. The fix-or-suppress train has cycled this PR multiple times; the gate and rebase tooling are ready whenever the port is done. Please advise. |
|
Owner ping: this PR needs either (1) a focused port of the release-bytes feature onto current main (the branch touches xtask/src/release_bytes.rs and related files that predate the mid-October reorganization), or (2) formal closure as won't-fix. The gate failed after rebase due to deeper content collisions. Please advise or close. |
|
Rejected: needs a focused feature-port, deferring to the owning session. This branch adds 974 lines to xtask/src/release_bytes.rs plus related files for the independently authorized candidate release-bytes feature. The branch predates the mid-October main reorganization and the rebase hits content collisions that a mechanical union cannot resolve. The gate failed after rebase. The feature's intent (authorized release-bytes admission with verified authority) is preserved in the branch history. Reopen and re-run the standard rebase + receipt loop after porting onto current main. |
The release workflow currently verifies its own rebuild, which cannot establish that publication uses independently authorized candidate bytes. This pure xtask library validates strict
ub-review.authorized_release.v1packets against separately supplied trusted authorization and successful producer/artifact/tag observations, then captures exact archive/checksum bytes in a private immutable verified object. It performs no publication I/O or binary execution.Refs #1343, #1300. Existing candidate v1 receipts and release workflows remain unchanged. #1344 retains external authority/API authentication, actual prepared-byte promotion, tag/release collision checks and partial-publication recovery; it remains blocked on reviewed validator merge. Binary/version/toolchain facts require independent trusted evidence. This module binds those claims to bytes without executing archive contents.
Validation and remaining blockers:
25686bcacb86d441ce08c82de1b79cb7e61486b0, tree00a8ec4d35c23682c15e48d1829ec2e9c8f6d4b0; base411d68f9591e56c708e5083278907c0bd8388f96. Remote SHA matches; checkout clean. Original frozen head9b223f16e92af946a9da4383847ff7fa99cbb837is retained as the analyzer corpus.validated_authorityremoves the header-shaped syntax; scanner, renderer, schema, public accessors, runtime security negatives, policy, suppression and analyzer pins are unchanged.Handoff: publish only captured verified slices after
ensure_currentwith trusted time. Tag absence is a point-in-time observation rather than a reservation; #1344 must settle validation-before-tag ordering and freshly verify the created tag peel and Release/asset collisions. No production adapter, workflow activation, merge, deployment or release is authorized or performed here. Logs, emitted dry-run packets, frozen raw/badge corpora, source-role classifications and compiled-control receipts remain under/tmp/1343-evidence/in the saved environment.