feat: group commit metadata by workspace instead of branch for changelog#216
Merged
Conversation
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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #215
Summary
Change commit metadata grouping from
branchtoworkspace_id(=session_id) so the release changelog LLM sees full feature context instead of fragments from individual branches in chained PRs.Changes
internal/core/domain/commit_entry.gobranchfield,WithBranch(),Branch()getterinternal/core/ports/commit_store.goSetBranch→SetWorkspace, +SetBranchRef, +ReadAllWorkspaces, +RemoveAllWorkspaceDirsinternal/adapters/commitstore/adapter.goentriesEqual+branchinternal/adapters/commitstore/sanitize.goSanitizeBranchName, +isUUIDhelperinternal/workflow/commit.goactiveSession,SetActiveSession(),ResolveWorkspace()internal/workflow/commit_execute.gocaptureCommitworkspace-awareinternal/delivery/mcp/server.goactiveSession→CommitServiceinternal/delivery/mcp/core/commit_handler.gohandlePreviewworkspace-awareinternal/workflow/release.gobranches/+workspace/with SHA dedupinternal/workflow/release_execute.goRemoveAllWorkspaceDirs()internal/core/ports/pr_matcher.gocmd/main.go,internal/delivery/cli/release.goSetBranch→SetWorkspaceTest Plan
make test-unit— 40/40 packages pass, 0 failuresWithBranch,ResolveWorkspace,SetActiveSession,PRMatcher, workspace merge in release, preview with active sessionSetWorkspace/SetBranchRef