WIZ-prereq-B POST /agents/types/{old}/rename — transactional type rename #671
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
#672 WIZ-1 Onboarding state table + /onboarding/should-redirect trigger
charles/claude-hooks
#675 WIZ-4 Agent types screen — rename + pool sizing + drop-design toggle
charles/claude-hooks
#670 WIZ-prereq-A Role-keyed dispatch refactor + default type rename
charles/claude-hooks
Reference
charles/claude-hooks#671
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a platform engineer, I want a single transactional endpoint that atomically rewrites every per-type column reference across the agent-config DB and the in-memory config cache, so renames the wizard or any future operator action triggers cannot leave the system in a half-renamed state.
Acceptance criteria
Endpoint
POST /agents/types/{old_name}/renamebody{ new_name }. Operator-auth-gated.{ ok: true, renamed: { old, new, affected_rows: { agents, agent_type_config, skill, system_prompt, plugin_binding, plugin_marketplace, mcp_server } } }on success.new_nameis empty / equalsold_name/ clashes with an existing type / clashes with a reserved role name (host,code-lead,code,review,design,design-review).old_namedoes not exist.Transaction
agents.type,agent_type_config.agent_type,skill.agent_type,system_prompt.agent_type,plugin_binding.agent_type,plugin_marketplace.agent_type,mcp_server.agent_type. Returns counts per table.config/agents.jsonon disk. File-write failure logs but does not roll back the DB (DB is source of truth).config_revisionrow withkind = "type_rename",name = old_name,body_snapshot = { old_name, new_name, affected_rows }.Side effects
agent-env-sync.renderForInstancefor every instance of the renamed type after commit.agent_type_renamedevent so dashboard caches invalidate.Tests
boss, add 3 agents + 5 skill rows + 2 plugin rows. Rename totech-lead. Every row reflects the new name; old name returns 404.hostreturns 400.bosstodev(existing) returns 400.Out of scope
References
specs/first-login-wizard.md§Story WIZ-prereq-Bspecs/agent-config-customization.md— DB schema this rewrites.🤖 Auto-assigned to boss (heuristic: area:agents → boss (architecture-touching)). Reply
/unassignto reroute.