-
Notifications
You must be signed in to change notification settings - Fork 26
Implementation workflow appends branch suffix on approved spec PR branch #450
Copy link
Copy link
Open
Labels
area:workflowGitHub workflows, Python automation, or Oz integrationGitHub workflows, Python automation, or Oz integrationbugSomething isn't workingSomething isn't workingready-to-implementIndicates that an issue is ready for a code implementation coupled with the associated plan.Indicates that an issue is ready for a code implementation coupled with the associated plan.repro:highThe report looks highly reproducible from the available informationThe report looks highly reproducible from the available informationtriagedInitial Oz triage has been completed for this issueInitial Oz triage has been completed for this issue
Metadata
Metadata
Assignees
Labels
area:workflowGitHub workflows, Python automation, or Oz integrationGitHub workflows, Python automation, or Oz integrationbugSomething isn't workingSomething isn't workingready-to-implementIndicates that an issue is ready for a code implementation coupled with the associated plan.Indicates that an issue is ready for a code implementation coupled with the associated plan.repro:highThe report looks highly reproducible from the available informationThe report looks highly reproducible from the available informationtriagedInitial Oz triage has been completed for this issueInitial Oz triage has been completed for this issue
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
When an implementation is started on top of an approved spec PR, the implementation agent can push to a suffixed branch such as
oz-agent/spec-issue-447-auto-implement-routingeven though the spec PR was created onoz-agent/spec-issue-447.This leaves the outer workflow looking at the approved spec PR branch while the agent has pushed implementation changes somewhere else.
Observed behavior
For issue
447:oz-agent/spec-issue-447pr-metadata.json.branch_nameasoz-agent/spec-issue-447-auto-implement-routingWhy this happens
The branch contracts are inconsistent:
core/workflows/create_spec_from_issue.pyhard-codes spec branches asoz-agent/spec-issue-{issue_number}and asks the spec agent to use that branch exactly.core/workflows/create_implementation_from_issue.pysetstarget_branchto the approved spec PR head branch when aplan-approvedPR is selected, so the target branch is alsooz-agent/spec-issue-447.pr-metadata.json.branch_namemay append a descriptive slug as long as it starts with{target_branch}..agents/skills/implement-issue/SKILL.mdstrengthens that by saying the branch name must contain a short auto-generated suffix.apply_create_implementation_resultonly accepts branch-name overrides when there is no selected approved spec PR. In the approved-spec case, it ignores the suffixed metadata branch and checks the original spec branch for updates.The result is that the agent can follow its prompt/skill instructions and still produce a branch the outer workflow does not use for the approved-spec implementation path.
Recommended fix
Make the implementation branch contract conditional:
selected_spec_pr_numberis present, instruct the agent to use{target_branch}exactly.pr-metadata.json.branch_namemust equal{target_branch}.{target_branch}-<descriptive-slug>..agents/skills/implement-issue/SKILL.mdso the suffix requirement only applies to standalone implementation branches, not approved spec PR branches.oz-agent/implement-issue-447-add-routingExpected behavior
For plan-approved implementations, the implementation agent should push to the approved spec PR branch exactly, so spec and implementation changes remain in one PR as intended.