fix(#3087): skill routing fails loud on ambiguity instead of silent first-match#123
Open
Skobeltsyn wants to merge 1 commit into
Open
fix(#3087): skill routing fails loud on ambiguity instead of silent first-match#123Skobeltsyn wants to merge 1 commit into
Skobeltsyn wants to merge 1 commit into
Conversation
…irst-match De-slop epic #3083, reviewer finding #4. resolveSkill() had every branch fail loud except the last: multiple compatible skills + no skillSelection selector + no model silently routed to candidates.first() by registration order. An auditable / explicit-boundaries runtime must not pick a production route implicitly. Now throws SkillRoutingException naming the ambiguous candidates and the two ways to disambiguate (skillSelection { } or model { }). Extracted into ambiguousSkillRoutingError(): Nothing to stay under detekt ThrowsCount. The existing test that pinned the silent first-match fallback is rewritten to assert the fail-loud contract (RED -> GREEN). Behavior change: documented in CHANGELOG [Unreleased]; single-candidate / selector / model-routed paths unchanged. Task-UUID: 9e0538e2-e6aa-44db-b1f5-4dc670e0a30c Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Part of de-slop epic #3083 (external review). Reviewer finding #4:
resolveSkill()silently routed tocandidates.first()by registration order when multiple skills matched and there was noskillSelection { }selector and nomodel { }. An auditable / explicit-boundaries runtime must not pick a production route implicitly.Change
else -> candidates.first()becomesambiguousSkillRoutingError(candidates): NothingthrowingSkillRoutingExceptionnaming the ambiguous candidates and the two disambiguation paths. Extracted to a helper to stay under detektThrowsCount.[Unreleased]documents the behavior change.Verification: 278 core tests ran, 276 green incl. the new routing test. The only 2 failures are
AgentVisionLiveTestlive-cloud-apiClaude tests, failing solely because the Claude API is currently down — unrelated to this change. detekt + compile + all other modules green.CI note: the default
:testtask includeslive-cloud-api(direct Anthropic/OpenAI/DeepSeek), so those will be red until the Claude API returns — tracked in #3089.Resolves #3087.
Generated with Claude Code