Keep doctor repairs working on main-only repos and simplify managed ignores#209
Merged
NagyVikt merged 1 commit intoApr 21, 2026
Conversation
…gnores Guardex was still enumerating managed scripts and hook files one by one in the generated .gitignore block. The protected-main doctor sandbox finish flow also let branch finish fall back to the default base branch, which broke main-only repos with 'fatal: invalid reference: dev' and could leave AGENTS.md repairs incomplete even though setup/doctor are supposed to restore them. Constraint: Users expect gx setup and gx doctor to ignore Guardex-owned scripts and hooks as managed directories Constraint: Protected-main doctor auto-finish must stay on the actual protected base branch Rejected: Keep per-file script and hook ignore entries | drifts whenever new managed files land Confidence: high Scope-risk: moderate Reversibility: clean Directive: Pass the active protected base branch through doctor sandbox finish flow; do not let it fall back to the repo default base Tested: node --check bin/multiagent-safety.js Tested: node --test --test-name-pattern "setup provisions workflow files and repo config|setup appends managed gitignore block without clobbering existing entries|doctor on protected main auto-commits sandbox repairs and runs PR finish flow when gh is authenticated|doctor recurses into nested frontend repos and repairs protected-main drift" test/install.test.js Tested: openspec validate agent-codex-ignore-scripts-star-and-githooks-2026-04-21-10-40 --type change --strict Tested: openspec validate --specs Not-tested: Full node --test test/install.test.js suite
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).