Conversation
nhopeatall
approved these changes
Mar 16, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM — well-structured integration tests that thoroughly cover the trigger config resolution chain (definition defaults → DB overrides → merged output) across all four exported functions. Test isolation is solid (truncateAll + clearDefinitionCache in beforeEach), fixtures are self-contained with a custom agent type to avoid coupling to built-in YAMLs, and edge cases (unknown agent/trigger, agent-not-enabled gate) are all covered. All CI checks pass.
🕵️ 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
tests/integration/trigger-config-resolver.test.tswith 26 integration tests covering the full resolution chain for trigger configurationsisTriggerEnabled,getTriggerParameters,resolveTriggerConfigs, andgetResolvedTriggerConfigfunctions end-to-end against a real test databaseWhat was implemented
isTriggerEnabled()— 7 tests: returns definition default (true/false), DB override wins (true/false), agent-not-enabled gate, unknown agent type, unknown trigger eventgetTriggerParameters()— 7 tests: definition defaults, empty params, DB override wins, parameter merging (DB wins on conflicts + adds new keys), agent-not-enabled gate, unknown agent/triggerresolveTriggerConfigs()— 6 tests: all triggers with defaults,isCustomizedflag, agent-not-enabled, unknown agent, no-trigger definition, multi-trigger DB override merginggetResolvedTriggerConfig()— 6 tests: known event (no DB), known event (with DB override), null for unknown event, null when agent not enabled, null for unknown agent, description/providers from definitionTest approach
test-resolver-agentdefinition into the DB for each test, avoiding dependency on built-in YAML definitionsclearDefinitionCache()inbeforeEachto prevent stale cache state between testsseedAgentDefinition,seedAgentConfig,seedTriggerConfighelpers fromtests/integration/helpers/seed.tstruncateAll()inbeforeEachfor test isolationTest plan
biome check --write .— no fixes applied)tsc --noEmit— no errors)Trello: https://trello.com/c/69b8008fa6ab955c5b3f814b
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details