Skip to content

Release executables for Linux and macOS with a verified installer - #6

Merged
Igloczek merged 8 commits into
mainfrom
release-binaries
Nov 30, 2026
Merged

Igloczek merged 8 commits into
mainfrom
release-binaries

Conversation

@Igloczek

@Igloczek Igloczek commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Users no longer have to build by hand. Tagged releases publish tarballs for four platforms, and a POSIX install.sh installs one only after its SHA-256 matches SHA256SUMS. Rebased onto current main (through #8), so every release name is iglo.memory.

curl -fsSL https://raw.githubusercontent.com/iglo-tech/iglo.memory/main/install.sh | sh

No tags or releases were pushed. The first release is cut after merge; see docs/releasing.md.

Release workflow (.github/workflows/release.yml)

  • Triggers: v* tags publish. Every push to main, pull requests that touch release-related files, and workflow_dispatch run the same matrix without publishing, so macOS/arm64 regressions show up before tag time.

  • Permissions: contents: read everywhere. Only the tag-only publish job gets contents: write, plus id-token/attestations/artifact-metadata: write for provenance. Actions are pinned by SHA.

  • version job:

    • Fails if the tag minus v differs from package.json version, which is now 0.1.0.
    • On a tag, fails unless the tag commit is on main (git merge-base --is-ancestor, full-history checkout).
    • Runs shellcheck on the installer and the release scripts.
  • build job: runs on a native runner per platform:

    Platform Runner
    linux-x64 ubuntu-24.04
    linux-arm64 ubuntu-24.04-arm
    darwin-x64 macos-15-intel
    darwin-arm64 macos-15

    Each runs check.sh, build.sh, package.sh (and checks the packaged notices contain the Bun runtime section), then the QA steps listed below, then uploads the tarball. matrix.platform reaches run: only through env:.

  • assemble job: needs all four platforms, so a missing platform means no release. It writes SHA256SUMS and installs linux-x64 from the combined directory.

  • publish job: re-checks the sums, attests build provenance for every tarball in SHA256SUMS (actions/attest v4.2.2; verify with gh attestation verify), then runs gh release create --verify-tag --generate-notes, prefixed by --notes-file docs/release-notes/<tag>.md when that file exists. Tags containing - get --prerelease.

  • Assets: iglo.memory-<os>-<arch>.tar.gz (executable mode 0755 plus THIRD_PARTY_NOTICES.txt) and SHA256SUMS.

  • Node-API headers: come from the pinned [email protected] devDependency (MIT; integrity-checked by bun.lock). scripts/native.sh uses them by default, and NODE_INCLUDE_DIR still overrides them. check.yml no longer installs libnode-dev.

  • scripts/package.sh: checks that the executable's architecture matches the platform name. It also holds the single dist/iglo.memory path.

  • --version: the CLI now prints {"version":"0.1.0"}, read from package.json. It works outside a Git repository, and the ARGUMENT_INVALID message lists it.

Installer (install.sh)

  • Platform detection:
    • Linux and Darwin; x86_64/amd64 map to x64, aarch64/arm64 to arm64.
    • A shell translated by Rosetta gets the native arm64 build.
    • musl Linux and other OS/CPU combinations get a clear error.
  • Version and source: by default the installer resolves github.com/…/releases/latest to one tag (no API or token), validates it, and downloads both the tarball and SHA256SUMS from releases/download/<tag>/; the banner shows that version. It errors clearly when no release is published. IGLO_MEMORY_VERSION pins a version (0.1.0 and v0.1.0 both work). IGLO_MEMORY_DOWNLOAD_URL points at a directory over https:// or file:// (other schemes are rejected); it overrides IGLO_MEMORY_VERSION, which the installer says, and the banner shows the URL.
  • Download: curl only (--proto =https,file --tlsv1.2). The wget fallback is gone: wget may follow an https→http redirect and BusyBox wget may skip TLS verification. Without curl, file:// sources still work through cp.
  • Checksum: sha256sum or shasum -a 256. A missing, malformed or mismatched entry aborts.
  • Extraction: only the two expected members, and they must be regular files.
  • Install:
    • Stages a temp file in the target directory, chmod 755, and runs --version on the staged file. A binary that doesn't run is never installed; the error mentions a possible noexec install directory.
    • Then mv into place.
    • Defaults to ~/.local/bin; IGLO_MEMORY_INSTALL_DIR overrides it.
  • Notices: go to ${XDG_DATA_HOME:-~/.local/share}/iglo.memory/.
  • Output: warns when the install directory is not on PATH and prints the exact export PATH=... line. Also warns when another iglo.memory earlier on PATH shadows the new one. Prints iglo.memory init as the next step.
  • Shell hygiene: set -eu, a private mktemp -d cleaned up by a trap, and the whole script wrapped in main so a truncated pipe can't run part of it.
  • Tests: scripts/qa-install.sh covers, with fake assets:
    • a verified install and a reinstall, and that a download URL overrides (and reports) IGLO_MEMORY_VERSION;
    • the GitHub paths, through a fake curl on PATH that serves only the expected URLs: an explicit version is fetched without resolution; the default resolves releases/latest exactly once and fetches both files from that tag;
    • refusals for a tampered tarball, an unpublished latest release, a malformed resolved tag, a missing checksum entry, a missing SHA256SUMS, an invalid version and an http:// URL, each of which must leave the existing install untouched;
    • with a real release directory: installs it, checks --version against EXPECT_VERSION, and runs init, prepare, search, status and gc in a fixture repository.

Third-party notices for the embedded Bun runtime

bun build --compile embeds the Bun 1.4.2 runtime, so scripts/third-party-notices.ts now appends a Bun runtime section to THIRD_PARTY_NOTICES.txt (about 110 KB in total). Its inputs are fetched from oven-sh/bun at 744846f844374847c902b5e7fd59b4342a51ef99 (tag bun-v1.4.2, resolved with git ls-remote; bun --version reports the same 744846f84) and from oven-sh/WebKit at 2e2aa2290fac856d6f451ceacb58f7f5b44dd057, the WEBKIT_VERSION Bun pins. Each file is checked against a recorded size and SHA-256 and cached by digest in ignored .cache/third-party-notices/, so builds work offline after the first fetch. The script also refuses to run if Bun's webkit.ts doesn't pin that WebKit commit.

Content Source SHA-256 (full values in the script)
Bun LICENSE.md (MIT statement, linked libraries, polyfills) bun LICENSE.md b9caf527…4c984b1a
Bun license page (adds HdrHistogram_c, sqlite and others) bun docs/project/license.mdx 1fac2ad9…3087f3ec
WebKit pin check (not reproduced) bun scripts/build/deps/webkit.ts 21d39795…5ac4b343
LGPL-2 full text WebKit Source/JavaScriptCore/COPYING.LIB 5094ecb9…5a445547
LGPL-2.1 full text (WebKit; also covers tinycc) WebKit Source/WebCore/LICENSE-LGPL-2.1 f2b3bd09…5c8050ce
WebKit Apple BSD notice WebKit Source/WebCore/LICENSE-APPLE 0b5d3a7c…6094edb4
Apache-2.0 full text (uSockets/uWebSockets; same license as simdutf, highway) bun packages/bun-usockets/LICENSE c71d239d…f35d0ab4

The section also includes an LGPL source and relinking notice. It names the exact WebKit commit and links to its source, points to Bun's pinned tinycc revision, links the Bun source, and explains how to rebuild this executable with scripts/build.sh against a modified Bun.

Known gaps, documented in docs/third-party.md: Bun's repository has no MIT text with a copyright line for Bun itself, and it doesn't carry license texts for the other libraries it links (BoringSSL, ICU, zlib-ng, zstd, c-ares, mimalloc, lol-html, libarchive, …). For those, the notices give the license name, the upstream URL and the pin in Bun's scripts/build/deps/, not the full text. This PR doesn't claim that is legally sufficient.

Retrieval v2 release decision and notes

  • docs/decisions.md adds "Ship retrieval v2 as the 0.x default despite the failed frozen gates". It records the three-model decision delegated by the owner, the evidence (38/39 vs 23/39 baseline and 17/39 QMD; interval lower bounds +20.51 and +35.90 points), the failed gates and the open caveats. 1.0 needs a fresh frozen evaluation that passes. Roadmap U1 notes that the decision is recorded and that U1 stays open for 1.0.
  • docs/release-notes/v0.1.0.md holds the curated release notes (10 lines): the install one-liner, platforms and AVX2, the OpenRouter key, what prepare and search send (including up to 40 stored passages for reranking), the quality caveat with links, iglo.mem key migration, and SHA256SUMS.

Verified

Local (linux-x64): check.sh (lint, fmt, 190 tests, tsc), build.sh, package.sh (the tarball's notices include the Bun section and match dist/), EXPECT_VERSION=0.1.0 qa-install.sh dist/release, qa-cli.ts, qa-terminal.py and qa-clean.py on the packaged executable, and shellcheck (stable and v0.9.0). All pass.

CI at the new head runs all four platforms; see the PR checks. At the previous head 0b109ec all four were green (run). The attestation and release-notes steps run only on a tag push, so they are first exercised when v0.1.0 is tagged.

macOS isn't proven on a clean machine, so the owner still needs to hand-verify it. docs/decisions.md says this.

Fixes needed for macOS

  • Test fixtures under /tmp: 11 tests failed on macOS because /tmp (and $TMPDIR) have symlinked ancestors there. Credential storage deliberately rejects those ancestors, and worktree discovery reports physical paths. Tests, qa-cli.ts, qa-terminal.py and qa-install.sh now root fixtures at the resolved temp path. Product behavior is unchanged. A macOS user whose HOME has a symlinked ancestor gets CREDENTIALS_INVALID; that is pre-existing, and the normal /Users/<name> is fine.
  • PTY harness: qa-terminal.py stopped reading the PTY after the first prompt, and on macOS the empty-Enter retry case then timed out. The harness now keeps draining the terminal until the child exits, and puts captured output in the error on timeout.

Other notes

  • The x64 builds use Bun's default (non-baseline) runtime, which needs AVX2. Linux builds need glibc. Both are documented.
  • gh run download can't fetch the unarchived (archive: false) PR artifacts. gh api repos/:owner/:repo/actions/artifacts/<id>/zip returns the raw tarball. This affects CI artifacts only, not release assets.
  • macOS arm64 hosted runners are sometimes capacity-constrained; a cancelled darwin-arm64 job may need a re-run.

🤖 Generated with Claude Code

Igloczek and others added 8 commits November 30, 2026 18:18
Release workflow builds and verifies linux-x64, linux-arm64, darwin-x64 and
darwin-arm64 tarballs on native runners, writes SHA256SUMS and publishes a
GitHub Release for v* tags matching package.json. install.sh installs the
verified executable to ~/.local/bin. Node-API headers now come from the
pinned node-api-headers devDependency, and the CLI reports --version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
macOS /tmp and TMPDIR have symlinked ancestors. Credential storage rejects
those, and worktree discovery reports physical roots, so fixtures resolve
the temporary directory first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The harness stopped reading the PTY after the first prompt; macOS timed out
when the CLI wrote its retry prompt. Report captured output on timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bun build --compile embeds the Bun 1.4.2 runtime, which statically links
JavaScriptCore/WebKit (LGPL-2) and other libraries. The generated notices now
add a Bun runtime section built from files fetched at the bun-v1.4.2 commit
and the WebKit commit Bun pins, each checked against a recorded size and
SHA-256 and cached by digest for offline builds: Bun's license statement and
license page, the LGPL-2, LGPL-2.1, WebKit Apple and Apache-2.0 texts, and
where to get the exact WebKit, tinycc and Bun sources for relinking.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ship retrieval v2 as the pre-1.0 default despite the failed frozen gates,
with the evidence, the caveats and the 1.0 requirement recorded under
roadmap U1. Add curated notes for the first release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Run the platform matrix on every push to main; keep the PR paths filter.
- Refuse a tag whose commit is not on main.
- Publish with curated notes when docs/release-notes/<tag>.md exists, and
  attest build provenance for the tarballs in SHA256SUMS.
- Check that packaged notices contain the Bun runtime section.
- Installer: resolve releases/latest to one tag and fetch both files from it,
  require curl for https, show the download URL when it overrides the
  version, and mention noexec when the smoke run fails.
- Mention --version in the ARGUMENT_INVALID message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Igloczek

Copy link
Copy Markdown
Contributor Author

Council verdict: APPROVE (unanimous, round 2, head e0bf2a8). Two independent reviewers from different providers (Claude Opus 5.5 and DeepSeek V4 Pro via OpenCode) reviewed the release workflow and installer against the requirements: v*-tag releases for linux-x64, linux-arm64, darwin-arm64 and darwin-x64, each tarball holding the 0755 executable plus THIRD_PARTY_NOTICES.txt, a SHA256SUMS file, per-platform native lock build with check and QA where feasible, and a one-line install.sh that detects OS/arch, verifies the checksum, installs to ~/.local/bin/iglo.memory (overridable) and prints iglo.memory init. Round 1 approved the design and a line-by-line installer security review, but both reviewers required the embedded Bun runtime's notices before the first tag; that section is now generated from pinned, size- and SHA-256-checked sources (Bun 1.4.2 license statement and page, full LGPL-2/LGPL-2.1/Apache-2.0/WebKit BSD texts, the exact WebKit source revision and relink instructions) and states its remaining gap openly. Round 1 nits were also fixed: the installer resolves the latest tag once and fetches both files from it, requires curl with https-only, and reports overrides; the workflow runs the matrix on main pushes, checks that tags are on main and match package.json, keeps matrix values out of run:, and attests the tarballs with write permissions only on the publish job. The PR also records the unanimous three-model decision to ship retrieval v2 as the 0.x default despite its NO_ROLLOUT evaluation, with curated release notes stating the caveat and what search sends to OpenRouter. Both reviewers re-ran check.sh (190 tests), the build, packaging, qa-install, qa-cli, qa-terminal, qa-clean and shellcheck, verified every pinned action SHA and the decision-record numbers, and explicitly agree the solution is correctly and completely implemented and that v0.1.0 can be tagged after merge. Merge waits only on the build (darwin-arm64) job, which was queued for a runner.

@Igloczek
Igloczek merged commit 8a17d88 into main Nov 30, 2026
15 of 16 checks passed
Igloczek added a commit that referenced this pull request Nov 30, 2026
Rebased onto the release work (#6). The README install section now matches
install.sh: next step after install, --version output, IGLO_MEMORY_DOWNLOAD_URL,
curl-only downloads and attestation verification. CONTRIBUTING uses the pinned
node-api-headers default, describes both workflows, qa-install.sh and the
cached build inputs. The retrieval decision separates the evaluation's missing
clean-machine check from the CI qa-clean runs, and the held-out report points
to that decision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Igloczek added a commit that referenced this pull request Nov 30, 2026
…#9)

* Rewrite README for end users; move internals to docs and CONTRIBUTING

The README now covers what the tool is, install, a three-command quick start
with real output, agent usage, a short how-it-works, privacy, configuration,
a troubleshooting table for every error code, migration and prior art.

Technical detail moves to docs/how-it-works.md (command contract, sources,
prepare/search/status/gc behavior, locking, credential storage, provider
data, cron) and CONTRIBUTING.md (build, tokenizer cache, source launcher, QA).

docs/decisions.md: replace the stale v1 ranking paragraph with the v2
pipeline (BM25 + vector + typed expansion, RRF k=60 with x2 original weight,
Voyage rerank, 0.435546875 cutoff) and mark the v1 chunking details as
superseded by markdown-lossless-v2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Make the README quick start reach a first result; fix credential recovery

- Quick start: run init yourself in a terminal (no TTY gives
  API_KEY_MISSING), add a paste-able auth.md note, then prepare and search.
  Example output is re-captured from that exact note and marked as shortened.
- Install: the installer prints the PATH line when ~/.local/bin is missing;
  the OpenRouter key needs credit because every model is billed per use.
- CREDENTIALS_INVALID: --reset-credentials validates the existing folder and
  file first, so unsafe permissions need chmod (or removing the file). Same
  note in docs/how-it-works.md.
- EXPANSION_FAILED/RERANK_FAILED mention key and credit;
  CREDENTIALS_SAVE_FAILED points at ~/.config/iglo.memory.
- Index commit guidance (~16 KiB per passage vector with the default model).
- Privacy: generated rephrasings are embedded too.
- decisions.md: results at or above the reranker cutoff.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rewrite the README pitch in a calmer, confident voice

Keep the first screen to what, why, install and quick start with no
internals: drop model names and response metadata from the example
(still real output, shortened), and point to docs for field details,
which model receives what, and the configuration file. Make "Is it a
good fit?" brief, plain-language the troubleshooting rows for the
rephrasing and ordering requests, and say the installer needs curl.

Add a CREDENTIALS_INVALID fix to the migration section: reset
credentials (it never reads the old file) or chmod the old folder.
Move the 16 KiB per-vector note to docs/how-it-works.md and rewrap
long lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Reconcile end-user docs with the release workflow

Rebased onto the release work (#6). The README install section now matches
install.sh: next step after install, --version output, IGLO_MEMORY_DOWNLOAD_URL,
curl-only downloads and attestation verification. CONTRIBUTING uses the pinned
node-api-headers default, describes both workflows, qa-install.sh and the
cached build inputs. The retrieval decision separates the evaluation's missing
clean-machine check from the CI qa-clean runs, and the held-out report points
to that decision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@Igloczek
Igloczek deleted the release-binaries branch November 30, 2026 19:02
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.

1 participant