Commit Graph

5 Commits

Author SHA1 Message Date
Carlos Florêncio 0b2085688b feat(office): autonomous agent management layer (#914) 2026-05-16 20:07:57 +01:00
Carlos Florêncio de040a8987 fix: gateway auth injection and cumulative diff error handling (#682) 2026-04-23 18:31:00 +01:00
João Salavisa b3aaa804f1 fix: use dynamic merge-base for git commits to filter main branch commits (#504)
* fix: use dynamic merge-base for git commits to filter main branch commits

When a feature branch is rebased on main, the stored base_commit_sha
becomes outdated. Using git log base_commit..HEAD would include main
branch commits that were merged after the stored base commit.

This fix adds dynamic merge-base calculation using the session's
base_branch (target branch like origin/main). When fetching commits:
- The backend computes git merge-base HEAD target_branch
- This returns only commits not yet merged into the target branch
- Works correctly even after rebases

Changes:
- Extended SessionReader interface with GetSessionBaseBranch method
- Added GetMergeBase to GitOperator for computing merge-base
- Updated git log API to accept target_branch parameter
- Modified wsGitCommits handler to pass target branch for filtering

* fix: update executor_test mock to match new GetGitLog signature

* fix: update remaining mocks to match new GetGitLog signature

* fix: update integration test mock for GetGitLog signature

* fix: address code review feedback

- Use GetOrEnsureExecution in wsGitCommits to recover workspaces after backend restarts
- Fix archive snapshot to use baseBranch for merge-base when baseCommit is empty
- Extended ExecutionLookup interface with GetOrEnsureExecution method

* fix: distinguish not-ready errors from unexpected errors in wsGitCommits

Address CodeRabbit review feedback:
- Use errors.Is() to detect ErrSessionWorkspaceNotReady sentinel error
- Return ready:false gracefully for workspace-not-ready and session-not-ready errors
- Return actual errors for unexpected failures (database errors, etc.)
- Add comprehensive tests for error handling paths
2026-04-15 21:29:59 +01:00
Carlos Florêncio 84173d3820 feat(github): support PR URLs in task creation dialog (#379) 2026-03-05 23:17:10 +00:00
Carlos Florêncio 7fb2f0bcfa feat: add git failed operations as failed chat messages (#371) 2026-03-05 20:26:55 +00:00