Keychain profile approach doesn't work from Galaxy terminal (no interactive auth entitlement). Switched to inline Apple ID/team/password in notarize.sh and package.sh. Added migration-docs/ for session continuity on new machines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.1 KiB
3.1 KiB
Prior Session — 2026-05-13 / 2026-05-14
Tasks Completed
- Codebase learn — Full read of the Galaxy codebase (56-crate Rust workspace, fork of Warp with Bedrock AI)
- Code signing pipeline — Created complete macOS signing, notarization, and DMG packaging workflow
- Review & hardening — Two rounds of adversarial review + fixes applied
- Documentation — Updated GALAXY.md with signing/diagnostics docs
- Code review — Started adversarial review of last day's committed changes
Key Decisions
- Entitlements:
network.client+automation.apple-events+cs.allow-unsigned-executable-memory(for Metal/wgpu shader compilation under hardened runtime) - Signing approach: Simple standalone scripts (sign.sh, notarize.sh, package.sh) rather than adapting Warp's 800-line CI bundle script
- Signing method: Inside-out (binary first, then bundle) with
--timestampon all codesign calls - Architecture: arm64 only (no universal binary needed)
- Bundle ID:
com.samsung.Galaxy - Certificate:
Developer ID Application: SAMSUNG ELECTRONICS AMERICA, INC. (3JU72Z7Y3J)
Files Created
BuildSupport/Galaxy.entitlements— macOS entitlements for code signingsign.sh— Code signs Galaxy.app with Samsung Developer ID cert + hardened runtimenotarize.sh— Submits to Apple notary service + staples ticketpackage.sh— Creates DMG + signs + notarizes + staplesbuild-debug.sh— Full pipeline orchestration (debug)build-release.sh— Full pipeline orchestration (release)copy-dmgs.sh— Copies DMGs to ~/Downloads with date+letter suffixGALAXY.md— Updated with signing pipeline + diagnostics documentation
Code Review Findings (STILL OPEN)
High Severity
- [Security]
dump_error_snapshotwrites full conversation context to world-readable files — Error dumps include user's shell command outputs, secrets potentially in conversation. Recommendation: gate behindGALAXY_BEDROCK_DIAGNOSTICS=1or set 0600 permissions. - [Security]
error_dump_directoryuses compile-timeCARGO_MANIFEST_DIR— Points to build machine path in release builds. Should be gated behindcfg!(debug_assertions). - [Security] Install script fetches Homebrew/rustup from HEAD without pinning — Supply chain risk in curl-pipe-bash context.
Medium Severity
- [Robustness] Silent mutex poisoning in
dump_error_snapshot— Partial data written without indication. - [Performance] Captured lines buffer unbounded by bytes — Single "line" can be several MB for large contexts.
- [Correctness]
is_retryableuses fragile string matching —"Validation error"may not appear in stream errors. - [Correctness]
rotate_if_neededdouble-renames — Off-by-one: current file renamed twice (harmless but confused logic). - [Robustness]
read_file_tailblocks async runtime — 200KB sync I/O per file on potentially slow filesystem.
Low Severity
- Integer overflow in token sum cast to u32
- Race condition in install script's pkill → rm -rf sequence
git pull --ff-onlyfails silently on diverged branches