Skip to content

feat: group commit metadata by workspace instead of branch for changelog#216

Merged
blak0p merged 1 commit into
mainfrom
feature/workspace-changelog
Jul 2, 2026
Merged

feat: group commit metadata by workspace instead of branch for changelog#216
blak0p merged 1 commit into
mainfrom
feature/workspace-changelog

Conversation

@blak0p

@blak0p blak0p commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Closes #215

Summary

Change commit metadata grouping from branch to workspace_id (= session_id) so the release changelog LLM sees full feature context instead of fragments from individual branches in chained PRs.

Changes

File Change
internal/core/domain/commit_entry.go +branch field, WithBranch(), Branch() getter
internal/core/ports/commit_store.go SetBranchSetWorkspace, +SetBranchRef, +ReadAllWorkspaces, +RemoveAllWorkspaceDirs
internal/adapters/commitstore/adapter.go Workspace implementation, conditional UUID vs branch sanitization, entriesEqual +branch
internal/adapters/commitstore/sanitize.go Export SanitizeBranchName, +isUUID helper
internal/workflow/commit.go +activeSession, SetActiveSession(), ResolveWorkspace()
internal/workflow/commit_execute.go captureCommit workspace-aware
internal/delivery/mcp/server.go Wire activeSessionCommitService
internal/delivery/mcp/core/commit_handler.go handlePreview workspace-aware
internal/workflow/release.go Merge branches/ + workspace/ with SHA dedup
internal/workflow/release_execute.go +RemoveAllWorkspaceDirs()
internal/core/ports/pr_matcher.go Port stub for v2.8.0 (branch→PR matching)
cmd/main.go, internal/delivery/cli/release.go SetBranchSetWorkspace

Test Plan

  • make test-unit — 40/40 packages pass, 0 failures
  • New tests for WithBranch, ResolveWorkspace, SetActiveSession, PRMatcher, workspace merge in release, preview with active session
  • All mocks updated for SetWorkspace/SetBranchRef
  • No regressions in existing tests

WHY
The previous branch-scoped storage model conflated logical workspaces with git refs, preventing independent management of isolated commit histories and causing path conflicts. This limitation hindered support for non-branch contexts like detached HEADs or specific feature sets, while also failing to correctly associate commits with active user sessions.

WHAT
* Replaced SetBranch with SetWorkspace using UUID-based paths and introduced SetBranchRef to decouple storage location from git ref updates.
* Added Branch field to CommitEntry structs and updated serialization logic to persist origin context alongside commit data.
* Implemented ReadAllWorkspaces and RemoveAllWorkspaceDirs for lifecycle management of the new workspace directory structure.
* Updated release aggregation logic to merge entries from both legacy branch stores and new workspace stores with SHA-based deduplication.
* Introduced session-aware workspace resolution in capture logic to prioritize active session IDs over git branches.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@blak0p blak0p merged commit 80c84a4 into main Jul 2, 2026
8 of 10 checks passed
@blak0p blak0p deleted the feature/workspace-changelog branch July 2, 2026 21:20
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.

feature: group commit metadata by workspace instead of branch for changelog

1 participant