feat(ae add): require .sha256 on binary packages + --target foreign fetch (#2105, #2108) - #2110
Merged
Merged
Conversation
…e> (#2105, #2108) Two follow-ups on the ae add binary-package path, both scoped to the aether side (the publisher-side aether.toml wiring in #2105 is a downstream release change). #2105 checksum strictness: a binary package now REQUIRES a published .sha256. The bare-lib path previously matched the archive path -- warn and install unverified when no checksum sidecar was published. A raw shared library fetched over the network deserves mandatory verification (stricter than a git tag or a source archive), so ae_try_binary_package now treats a missing .sha256 as fatal (refuses to install). A published-but-mismatched checksum stays fatal as before. #2108 --target: fetch a FOREIGN platform's binary package instead of the host's, for cross-platform bundling / release CI. `ae add pkg@v --target macos-arm64` fetches <stem>-<v>-macos-arm64.dylib using the TRIPLE's OS extension (new ae_shlib_ext_for_triple), not the host's. With an explicit --target the binary package is the only correct path -- a host source archive/git clone would build the wrong platform -- so a non-binary-package target is a hard error, not a fall-through. --target and --source are mutually exclusive. (--all-targets and --source dual-mode from #2108 remain tracked-future; only --target now.) ae_try_release_asset takes a target param (NULL = host); the flag is parsed in cmd_add and the usage text documents both. The common leaf-consumer host path is unchanged. Test: ae_add_binary_package gains 4b (missing .sha256 is refused), 4c (--target fetches the foreign lib under the right ext; --target+--source rejected). Existing binary_import + dep_resolution unaffected. 3/3 stable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Two follow-ups on the
ae addbinary-package path, from #2105 and #2108. Both scoped to the aether side — the publisher-sideaether.tomlrelease wiring tracked in #2105 is a downstream (libphonenumber-aerelease/) change, not aether code.#2105 — binary packages require a published
.sha256The bare-lib path previously matched the archive path: warn and install unverified when no checksum sidecar was published. A raw shared library downloaded over the network deserves mandatory verification (stricter than a git tag or a source archive), so
ae_try_binary_packagenow refuses to install a binary package with no.sha256. A published-but-mismatched checksum stays fatal, as before.Resolves the deferred checksum-strictness question in #2105 (and the checksum knob noted in #2108).
#2108 —
ae add --target <triple>Fetch a foreign platform's binary package instead of the host's, for cross-platform bundling / release CI:
<stem>-<tag>-macos-arm64.dylibusing the triple's OS extension (newae_shlib_ext_for_triple), not the host's.--target, the binary package is the only correct path — a host source archive / git clone would build the wrong platform — so a non-binary-package target is a hard error, not a fall-through.--targetand--sourceare mutually exclusive.The common leaf-consumer host path is unchanged.
--all-targetsand--sourcedual-mode from #2108 remain tracked-future (only--targetimplemented now, per scope).Test
ae_add_binary_packagegains: 4b (a missing.sha256is refused), 4c (--targetfetches the foreign lib under the right extension;--target+--sourcerejected). Existingbinary_import+dep_resolutionunaffected. 3/3 stable.Closes #2108 (the
--targethalf;--all-targets/--sourceleft as a future note there). Addresses the deferred aether-side half of #2105 (checksum); the publisher-side wiring in #2105 stays open as a downstream task.🤖 Generated with Claude Code
https://claude.ai/code/session_01YAS2Xtsem7MRFggdiEaakq