Skip to content

Phase 5 Linux: manifest + embed file + darwin-guarded tray [draft, stacks on #3] - #4

Closed
NestorCanales wants to merge 2 commits into
feat/xplat-foundationfrom
feat/xplat-linux
Closed

Phase 5 Linux: manifest + embed file + darwin-guarded tray [draft, stacks on #3]#4
NestorCanales wants to merge 2 commits into
feat/xplat-foundationfrom
feat/xplat-linux

Conversation

@NestorCanales

Copy link
Copy Markdown
Collaborator

What

Linux support for the local embedding stack (epic Phase 5, step 1). Stacks on #3 (foundation) → #2 (Phases 0–4); review in that order — this diff is Linux-only.

Changes

  • assets/manifest.jsonlinux-arm64 + linux-amd64 sections: official ONNX Runtime 1.26.0 and libtokenizers v1.27.0 artifacts, pinned by SHA-256 (archive and extracted member).
  • New assets_embed_linux.go — one file covers both arches (same versioned .so name; the arch difference is which artifact make assets downloads).
  • tray.go had no darwin guard — its Cocoa CGo preamble compiled everywhere, making any non-macOS build impossible. Now //go:build darwin + no-op tray_stub.go (CLAUDE.md already declared tray macOS-only; epic tables updated per the deviation rule).
  • Bug found, documented, not fixed here: first-ever Linux test run caught the watcher swallowing inotify CREATE events (debounce replaces instead of merges; no user impact today — create and modify both index). Report: Documentation/Bugs/fswatcher-create-event-swallowed-linux.md. Fix kept out per scope rules — happy to do it as its own tiny PR.

Verification

linux-arm64, in Docker (golang:1.26-bookworm):

  • make assets — all pinned checksums verify (exercises the foundation's portable SHA256)
  • go test — green (watcher TestOnCreate known-fail, documented above)
  • Real int8 inference — cosine ordering 0.140 < 0.171 < 0.286 matches Phase 0/macOS
  • Full Wails Linux build → ARM aarch64 ELF binary
  • Offline proof: --network none container, MCP stdio search against a macOS-indexed DB returned the correct semantic match ("how do I cook italian pasta" → carbonara-recipe.md) — cross-platform vector compatibility confirmed

linux-amd64: artifacts pinned + checksum-verified; runtime smoke pending an x64 environment (arm64 Docker would only run it under slow emulation — planned on a Pop!_OS machine).

macOS regression: build + full test suite green with the tray guard.

Next PRs

macOS x86_64 (source-built ORT, Rosetta-tested) → Windows x64 (Rust tokenizer build).

🤖 Generated with Claude Code

…n-guard tray

Adds linux-arm64 and linux-amd64 to assets/manifest.json (official ORT
1.26.0 + libtokenizers 1.27.0 artifacts, archive- and member-pinned by
SHA-256) and one sibling embed file — both Linux arches ship the same
versioned .so name, so a single localembed && linux file covers them.

tray.go's Cocoa CGo preamble had no build constraint, which made every
non-macOS build impossible; it is now //go:build darwin with a no-op
tray_stub.go elsewhere (CLAUDE.md already declared tray macOS-only —
epic's Explicitly-unchanged table updated per the deviation rule).

First-ever Linux test run also surfaced a pre-existing watcher bug
(inotify CREATE swallowed by the replace-not-merge debouncer); it is
documented in Documentation/Bugs/fswatcher-create-event-swallowed-linux.md
and deliberately NOT fixed here (out of epic scope, no user impact today).

Verified on linux-arm64 in Docker (golang:1.26-bookworm): make assets
checksums pass, test suite green (watcher known-fail excepted), real int8
inference matches Phase 0 ordering (0.140 < 0.171 < 0.286), full Wails
build (webkit2_41), and an offline --network none MCP search returned
correct semantic matches from a macOS-indexed DB. linux-amd64 artifacts
are pinned + checksum-verified; runtime smoke pending an x64 environment.
macOS regression-checked: build + tests green with the tray guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NestorCanales

Copy link
Copy Markdown
Collaborator Author

linux-amd64 runtime verification completed (2026-07-17) — the one item this PR left pending.

Ran on real x64 hardware (Surface Book i7, Pop!_OS 22.04): binary built in an Ubuntu 22.04 amd64 container (glibc-matched to the target), integration test passed in-container (cosine ordering 0.140 < 0.171 < 0.286, matching every platform), then the binary ran natively on the Surface with zero library installs (ldd clean against the stock webkit2gtk-4.0/gtk-3 runtime), extracted its embedded assets to linux-amd64-<fingerprint>/, and answered an MCP search correctly against a macOS-indexed DB.

Both Linux arches are now runtime-verified: arm64 (Docker, --network none) + amd64 (native hardware).

🤖 Generated with Claude Code

@NestorCanales

Copy link
Copy Markdown
Collaborator Author

Consolidated into #2 (single reviewable branch per Bo's review-workflow preference) — all commits from this PR are now in feat/local-embeddings.

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