Make portable Copse development and local inference reproducible - #2662
Draft
jonathanKingston wants to merge 10 commits into
Draft
Make portable Copse development and local inference reproducible#2662jonathanKingston wants to merge 10 commits into
jonathanKingston wants to merge 10 commits into
Conversation
Contributor
added 5 commits
September 11, 2026 16:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Copse checkout currently depends on host-installed runtimes and caches to develop itself. This adds a reproducible Apple Silicon environment inside an ignored
.portable/directory, including development tools, offline reconstruction, isolated CLI profiles, model downloads, and standalone local inference that starts with Copse.make portable-setuppins and verifies Node and Claude Code, installs Corepack/Codex/ACP adapters from a separate npm lockfile, and places package caches, native build inputs and app/agent profiles on the drive. Launchers derive paths at runtime and reconcile dependency metadata after relocation. Git, lint and gortex exclude the environment and nested projects; scratch directories form a Git discovery ceiling. Portable entry points discard inherited work credentials, provider routing, proxies and runtime injection before applying drive configuration. Intentional configuration inside the portable shell remains supported.make portable-setup-offlinereconstructs from populated caches with networking denied for the process tree, including lifecycle scripts. Electron headers use the locked node-gyp checksum verifier and drive cache; changes to the native-install recipe invalidate dependency fingerprints.make portable-verify-offlinechecks an independent clean clone with only copied caches, blocking networking and common host caches. Missing or corrupt cached downloads fail explicitly.Optional model/runtime targets pin immutable publisher revisions and SHA-256 hashes for three starter GGUF models, an expanded 16-repository collection including complete MLX folders and projectors, and official llama.cpp/MLX/Harmony/Python archives. The full public collection plus starter models is about 269 GB before filesystem sharing. Offline runtime reconstruction repairs Python paths after relocation. The gated ThinkingCap GGUF variant remains a separate optional manifest.
make portable-modelprints a memory-tier recommendation; it does not load the model.make portable-local-ai-enableenables standalone engines on futureportable-runand Finder launches. The supervisor starts llama.cpp and the MLX text server from the drive, waits for real completions, registers local providers and opens Copse. Relative model configuration lives in.portable/data/local-engines.json; defaults are Qwen3 4B GGUF and Gemma 4 E4B MLX. Existing selections and unrelated settings survive; settings changes are backed up. Engines bind only to loopback. Duplicate launches and occupied ports fail without adopting other servers, and quitting Copse stops the engines owned by that launch. The strict offline setup sandbox also blocks loopback, so local inference uses the normal launcher.LM Studio is optional. This pinned GUI version rejects external-drive launch paths, so its separate installer copies the verified cached bundle into a versioned
/Applicationslocation without replacing the host app. Its GUI profile remains host-scoped. Claude Code and Codex CLI launchers use drive profiles; these targets do not install their desktop apps.Includes the merged #2656 relative-cache and #2657 launcher-PATH prerequisites. Portable secret encryption remains separate from this implementation; #2652 contributes its design plan. Each Mac still needs macOS and Apple's development tools. OS keychain, managed policy and host/project configuration discovery remain separate from environment-variable isolation. First sign-in and physical second-Mac/64 GiB acceptance remain outstanding. Larger models require explicit configuration and memory headroom for context and other applications.
Validation:
pnpm run check: passed on the rebased PR head: 9,208 tests passed, 7 skipped, 0 failed, plus all static checks.No renderer or DOM code changed; this PR changes development/bootstrap scripts, native build inputs and test isolation.