Repository navigation
refactor(macos): thin runtime installer - #45
Merged
Merged
Conversation
… script The installer script's own default target is $CARGO_HOME (falling back to ~/.cargo), and forge3's self-update always writes back there. Pinning FORGE3_INSTALL_DIR to Application Support made the app disagree with the runtime about where the binary lives. Use the cargo home so the app, the installer, and forge3's self-update all operate on ~/.cargo/bin/forge3.
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.
Summary
Replaces the bespoke forge3 runtime installer (manifest parsing, SHA-256 checksums, Mach-O validation, archive extraction, versioned runtime store, launch-security scanning) with a thin wrapper around the cargo-dist shell installer served at
https://install.forgecode.dev/server. Net −7,600 lines.What the app does now
~/.cargo/bin/forge3is missing, download the installer script and run it via/bin/shwithFORGE3_INSTALL_DIR=$CARGO_HOME(falling back to~/.cargo— the script's own default target),FORGE3_NO_MODIFY_PATH=1,FORGE3_PRINT_QUIET=1. Managed mode: the axoupdater receipt is written so forge3's self-update keeps working.removexattr com.apple.quarantineon the installed binary.Debug ergonomics
FORGE_/FORGE3_/RUST_LOG-prefixed env vars are forwarded to the forge3 child (FORGE_UPDATE_CURRENT_VERSION,FORGE_UPDATE_MANIFEST_URL,FORGE_UPDATE_INSTALLER_URL,FORGE3_API_KEY,FORGE_CONSOLE_ORIGIN, …).FORGE_UPDATE_INSTALLER_URLalso overrides the installer script source (e.g.http://127.0.0.1:9877/install.sh).FORGE_RUNTIME_BINARY(debug builds only) points the app at a locally built forge3; the installer never touches a developer-supplied binary.Deleted
MachOValidator,RuntimeArchive,RuntimeCrypto,RuntimeLaunchSecurity,RuntimeNetwork,RuntimeProcess,RuntimeStore, two test-helper executables, and their test suites.Unchanged
MenuRenderer,ForgeCodeLogo,Popover*, all visible strings/menu structure — byte-identical tomain.Testing
swift buildclean; full suite (79 tests, 11 suites) green, including newThinInstallerTests(env forwarding,/bin/shinvocation construction, cargo-home resolution, real script execution + de-quarantine, failure surfacing).127.0.0.1:9877: install → binary lands in<install-dir>/bin/forge3→ launch → env vars verified in child (non-allowlisted secrets dropped) → kill → relaunch with new pid → stop → no orphans.Known follow-up
forge3's
update.installstages the new binary but the process keeps running until restarted (Downloadedstate, no self-exit — verified insvc-update). The app only restarts on exit, so an installed update currently applies on the next forge3 exit/app relaunch. Closing that loop cleanly is an SDK-side change: exit (e.g. status 75) after a successful install.