Skip to content

Infer musafety agent base branch from repo context#17

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/20260411-140148-pia-edix-hu-dup-2-ensure-dynamic-base-defaults
Apr 11, 2026
Merged

Infer musafety agent base branch from repo context#17
NagyVikt merged 1 commit intomainfrom
agent/codex/20260411-140148-pia-edix-hu-dup-2-ensure-dynamic-base-defaults

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Summary\n- make default base resolution dynamic: > > current checked-out branch > \n- persist per-agent branch base metadata () and use it in base inference ( > config > stored metadata > source upstream > current branch > )\n- update template to only pass when explicitly provided so defaults can follow repo context\n- refresh README / copy-prompt wording and add regression tests for main-based repos\n\n## Verification\n- bash -n scripts/agent-branch-start.sh scripts/agent-branch-finish.sh templates/scripts/agent-branch-start.sh templates/scripts/agent-branch-finish.sh templates/scripts/codex-agent.sh\n- npm test (46/46 pass)

Hardcoded dev defaults caused agent workflows to mis-target repos whose protected base is main/master or another branch. This change makes start/finish infer base from repo context and branch metadata so agent branches launch and merge back correctly without extra flags.

Constraint: Must preserve explicit --base and multiagent.baseBranch behavior

Rejected: Force setup to auto-write multiagent.baseBranch | intrusive repo config mutation

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep template scripts and runtime scripts in lockstep whenever branch-resolution logic changes

Tested: bash -n scripts/agent-branch-start.sh scripts/agent-branch-finish.sh templates/scripts/agent-branch-start.sh templates/scripts/agent-branch-finish.sh templates/scripts/codex-agent.sh

Tested: npm test (46/46 pass)

Not-tested: Real GitHub protected-branch auto-merge policy paths in live repos
@NagyVikt NagyVikt merged commit 0fe45e0 into main Apr 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant