Publish shared release assets for language bindings - #8
Conversation
Language bindings should resolve shared libraries and model chunks from cortext release assets instead of re-vendoring ~160 MiB per repo.
There was a problem hiding this comment.
Pull request overview
This PR adds a shared “release assets” packaging flow to publish multi-arch native libraries plus Git-friendly AIST model shards as GitHub Release assets, enabling thin language bindings to consume a single canonical asset bundle via CORTEXT_ASSETS_DIR instead of vendoring binaries.
Changes:
- Add
scripts/build_release_assets.pyto build an unpacked asset tree (native/,models/), generate manifests, and optionally produce a versioned tarball + sha256. - Add a GitHub Actions workflow to build the tarball on release/tag events and upload it to the corresponding GitHub Release.
- Document the expected on-disk asset layout and an install example in
README.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/build_release_assets.py | Builds multi-target native artifacts, shards model assets into release-friendly chunks, emits manifests, and packages a release tarball/checksum. |
| .github/workflows/release-assets.yml | CI workflow to build the release asset bundle on tags/releases/manual runs and attach the tarball to GitHub Releases. |
| README.md | Documents the shared release assets concept, expected unpacked layout, and a download/install flow for bindings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa3c6b9d46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Track under-100 MiB model parts (no LFS) and bake them into the shared library so consumers need no download or CORTEXT_AIST_MODEL_PATH. At load the library assembles and checksum-verifies the full GGUF into the process cache. Opt out with -DCORTEXT_EMBED_AIST_MODEL=OFF or -Dembed-aist-model=false. Release packaging still publishes natives (and optional model trees) for binding installers on GitHub Releases.
Checkout the requested release tag for dispatch builds, create missing releases as drafts, validate chunk size, skip packing the destination tarball, keep top-level optimize aligned with reused natives, and verify cached model digests before sharding. Document that CORTEXT_ASSETS_DIR is a binding install layout, not a core env var. CI smoke builds opt out of model embed; ubuntu-aist keeps embed on.
Document CORTEXT_LIBRARY_PATH + reassemble for CORTEXT_AIST_MODEL_PATH instead of a non-existent CORTEXT_ASSETS_DIR. Skip packing the .sha256 sibling when --tarball lands under --output.
Embed-off CI builds still compile aist_embedded_model.cpp; leave the cache/sha/materialize helpers out of that TU so -Werror=unused-function does not fail ubuntu-native and ubuntu-sanitizers.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d67d329e43
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Link shell32 on Windows Zig builds for SHGetFolderPathA - Move aist_embedded_model.hpp under src/ (not installed public API) - Emit .note.GNU-stack for ELF embedded blob assembly - Unique temp paths + tolerant replace for concurrent materialize - Python/JS default model bootstrap no longer forces HF download that would shadow embedded assemble-at-load natives
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e432c9ffd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…age models. - prepare_embedded_aist: COFF .rdata for Windows, ELF .rodata, Mach-O const; hide blob labels (.hidden / .private_extern); GNU-stack note ELF-only - ReplaceFile only discards tmp when dest matches expected digest/size - build.zig.zon packages models/ for default embed-on Zig consumers - MSVC defaults CORTEXT_FETCH_AIST_MODEL=ON when embed is unavailable
Ship shared release assets and default AIST model embed from main after PR #8.
Publish shared release assets for language bindings
Ship shared release assets and default AIST model embed from main after PR #8.
Summary
scripts/build_release_assets.pyto build the shared asset tree: six platform natives + Git-friendly AIST model chunks + manifests, and packcortext-assets-<version>.tar.gz..github/workflows/release-assets.ymlto build onv*tags / published releases / workflow_dispatch and upload the tarball (+ checksum) to the GitHub Release.cortext.py,cortext.go, plugins) can setCORTEXT_ASSETS_DIRinstead of vendoring binaries.Layout
Test plan
python3 -m py_compile scripts/build_release_assets.pypython3 scripts/build_release_assets.py --from-python-natives --version 1.2.1produced six natives, three model parts, tarball + sha256install_assets.py --sourceand hostprocess/embedpath workedv1.2.3(or next tag) and confirm release assets appear on https://github.com/augmem/cortext/releases