Repository navigation
fix: handle blank tool descriptions during discovery - #218
Merged
n-papaioannou merged 2 commits intoOct 7, 2026
Merged
n-papaioannou merged 2 commits into
n-papaioannou merged 2 commits into
Conversation
Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
rudycelekli
requested review from
Sebabaian,
dimneo,
n-papaioannou and
stefyi-4355
as code owners
October 7, 2026 00:00
n-papaioannou
approved these changes
Oct 7, 2026
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.
Problem and change
A valid discovered tool with a whitespace-only description and no explicit risk value raises
IndexErrorwhile reading its first description word. That aborts both publicdiscover_systemanddiscover_fixture, although an empty description already uses the existing default.Check whether description tokens exist before indexing. Preserve the existing first-word risk heuristic, medium fallback and explicit risk values. No scoring, population, provider, schema or risk policy changes.
Native proof and required checks
GovernanceFixture.load/Pydantic → shipped mock provider/governance wrapper → both public discovery functions: 4 failures / 6 controls before.29440eaea47c1ddebc628fbe4d9ddf48ee81e42a: whole-package Ruff 0.16.9, Bandit medium/high, layout validation, all eleven shipped example fixture validations and diff checks pass. Advisory provider Mypy retains one unrelated baseline error; no blanket type-check pass claimed.The shipped mock and structural governance path are real; no paid model, service inference or discovery accuracy assessment is claimed. An initial harness called an incorrect loader method and was corrected before the matched regression run; those setup failures are excluded from the counts.
Related earlier discovery work (#127 case ordering, #129 role IDs, #131 admin role handling, #128 generated-fixture persistence and #153 probe lifetime) addresses different causes. This patch changes only blank-description token access.
AI assisted implementation and tests; source reviewed and native checks executed before publication. Exact-head fork Python 3.10/3.11/3.12 CI is recorded separately from upstream PR checks.
Exact-head fork CI Python 3.10, 3.11 and 3.12: all three jobs passed (workflow receipt). These are the unchanged install, lint, Bandit, layout and fixture gates; native pytest evidence above was run locally. Upstream PR CI is recorded separately.