Problem
When GITHUB_FORK_OWNER is configured (e.g., danchild), the setup_workspace node does not set up the fork remote if fork_owner/fork_repo are not already in workflow state. This means the first implementation run (before any PR is created) has no "fork" git remote, causing push_to_fork() to fall back to origin (the upstream repo), which fails with a 403 permission error:
Fork remote not configured; falling back to origin for push
remote: Permission to forge-sdlc/forge.git denied to danchild.
fatal: unable to access 'https://github.com/forge-sdlc/forge.git/': The requested URL returned error: 403
Root Cause
The fork_owner/fork_repo state values are only populated when the create_pr node runs — which happens after implement_bug_fix. So during the first implementation pass:
setup_workspace checks state.get("fork_owner") → empty
- No fork remote is added
implement_bug_fix completes and calls push_to_fork()
_effective_push_remote() finds no "fork" remote → falls back to "origin"
- Push to upstream fails with 403
Expected Behavior
setup_workspace should ensure the fork exists (using GITHUB_FORK_OWNER from config) and add the fork remote before implementation, so that all pushes go to the fork.
Problem
When
GITHUB_FORK_OWNERis configured (e.g.,danchild), thesetup_workspacenode does not set up the fork remote iffork_owner/fork_repoare not already in workflow state. This means the first implementation run (before any PR is created) has no"fork"git remote, causingpush_to_fork()to fall back toorigin(the upstream repo), which fails with a 403 permission error:Root Cause
The
fork_owner/fork_repostate values are only populated when thecreate_prnode runs — which happens afterimplement_bug_fix. So during the first implementation pass:setup_workspacechecksstate.get("fork_owner")→ emptyimplement_bug_fixcompletes and callspush_to_fork()_effective_push_remote()finds no"fork"remote → falls back to"origin"Expected Behavior
setup_workspaceshould ensure the fork exists (usingGITHUB_FORK_OWNERfrom config) and add the fork remote before implementation, so that all pushes go to the fork.