Skip to content

feat(dexdex): support repository selector for CreateUnitTask#280

Merged
kdy1 merged 2 commits intomainfrom
kdy1/dexdex-create-task-repository-selector
Mar 18, 2026
Merged

feat(dexdex): support repository selector for CreateUnitTask#280
kdy1 merged 2 commits intomainfrom
kdy1/dexdex-create-task-repository-selector

Conversation

@kdy1
Copy link
Copy Markdown
Contributor

@kdy1 kdy1 commented Mar 18, 2026

Summary

  • add repository_id to CreateUnitTaskRequest and enforce exactly-one selector validation with repository_group_id
  • extend dexdex main server to create/reuse deterministic singleton auto groups (auto-repo-singleton-<repository_id>) when repository_id is used
  • enforce auto-group guardrails: reserved create prefix, blocked update/delete, and cleanup on repository delete
  • update DexDex desktop Create Task dialog to use one unified selector (Repository Groups + Repositories)
  • hide system-managed auto groups from Repository Groups UI and render repository-friendly task metadata for auto-group-backed tasks
  • synchronize DexDex proto/app/server/project contracts in docs/

Test Plan

  • cd protos/dexdex && buf lint && buf build
  • cd protos/dexdex && PATH="$(pwd)/../../apps/dexdex/node_modules/.bin:$PATH" buf generate && PATH="$(pwd)/../../apps/dexdex/node_modules/.bin:$PATH" buf generate --template buf.gen.web.yaml
  • go test ./servers/dexdex-main-server/...
  • cd apps/dexdex && pnpm test

@kdy1 kdy1 marked this pull request as ready for review March 18, 2026 14:51
@kdy1 kdy1 changed the title dexdex: support repository selector for CreateUnitTask feat(dexdex): support repository selector for CreateUnitTask Mar 18, 2026
@kdy1 kdy1 merged commit 0618508 into main Mar 18, 2026
16 checks passed
@kdy1 kdy1 deleted the kdy1/dexdex-create-task-repository-selector branch March 18, 2026 14:51
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 647ed9b5fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +133 to +145
autoGroupID := buildAutoRepositoryGroupID(repositoryID)
if cleanupErr := h.store.DeleteRepositoryGroup(workspaceID, autoGroupID); cleanupErr != nil {
if !isNotFoundError(cleanupErr) {
err := fmt.Errorf("failed to delete auto repository group %s: %w", autoGroupID, cleanupErr)
h.logger.Error("DeleteRepository auto-group cleanup failed",
"workspace_id", workspaceID,
"repository_id", repositoryID,
"repository_group_id", autoGroupID,
"error", cleanupErr,
)
return nil, connect.NewError(connect.CodeInternal, err)
}
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Delay auto-group cleanup until delete can succeed

When a repository belongs to a normal group and also has repository-targeted tasks, this block removes the singleton auto group before DeleteRepository() checks the remaining references. The RPC still returns FailedPrecondition because the normal group keeps the repo “in use”, but the state is already mutated: existing tasks that stored that auto-group ID can no longer dispatch retries/forks because CreateSubTask, RetrySubTask, and ForkSession all call GetRepositoryGroup(task.RepositoryGroupId) and skip dispatch when it is missing (task_handler.go and session_handler.go).

Useful? React with 👍 / 👎.

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