Allow gx setup to refresh protected main through a sandbox#212
Merged
NagyVikt merged 1 commit intoApr 21, 2026
Merged
Conversation
Initialized protected main repos should be able to rerun setup without falling back to an unsafe in-place write or a hard stop. This reuses the protected-branch sandbox path for setup, syncs the managed bootstrap outputs back into the base checkout, and prunes the temporary sandbox afterward. Constraint: The visible protected base checkout must remain on main during setup refreshes. Rejected: Keep setup hard-blocked on protected main | prevents the safe refresh path users expect after bootstrap. Rejected: Require --allow-protected-base-write for routine setup refreshes | weakens the protected-base workflow for managed bootstrap files. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep sandbox target resolution repo-local and prune the temporary sandbox branch/worktree after syncing the managed setup outputs back to the base checkout. Tested: node --check bin/multiagent-safety.js; node --test --test-name-pattern="setup .*protected main" test/install.test.js; openspec validate agent-codex-setup-protected-main-sandbox-2026-04-21-12-20 --type change --strict; openspec validate --specs (no items found). Not-tested: Full test/install.test.js suite; broader setup/doctor command matrix outside the protected-main refresh path.
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.
Automated by scripts/agent-branch-finish.sh (PR flow).