You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adopt the portable installer-safety improvements from Codex-Game-Studios v0.5–v0.6 (upstream commit 259cff8) into the OpenCode-native port, Phase 2a.
- coexistence.sh: add ccgs_state_validate (exists/schema==2/valid JSON/no path-traversal/no symlink) and ccgs_state_owned_paths helpers.
- uninstall.sh: fail-closed — remove the source-manifest fallback so missing, stale, malformed, path-traversing, or symlinked install-state aborts without removing files; drop the redundant emptiness-based AGENTS.md re-check (the Python helper already does proven-marker-only deletion); limit pruning to .opencode/ (never shared content roots).
- install.sh: --replace-modified opt-in + Python preflight that aborts before any mutation on unowned collisions (always) and locally-modified package-owned files (unless --replace-modified), naming the exact paths. Preflight runs only for cross-target deploys; self-install (source==target) is untouched.
- audit.sh: run_install_safety validator (5 static guards) wired into all and exposed as audit.sh install-safety.
- README.md / UPGRADING.md: document --replace-modified and fail-closed uninstall.
Verified: bash -n on all four scripts; audit.sh install-safety 5/5; audit.sh all 0 errors; scratch matrix 10/10 (fresh install, unowned-collision abort, modified-file abort, --replace-modified backup+replace, missing-state uninstall abort, valid-state uninstall clean removal). Phase 2b (transaction + rollback) is deferred to the next commit.
0 commit comments