Skip to content

feat(ae add): require .sha256 on binary packages + --target foreign fetch (#2105, #2108) - #2110

Merged
paul-hammant merged 1 commit into
mainfrom
feat/ae-add-binpkg-checksum-target
Sep 19, 2026
Merged

paul-hammant merged 1 commit into
mainfrom
feat/ae-add-binpkg-checksum-target

Conversation

@paul-hammant

Copy link
Copy Markdown
Collaborator

Two follow-ups on the ae add binary-package path, from #2105 and #2108. Both scoped to the aether side — the publisher-side aether.toml release wiring tracked in #2105 is a downstream (libphonenumber-ae release/) change, not aether code.

#2105 — binary packages require 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 downloaded over the network deserves mandatory verification (stricter than a git tag or a source archive), so ae_try_binary_package now 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).

#2108ae add --target <triple>

Fetch a foreign platform's binary package instead of the host's, for cross-platform bundling / release CI:

ae add github.com/user/repo@v1.2.0 --target macos-arm64
  • Names <stem>-<tag>-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.

The common leaf-consumer host path is unchanged. --all-targets and --source dual-mode from #2108 remain tracked-future (only --target implemented now, per scope).

Test

ae_add_binary_package gains: 4b (a missing .sha256 is refused), 4c (--target fetches the foreign lib under the right extension; --target+--source rejected). Existing binary_import + dep_resolution unaffected. 3/3 stable.

Closes #2108 (the --target half; --all-targets/--source left 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

…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>
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.

Future: optional flags for ae add binary-package fetch (--target / --all-targets / --source / checksum knobs)

1 participant