feat(agent-configs): remove global/org-level agent configs — project-only migration#788
Conversation
|
@aaight fix CI |
…nly agent configs The agent config tests were still using the old API signatures (orgId param, projectId: null, no-arg listAgentConfigs). Updated to match the new project-only schema after migration 0036. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Fixed. The
All 4599 unit tests pass, typecheck clean, lint clean. |
CI Failures ResolvedFixes Applied
Specific changes:
Verification
🤖 Generated with Claude Code |
|
Agent completed without making changes Manual intervention may be required. |
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
Clean, well-executed migration that removes the global/org-level agent config layers in favor of project-only scoping. The change is architecturally sound — it eliminates a 3-tier fallback system that added complexity without clear value, and the migration path is straightforward. All CI checks pass. 31 files changed across DB schema, backend, CLI, frontend, tools, and tests — all consistent.
Code Issues
Should Fix
-
web/src/components/settings/agent-configs-table.tsx — The
deleteMutation.onSuccessbuilds the query key usingconfigs[0]?.projectId ?? ''. If a race condition emptiesconfigsbefore the callback fires, this invalidates the wrong query key. Consider passingprojectIdas a prop toAgentConfigsTablerather than deriving it from the data array. -
web/src/components/settings/agent-config-form-dialog.tsx —
projectId: config?.projectId as stringis a type assertion that bypasses type safety. Ifconfigisundefined, this would sendundefinedto the API. Safe in practice since the component is only used for edits fromAgentConfigsTable, but a defensive check would be cleaner.
Notes
The migration warning about data loss is appropriately documented in the PR description. The DELETE FROM agent_configs WHERE project_id IS NULL is irreversible, which is the correct behavior for this intentional simplification.
Summary
listAgentConfigsrequires projectId, removedlistGlobalAgentConfigs,getMaxConcurrencyis now single-query (no 3-tier fallback)loadConfigFromDbandfindProjectConfigFromDbno longer split global/org agent configs;defaults.agentModels/agentIterationsare always empty--project-idis now required oncascade agents listandcascade agents createTest plan
Notes
Fixes: https://trello.com/c/69b455935a1ea3ca43f118e0
🤖 Generated with Claude Code