Skip to content

fix(github): don't synthesize branch_name, defer to workspace fallback#97

Open
corylanou wants to merge 1 commit into
mainfrom
fix/github-branch-name-bypass
Open

fix(github): don't synthesize branch_name, defer to workspace fallback#97
corylanou wants to merge 1 commit into
mainfrom
fix/github-branch-name-bypass

Conversation

@corylanou
Copy link
Copy Markdown

Fixes #95.

Context

The GitHub adapter (elixir/lib/symphony_elixir/github/client.ex:681) was synthesizing branch_name: derive_branch_name(number, title) for every issue, producing values like issue-95-regression-workspace-.... This silently overrode the operator's hooks.after_create branch (symphony/<id>) and broke the Symphony Isolation Contract self-check, causing agents to self-block immediately. Confirmed today on issues #93 and #95 — both required manual git branch -m interventions to unblock.

TL;DR

Stop the GitHub adapter from imposing a synthesized branch name on the workspace. Defer to workspace.ex's existing fallback (symphony/<id>) so operator hooks aren't overridden.

Summary

  • github/client.ex: change branch_name: derive_branch_name(number, title) to branch_name: nil and remove the now-unused derive_branch_name/2 definition.
  • Workspace flow (workspace.ex:423-427): unchanged. When branch_name is nil, target_branch_name/1 falls through to fallback_branch_name(issue_identifier)"symphony/#{...}", which matches what operators configure in hooks.after_create.

Alternatives

  • Make the synthesized pattern configurable (e.g. tracker.branch_name_pattern) — rejected; adds YAML surface without a concrete need beyond what hooks.after_create already covers.
  • Detect the hook's branch in workspace.ex and prefer it — rejected; requires workspace.ex to be aware of hook side-effects, leaking abstractions.

Test Plan

The GitHub adapter was synthesizing branch_name as `issue-N-{title-slug}`,
which overrode operator-configured `hooks.after_create` branches and
broke the Symphony Isolation Contract (which expects `symphony/<id>`).

Now the adapter returns `branch_name: nil`, letting workspace.ex's
`fallback_branch_name/1` produce `symphony/<id>`. Operators who want
title-slug branches can set them in their `hooks.after_create`.

Fixes #95.
@corylanou
Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

regression(workspace): new agent runs bypass hooks.after_create, branch named from issue title slug instead of symphony/<id>

1 participant