fix(#6858): keep code target branches optional - #1248
Conversation
Remove the runner interpolation so an unset optional allowlist reaches the safe default-branch fallback. Enforce an explicit allowlist even when the agent provides no branch preference. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Shai Revivo <srevivo@redhat.com>
Functional tests did not runFunctional tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the |
PR Summary by QodoKeep Code Target Branch Allowlists Optional and Enforced
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1. Protected changes require human review
|
waynesun09
left a comment
There was a problem hiding this comment.
Review notes
Four findings from a read of head fe8899c, verified against the head tree, the CI logs and the linked issue. No blocking action taken -- this is comment-only.
Three findings are inline. One has no anchor in this PR's diff, so it is here:
MEDIUM -- docs/code.md still documents the old, agent-target-only validation semantics (docs/code.md, around the CODE_ALLOWED_TARGET_BRANCHES table row)
The row still reads: "The post-code script reads it from the runner when present and validates the agent's chosen target branch before pushing."
After this PR the auto-detected repository default is also checked when the agent expresses no preference, and a list that omits that default now aborts the run -- previously such a run fell through to DEFAULT_BRANCH unchecked. Operators reading only this row will not know that previously-silent default-branch runs now fail closed.
docs/code.md is not in this PR's changed-file set, but it is in scope: this PR is what makes the row wrong, and issue #6858's last acceptance criterion is that "the base harness and documentation agree about the default behavior."
Suggestion: extend the row with one sentence, in the style already used for CODE_AUTO_MERGE:
When the agent expresses no branch preference, the auto-detected repository default is used and must itself appear in the list (or the list must be
*), otherwise the run fails.
Remove the out-of-scope explicit allowlist rejection added with the optional-variable fix. An unset agent branch continues to use the repository default branch. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Shai Revivo <srevivo@redhat.com>
|
Review follow-up for fb69da9: the documentation note about explicit lists is no longer applicable because this PR no longer changes explicit-list/default-branch behavior. The retained AGENTS.md change documents only the optional-variable contract. The protected-path changes remain subject to human review and approval; no automated approval is requested. |
Summary
Verification
Related to fullsend-ai/fullsend#6858