Skip to content

Publish shared release assets for language bindings - #8

Merged
gabewillen merged 7 commits into
mainfrom
feat/release-shared-assets
Jul 24, 2026
Merged

Publish shared release assets for language bindings#8
gabewillen merged 7 commits into
mainfrom
feat/release-shared-assets

Conversation

@gabewillen

Copy link
Copy Markdown
Contributor

Summary

  • Add scripts/build_release_assets.py to build the shared asset tree: six platform natives + Git-friendly AIST model chunks + manifests, and pack cortext-assets-<version>.tar.gz.
  • Add .github/workflows/release-assets.yml to build on v* tags / published releases / workflow_dispatch and upload the tarball (+ checksum) to the GitHub Release.
  • Document the layout and install path in README so thin bindings (cortext.py, cortext.go, plugins) can set CORTEXT_ASSETS_DIR instead of vendoring binaries.

Layout

native/<tag>/libcortext.* | cortext.dll
models/manifest.json + AIST chunks + vocab
cortext-assets-<version>.tar.gz

Test plan

  • python3 -m py_compile scripts/build_release_assets.py
  • Local dry-run: python3 scripts/build_release_assets.py --from-python-natives --version 1.2.1 produced six natives, three model parts, tarball + sha256
  • Unpacked tree installed via binding install_assets.py --source and host process/embed path worked
  • After merge: run workflow_dispatch against v1.2.3 (or next tag) and confirm release assets appear on https://github.com/augmem/cortext/releases

Language bindings should resolve shared libraries and model chunks from
cortext release assets instead of re-vendoring ~160 MiB per repo.
Copilot AI review requested due to automatic review settings July 23, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py to 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.

Comment thread .github/workflows/release-assets.yml
Comment thread scripts/build_release_assets.py Outdated
Comment thread scripts/build_release_assets.py
Comment thread scripts/build_release_assets.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/release-assets.yml
Comment thread scripts/build_release_assets.py Outdated
Comment thread .github/workflows/release-assets.yml
Comment thread README.md Outdated
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/models/aist_embedded_model.cpp
Comment thread src/models/aist_embedded_model.hpp
Comment thread scripts/build_python_package.py
Comment thread scripts/prepare_embedded_aist.py
Comment thread src/models/aist_embedded_model.cpp Outdated
- 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/prepare_embedded_aist.py
Comment thread scripts/prepare_embedded_aist.py Outdated
Comment thread src/models/aist_embedded_model.cpp Outdated
Comment thread build.zig
Comment thread CMakeLists.txt Outdated
…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
@gabewillen
gabewillen merged commit 170d866 into main Jul 24, 2026
12 checks passed
@gabewillen
gabewillen deleted the feat/release-shared-assets branch July 24, 2026 12:59
gabewillen added a commit that referenced this pull request Jul 24, 2026
Ship shared release assets and default AIST model embed from main after PR #8.
gabewillen added a commit that referenced this pull request Jul 24, 2026
Publish shared release assets for language bindings
gabewillen added a commit that referenced this pull request Jul 24, 2026
Ship shared release assets and default AIST model embed from main after PR #8.
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.

2 participants