agent-orchestrator/backend/internal/service/project
Khushi Diwan 7d0ca02440
fix(project): resolve default branch from origin/HEAD, not checked-out branch (#289)
* fix(project): resolve default branch from origin/HEAD, not checked-out branch

Detecting the project default via `symbolic-ref --short HEAD` captured
whatever branch the repo happened to be on at add time. Adding a project
while on a feature branch (e.g. fix/pr-attachment) persisted that branch
as the default, so every session worktree based off it instead of main.

Prefer the remote default (origin/HEAD), falling back to the checked-out
branch only when no remote default is set. This still records a non-main
default like master correctly, while ignoring the active feature branch.

* test: cover branch-not-fetched API error
2026-06-19 19:50:19 +05:30
..
dto.go feat: add workspace project registration foundation (#165) 2026-06-10 16:10:14 +05:30
service.go fix(project): resolve default branch from origin/HEAD, not checked-out branch (#289) 2026-06-19 19:50:19 +05:30
service_test.go fix(project): resolve default branch from origin/HEAD, not checked-out branch (#289) 2026-06-19 19:50:19 +05:30
store.go feat: add workspace project registration foundation (#165) 2026-06-10 16:10:14 +05:30
types.go feat: add workspace project registration foundation (#165) 2026-06-10 16:10:14 +05:30
workspace_registration.go feat: add workspace project registration foundation (#165) 2026-06-10 16:10:14 +05:30