feat(agent-configs): add per-agent engine settings to agent_configs table#878
Merged
feat(agent-configs): add per-agent engine settings to agent_configs table#878
Conversation
nhopeatall
approved these changes
Mar 15, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — Clean, well-structured change that adds per-agent engine settings storage to the agent_configs table. The implementation correctly follows the existing pattern from projects.ts (same jsonb().$type<EngineSettings>() approach), and all layers (migration → schema → repository → router → tests) are consistent.
Key observations:
- Migration is idempotent (
ADD COLUMN IF NOT EXISTS) - Repository correctly maps the API-level
engineSettingsparam to the DB-levelagentEngineSettingscolumn, and the conditional spread inupdateAgentConfigprevents accidentally nullifying the column whenengineSettingsis not provided buildAgentMaps()return type extension is non-breaking — existing callers destructure only what they needmapProjectRowintentionally does not yet consume the per-agentengineSettingsfrombuildAgentMaps(merge chain deferred to Story #5 per the card), which is reasonable- Tests cover the key correctness properties: explicit null pass-through, omission when not provided, and mapper extraction behavior
🕵️ claude-code · claude-opus-4-6 · run details
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.
Summary
agent_engine_settingsJSONB column toagent_configstable via migration0044_agent_config_engine_settings.sqlagentConfigs.tsto includeagentEngineSettingstyped asEngineSettingscreateAgentConfig()andupdateAgentConfig()to accept optionalengineSettingsparameter and persist asagentEngineSettingsagentConfigsRoutercreate/update mutations to acceptengineSettingswithEngineSettingsSchema.nullish()validationagentEngineSettingsfield toAgentConfigRowinterface inconfigMapper.tsbuildAgentMaps()to return anengineSettings: Record<string, EngineSettings>map alongside models, iterations, and enginesTest plan
agentConfigsRepository.test.ts— verifycreateAgentConfigandupdateAgentConfigpersistengineSettingsconfigMapper.test.ts— verifybuildAgentMapsextractsengineSettingsper agent type, skips null valuesagentConfigs.test.ts(router) — verify tRPC create/update acceptengineSettings, correctly pass through to repositoryNotes
projects.tsschema whereagentEngineSettingsusesjsonb().$type<EngineSettings>()buildAgentMaps()return type extended non-breakingly — existing destructured callers are unaffectedTrello: https://trello.com/c/69b6cf7521608303df9c6adb
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details