Skip to content

feat: workspace-changelog — agrupar metadata por workspace en vez de branch#214

Closed
blak0p wants to merge 1 commit into
mainfrom
feature/workspace-changelog
Closed

feat: workspace-changelog — agrupar metadata por workspace en vez de branch#214
blak0p wants to merge 1 commit into
mainfrom
feature/workspace-changelog

Conversation

@blak0p

@blak0p blak0p commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Resumen

Cambia la clave de agrupación de metadata de commits de branch a workspace_id (= session_id), para que el changelog de release vea contexto completo de features con PRs encadenados.

Cambios

Archivo Cambio
internal/core/domain/commit_entry.go +campo branch, WithBranch(), Branch() getter
internal/core/ports/commit_store.go SetBranchSetWorkspace, +SetBranchRef, +ReadAllWorkspaces, +RemoveAllWorkspaceDirs
internal/adapters/commitstore/adapter.go Implementación workspace, sanitización condicional UUID vs branch, 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 Wiring activeSessionCommitService
internal/delivery/mcp/core/commit_handler.go handlePreview workspace-aware
internal/workflow/release.go Merge branches/ + workspace/ con dedup por SHA
internal/workflow/release_execute.go +RemoveAllWorkspaceDirs()
internal/core/ports/pr_matcher.go Port stub para v2.8.0 (branch→PR matching)
cmd/main.go, internal/delivery/cli/release.go SetBranchSetWorkspace

Test Plan

  • make test-unit — 40/40 paquetes pasan, 0 fallos
  • Tests nuevos para WithBranch, ResolveWorkspace, SetActiveSession, PRMatcher, merge workspace en release, preview con sesión activa
  • Todos los mocks actualizados para SetWorkspace/SetBranchRef
  • Sin regresiones en tests existentes

Notas

  • branches/ storage marcado como DEPRECATED — coexistencia pasiva sin migración
  • PR enrichment (v2.8.0) queda como port stub, implementación futura

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 commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

Closes #SDD-workspace-changelog

Este PR implementa el cambio completo de workspace-changelog siguiendo el flujo SDD: proposal → spec → design → tasks → apply → verify → archive.

@blak0p blak0p closed this Jul 2, 2026
@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.

1 participant